mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
qrdecode: reimplement using mkDerivation
Also mark as broken; I have verified that the build fails with the original build recipe.
This commit is contained in:
parent
a1e397c4fb
commit
8aa63b34da
@ -1,44 +1,29 @@
|
||||
args :
|
||||
let
|
||||
lib = args.lib;
|
||||
fetchurl = args.fetchurl;
|
||||
fullDepEntry = args.fullDepEntry;
|
||||
{ stdenv, fetchurl, libpng, opencv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libdecodeqr-${version}";
|
||||
version = "0.9.3";
|
||||
|
||||
version = lib.attrByPath ["version"] "0.9.3" args;
|
||||
buildInputs = with args; [
|
||||
libpng opencv
|
||||
];
|
||||
in
|
||||
rec {
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/libd/libdecodeqr/libdecodeqr_${version}.orig.tar.gz";
|
||||
sha256 = "1kmljwx69h7zq6zlp2j19bbpz11px45z1abw03acrxjyzz5f1f13";
|
||||
};
|
||||
|
||||
inherit buildInputs;
|
||||
configureFlags = [];
|
||||
buildInputs = [ libpng opencv ];
|
||||
|
||||
/* doConfigure should be specified separately */
|
||||
phaseNames = ["preConfigure" "doConfigure" "doMake"
|
||||
"createDirs" "doMakeInstall" "postInstall"];
|
||||
|
||||
preConfigure = fullDepEntry ''
|
||||
preConfigure = ''
|
||||
cd src
|
||||
sed -e /LDCONFIG/d -i libdecodeqr/Makefile.in
|
||||
sed -e '/#include <cv.h>/a#include <ml.h>' -i libdecodeqr/imagereader.h
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${args.opencv}/include/opencv"
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${opencv}/include/opencv"
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -lcxcore"
|
||||
'' ["doUnpack"];
|
||||
postInstall = fullDepEntry ''
|
||||
cp sample/simple/simpletest $out/bin/qrdecode
|
||||
cd ..
|
||||
'' ["doMake"];
|
||||
createDirs = fullDepEntry ''
|
||||
mkdir -p $out/bin $out/lib $out/include $out/share
|
||||
'' ["defEnsureDir"];
|
||||
'';
|
||||
|
||||
preInstall = "mkdir -p $out/bin $out/lib $out/include $out/share";
|
||||
postInstall = "cp sample/simple/simpletest $out/bin/qrdecode";
|
||||
|
||||
name = "libdecodeqr-" + version;
|
||||
meta = {
|
||||
description = "QR code decoder library";
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
@ -11908,7 +11908,7 @@ let
|
||||
java = if stdenv.isLinux then jre else jdk;
|
||||
};
|
||||
|
||||
qrdecode = builderDefsPackage (callPackage ../tools/graphics/qrdecode) {
|
||||
qrdecode = callPackage ../tools/graphics/qrdecode {
|
||||
libpng = libpng12;
|
||||
opencv = opencv_2_1;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user