@@ -1,51 +1,33 @@
1−x@{builderDefsPackage
2− , foomatic_filters, bc, unzip, ghostscript, systemd, vim
3− , ...}:
4−builderDefsPackage
5−(a :
6−let
7− helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
8− [];
1+{ stdenv, fetchurl, foomatic_filters, bc, unzip, ghostscript, systemd, vim }:
92
10− buildInputs = map (n: builtins.getAttr n x)
11− (builtins.attrNames (builtins.removeAttrs x helperArgNames));
12− sourceInfo = rec {
13− baseName="foo2zjs";
14− version="20110210";
15− name="${baseName}-${version}";
16− url="http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
17− hash="0vss8gdbbgxr694xw48rys2qflbnb4sp4gdb1v6z4m9ab97hs5yk";
18− };
19−in
20−rec {
21− src = a.fetchurl {
22− url = sourceInfo.url;
23− sha256 = sourceInfo.hash;
24− };
3+stdenv.mkDerivation rec {
4+ name = "foo2zjs-20110210";
255
26− inherit (sourceInfo) name version;
27− inherit buildInputs;
6+ src = fetchurl {
7+ url = "http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
8+ sha256 = "0vss8gdbbgxr694xw48rys2qflbnb4sp4gdb1v6z4m9ab97hs5yk";
9+ };
2810
29− phaseNames = ["doPatch" "fixHardcodedPaths" "doMakeDirs" "doMakeInstall" "deployGetWeb"];
11+ buildInputs = [ foomatic_filters bc unzip ghostscript systemd vim ];
3012
3113 patches = [ ./no-hardcode-fw.diff ];
3214
3315 makeFlags = [
34− ''PREFIX=$out''
35− ''APPL=$out/share/applications''
36− ''PIXMAPS=$out/share/pixmaps''
37− ''UDEVBIN=$out/bin''
38− ''UDEVDIR=$out/etc/udev/rules.d''
39− ''UDEVD=${systemd.udev.bin}/sbin/udevd''
40− ''LIBUDEVDIR=$out/lib/udev/rules.d''
41− ''USBDIR=$out/etc/hotplug/usb''
42− ''FOODB=$out/share/foomatic/db/source''
43− ''MODEL=$out/share/cups/model''
16+ "PREFIX=$(out)"
17+ "APPL=$(out)/share/applications"
18+ "PIXMAPS=$(out)/share/pixmaps"
19+ "UDEVBIN=$(out)/bin"
20+ "UDEVDIR=$(out)/etc/udev/rules.d"
21+ "UDEVD=${systemd.udev.bin}/sbin/udevd"
22+ "LIBUDEVDIR=$(out)/lib/udev/rules.d"
23+ "USBDIR=$(out)/etc/hotplug/usb"
24+ "FOODB=$(out)/share/foomatic/db/source"
25+ "MODEL=$(out)/share/cups/model"
4426 ];
4527
4628 installFlags = [ "install-hotplug" ];
4729
48− fixHardcodedPaths = a.fullDepEntry ''
30+ postPatch = ''
4931 touch all-test
5032 sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
5133 sed -e "s@PREFIX=/usr@PREFIX=$out@" -i *-wrapper{,.in}
@@ -55,28 +37,25 @@ rec {
5537 sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
5638 sed -e "s@/usr@$out@g" -i hplj1020.desktop
5739 sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
58− '' ["doPatch" "minInit"];
40+ '';
5941
60− doMakeDirs = a.fullDepEntry ''
42+ preInstall = ''
6143 mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
6244 mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver}
6345 mkdir -pv $out/share/cups/model
6446 mkdir -pv $out/share/{applications,pixmaps}
65− '' ["minInit"];
6647
67− deployGetWeb = a.fullDepEntry ''
6848 mkdir -pv "$out/bin"
6949 cp -v getweb arm2hpdl "$out/bin"
70− '' ["minInit"];
71−
72− meta = {
50+ '';
51+
52+ meta = with stdenv.lib; {
7353 description = "ZjStream printer drivers";
74− maintainers = with a.lib.maintainers;
54+ maintainers = with maintainers;
7555 [
7656 raskin urkud
7757 ];
78− platforms = with a.lib.platforms;
79− linux;
80− license = a.lib.licenses.gpl2Plus;
58+ platforms = platforms.linux;
59+ license = licenses.gpl2Plus;
8160 };
82−}) x
61+}