* Clean up foomatic-filters.
svn path=/nixpkgs/trunk/; revision=27470
This commit is contained in:
parent
22b9fd78a4
commit
614e5a525c
@ -1,54 +1,32 @@
|
||||
x@{builderDefsPackage
|
||||
, perl, cups
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
let
|
||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
||||
[];
|
||||
{ stdenv, fetchurl, perl, cups, coreutils, gnused }:
|
||||
|
||||
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.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 ];
|
||||
|
||||
phaseNames = ["doConfigure" "fixPaths" "doMakeInstall"];
|
||||
preConfigure =
|
||||
''
|
||||
substituteInPlace foomaticrip.c --replace /bin/bash /bin/sh
|
||||
'';
|
||||
|
||||
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;
|
||||
maintainers = stdenv.lib.maintainers.raskin;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
};
|
||||
passthru = {
|
||||
updateInfo = {
|
||||
downloadPage = "http://www.openprinting.org/download/foomatic/";
|
||||
};
|
||||
};
|
||||
}) x
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user