2008-11-15 18:54:09 +01:00
|
|
|
args :
|
|
|
|
let
|
|
|
|
lib = args.lib;
|
|
|
|
fetchurl = args.fetchurl;
|
2009-05-20 01:25:58 +02:00
|
|
|
fullDepEntry = args.fullDepEntry;
|
2008-11-15 18:54:09 +01:00
|
|
|
|
2009-05-24 12:57:41 +02:00
|
|
|
version = lib.attrByPath ["version"] "0.9.3" args;
|
2008-11-15 18:54:09 +01:00
|
|
|
buildInputs = with args; [
|
|
|
|
libpng libcv
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.debian.org/debian/pool/main/libd/libdecodeqr/libdecodeqr_${version}.orig.tar.gz";
|
|
|
|
sha256 = "1kmljwx69h7zq6zlp2j19bbpz11px45z1abw03acrxjyzz5f1f13";
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
|
|
|
phaseNames = ["preConfigure" "doConfigure" "doMake"
|
|
|
|
"createDirs" "doMakeInstall" "postInstall"];
|
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
preConfigure = fullDepEntry ''
|
2008-11-15 18:54:09 +01:00
|
|
|
cd src
|
|
|
|
sed -e /LDCONFIG/d -i libdecodeqr/Makefile.in
|
|
|
|
'' ["doUnpack"];
|
2009-05-20 01:25:58 +02:00
|
|
|
postInstall = fullDepEntry ''
|
2008-11-15 18:54:09 +01:00
|
|
|
cp sample/simple/simpletest $out/bin/qrdecode
|
|
|
|
cd ..
|
|
|
|
'' ["doMake"];
|
2009-05-20 01:25:58 +02:00
|
|
|
createDirs = fullDepEntry ''
|
2008-11-15 18:54:09 +01:00
|
|
|
ensureDir $out/bin $out/lib $out/include $out/share
|
|
|
|
'' ["defEnsureDir"];
|
|
|
|
|
|
|
|
name = "libdecodeqr-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "QR code decoder library";
|
|
|
|
};
|
|
|
|
}
|