summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2015-06-17 00:24:12 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2015-11-24 14:45:15 +0100
commit8aa63b34dafb4de1ee60ab345a809814344f7fb0 (patch)
tree072afdf51bb2e5fc95b7cb84c4671eab4b2236e5 /pkgs/tools/graphics
parenta1e397c4fbc7a5c47077d1f386f7bb8bed3ac205 (diff)
downloadnixlib-8aa63b34dafb4de1ee60ab345a809814344f7fb0.tar
nixlib-8aa63b34dafb4de1ee60ab345a809814344f7fb0.tar.gz
nixlib-8aa63b34dafb4de1ee60ab345a809814344f7fb0.tar.bz2
nixlib-8aa63b34dafb4de1ee60ab345a809814344f7fb0.tar.lz
nixlib-8aa63b34dafb4de1ee60ab345a809814344f7fb0.tar.xz
nixlib-8aa63b34dafb4de1ee60ab345a809814344f7fb0.tar.zst
nixlib-8aa63b34dafb4de1ee60ab345a809814344f7fb0.zip
qrdecode: reimplement using mkDerivation
Also mark as broken; I have verified that the build fails with
the original build recipe.
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/qrdecode/default.nix41
1 files changed, 13 insertions, 28 deletions
diff --git a/pkgs/tools/graphics/qrdecode/default.nix b/pkgs/tools/graphics/qrdecode/default.nix
index f84780ab3c39..308183d7ae11 100644
--- a/pkgs/tools/graphics/qrdecode/default.nix
+++ b/pkgs/tools/graphics/qrdecode/default.nix
@@ -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 = [];
-
-  /* doConfigure should be specified separately */
-  phaseNames = ["preConfigure" "doConfigure" "doMake" 
-  "createDirs"  "doMakeInstall" "postInstall"];
+  buildInputs = [ libpng opencv ];
 
-  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;
   };
 }