zbar: reimplement using mkDerivation
This commit is contained in:
parent
2889b153c5
commit
b0e5edae35
@ -1,39 +1,23 @@
|
|||||||
x@{builderDefsPackage
|
{ stdenv, fetchurl, imagemagickBig, pkgconfig, python, pygtk, perl
|
||||||
, imagemagickBig, pkgconfig, python, pygtk, perl, libX11, libv4l
|
, libX11, libv4l, qt4, lzma, gtk2
|
||||||
, qt4, lzma, gtk2
|
}:
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
[];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
name = "${pname}-${version}";
|
||||||
sourceInfo = rec {
|
pname = "zbar";
|
||||||
baseName="zbar";
|
version = "0.10";
|
||||||
version="0.10";
|
src = fetchurl {
|
||||||
name="${baseName}-${version}";
|
url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${name}.tar.bz2";
|
||||||
pName="${baseName}";
|
sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3";
|
||||||
url="mirror://sourceforge/project/${pName}/${baseName}/${version}/${name}.tar.bz2";
|
|
||||||
hash="1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
src = a.fetchurl {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
buildInputs =
|
||||||
inherit buildInputs;
|
[ imagemagickBig pkgconfig python pygtk perl libX11
|
||||||
|
libv4l qt4 lzma gtk2 ];
|
||||||
/* doConfigure should be removed if not needed */
|
|
||||||
phaseNames = ["doConfigure" "doMakeInstall"];
|
|
||||||
|
|
||||||
configureFlags = ["--disable-video"];
|
configureFlags = ["--disable-video"];
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Bar code reader";
|
description = "Bar code reader";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
ZBar is an open source software suite for reading bar codes from various
|
ZBar is an open source software suite for reading bar codes from various
|
||||||
@ -42,18 +26,15 @@ rec {
|
|||||||
EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR
|
EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR
|
||||||
Code.
|
Code.
|
||||||
'';
|
'';
|
||||||
maintainers = with a.lib.maintainers;
|
maintainers = with maintainers; [ raskin ];
|
||||||
[
|
platforms = with platforms; linux;
|
||||||
raskin
|
license = licenses.lgpl21;
|
||||||
];
|
homepage = http://zbar.sourceforge.net/;
|
||||||
platforms = with a.lib.platforms;
|
|
||||||
linux;
|
|
||||||
license = a.lib.licenses.lgpl21;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateInfo = {
|
updateInfo = {
|
||||||
downloadPage = "http://zbar.sourceforge.net/";
|
downloadPage = "http://zbar.sourceforge.net/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}) x
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user