about summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2015-04-03 11:35:10 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2015-11-24 14:45:15 +0100
commitb0e5edae357ff999daf90509334197f82d824f23 (patch)
treeed32d4d4e07a712f2e0d5199f14bf08456bddfcf /pkgs/tools/graphics
parent2889b153c52acdf4e03760827c68acd71f60be89 (diff)
downloadnixlib-b0e5edae357ff999daf90509334197f82d824f23.tar
nixlib-b0e5edae357ff999daf90509334197f82d824f23.tar.gz
nixlib-b0e5edae357ff999daf90509334197f82d824f23.tar.bz2
nixlib-b0e5edae357ff999daf90509334197f82d824f23.tar.lz
nixlib-b0e5edae357ff999daf90509334197f82d824f23.tar.xz
nixlib-b0e5edae357ff999daf90509334197f82d824f23.tar.zst
nixlib-b0e5edae357ff999daf90509334197f82d824f23.zip
zbar: reimplement using mkDerivation
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/zbar/default.nix61
1 files changed, 21 insertions, 40 deletions
diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix
index 51dcc2a9c808..2f4e3f633747 100644
--- a/pkgs/tools/graphics/zbar/default.nix
+++ b/pkgs/tools/graphics/zbar/default.nix
@@ -1,39 +1,23 @@
-x@{builderDefsPackage
-  , imagemagickBig, pkgconfig, python, pygtk, perl, libX11, libv4l
-  , qt4, lzma, gtk2
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
+{ stdenv, fetchurl, imagemagickBig, pkgconfig, python, pygtk, perl
+, libX11, libv4l, qt4, lzma, gtk2
+}:
 
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    baseName="zbar";
-    version="0.10";
-    name="${baseName}-${version}";
-    pName="${baseName}";
-    url="mirror://sourceforge/project/${pName}/${baseName}/${version}/${name}.tar.bz2";
-    hash="1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3";
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "zbar";
+  version = "0.10";
+  src = fetchurl {
+    url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${name}.tar.bz2";
+    sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3";
   };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
-  };
-
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doConfigure" "doMakeInstall"];
+  buildInputs =
+    [ imagemagickBig pkgconfig python pygtk perl libX11
+      libv4l qt4 lzma gtk2 ];
 
   configureFlags = ["--disable-video"];
-      
-  meta = {
+
+  meta = with stdenv.lib; {
     description = "Bar code reader";
     longDescription = ''
       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
       Code.
     '';
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      linux;
-    license = a.lib.licenses.lgpl21;
+    maintainers = with maintainers; [ raskin ];
+    platforms = with platforms; linux;
+    license = licenses.lgpl21;
+    homepage = http://zbar.sourceforge.net/;
   };
+
   passthru = {
     updateInfo = {
       downloadPage = "http://zbar.sourceforge.net/";
     };
   };
-}) x
-
+}