Author: eelco
Date: Wed Jun 15 12:40:58 2011
New Revision: 27470
URL: https://svn.nixos.org/websvn/nix/?rev=27470&sc=1

Log:
* Clean up foomatic-filters.

Modified:
   nixpkgs/trunk/pkgs/misc/drivers/foomatic-filters/default.nix

Modified: nixpkgs/trunk/pkgs/misc/drivers/foomatic-filters/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/misc/drivers/foomatic-filters/default.nix        Wed Jun 
15 12:04:31 2011        (r27469)
+++ nixpkgs/trunk/pkgs/misc/drivers/foomatic-filters/default.nix        Wed Jun 
15 12:40:58 2011        (r27470)
@@ -1,54 +1,32 @@
-x@{builderDefsPackage
-  , perl, cups
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
-
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    baseName="foomatic-filters";
-    version="4.0.6";
-    name="${baseName}-${version}";
-    url="http://www.openprinting.org/download/foomatic/${name}.tar.gz";;
-    hash="0wa9hlq7s99sh50kl6bj8j0vxrz7pcbwdnqs1yfjjhqshfh7hsav";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
+{ stdenv, fetchurl, perl, cups, coreutils, gnused }:
+
+stdenv.mkDerivation rec {
+  name = "foomatic-filters-4.0.6";
+
+  src = fetchurl {
+    url = "http://www.openprinting.org/download/foomatic/${name}.tar.gz";;
+    sha256 = "0wa9hlq7s99sh50kl6bj8j0vxrz7pcbwdnqs1yfjjhqshfh7hsav";
   };
 
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
+  buildInputs = [ perl cups ];
+
+  preConfigure =
+    ''
+      substituteInPlace foomaticrip.c --replace /bin/bash /bin/sh
+    '';
 
-  phaseNames = ["doConfigure" "fixPaths" "doMakeInstall"];
+  installTargets = "install-cups";
+
+  installFlags =
+    ''
+      CUPS_FILTERS=$(out)/lib/cups/filter
+      CUPS_BACKENDS=$(out)/lib/cups/backend
+    '';
 
-  fixPaths = a.fullDepEntry ''
-    sed -e "s@= .*/store/[^/]\+/lib/cups/filter@= $out/lib/cups/filter@" -i 
Makefile
-    sed -e "s@= .*/store/[^/]\+/lib/cups/backend@= $out/lib/cups/backend@" -i 
Makefile
-    sed -e "s@= /usr/@= $out/@" -i Makefile
-    sed -e "s@/bin/bash@/bin/sh@g" -i foomaticrip.c
-  '' ["doConfigure" "minInit"];
-      
   meta = {
     description = "Foomatic printing filters";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      linux;
-    license = a.lib.licenses.gpl2Plus;
-  };
-  passthru = {
-    updateInfo = {
-      downloadPage = "http://www.openprinting.org/download/foomatic/";;
-    };
+    maintainers = stdenv.lib.maintainers.raskin;
+    platforms = stdenv.lib.platforms.linux;
+    license = stdenv.lib.licenses.gpl2Plus;
   };
-}) x
-
+}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to