2008-11-15 17:54:09 +00:00
|
|
|
args :
|
|
|
|
let
|
|
|
|
lib = args.lib;
|
|
|
|
fetchurl = args.fetchurl;
|
2009-05-20 00:25:58 +01:00
|
|
|
fullDepEntry = args.fullDepEntry;
|
2008-11-15 17:54:09 +00:00
|
|
|
|
2009-05-24 11:57:41 +01:00
|
|
|
version = lib.attrByPath ["version"] "0.9.3" args;
|
2008-11-15 17:54:09 +00:00
|
|
|
buildInputs = with args; [
|
2010-10-14 11:51:31 +01:00
|
|
|
libpng opencv
|
2008-11-15 17:54:09 +00:00
|
|
|
];
|
|
|
|
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 00:25:58 +01:00
|
|
|
preConfigure = fullDepEntry ''
|
2008-11-15 17:54:09 +00:00
|
|
|
cd src
|
|
|
|
sed -e /LDCONFIG/d -i libdecodeqr/Makefile.in
|
|
|
|
'' ["doUnpack"];
|
2009-05-20 00:25:58 +01:00
|
|
|
postInstall = fullDepEntry ''
|
2008-11-15 17:54:09 +00:00
|
|
|
cp sample/simple/simpletest $out/bin/qrdecode
|
|
|
|
cd ..
|
|
|
|
'' ["doMake"];
|
2009-05-20 00:25:58 +01:00
|
|
|
createDirs = fullDepEntry ''
|
2008-11-15 17:54:09 +00:00
|
|
|
ensureDir $out/bin $out/lib $out/include $out/share
|
|
|
|
'' ["defEnsureDir"];
|
|
|
|
|
|
|
|
name = "libdecodeqr-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "QR code decoder library";
|
|
|
|
};
|
|
|
|
}
|