2011-01-28 08:44:31 +00:00
|
|
|
x@{builderDefsPackage
|
2015-10-03 18:52:03 +00:00
|
|
|
, foomatic_filters, bc, unzip, ghostscript, systemd, vim
|
2011-01-28 08:44:31 +00:00
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
|
|
[];
|
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
sourceInfo = rec {
|
|
|
|
baseName="foo2zjs";
|
2011-03-06 16:07:43 +00:00
|
|
|
version="20110210";
|
2011-01-28 08:44:31 +00:00
|
|
|
name="${baseName}-${version}";
|
2011-03-06 16:07:43 +00:00
|
|
|
url="http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
|
|
|
|
hash="0vss8gdbbgxr694xw48rys2qflbnb4sp4gdb1v6z4m9ab97hs5yk";
|
2011-01-28 08:44:31 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = a.fetchurl {
|
|
|
|
url = sourceInfo.url;
|
|
|
|
sha256 = sourceInfo.hash;
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
2011-03-06 16:07:53 +00:00
|
|
|
phaseNames = ["doPatch" "fixHardcodedPaths" "doMakeDirs" "doMakeInstall" "deployGetWeb"];
|
|
|
|
|
|
|
|
patches = [ ./no-hardcode-fw.diff ];
|
|
|
|
|
2011-01-28 08:44:31 +00:00
|
|
|
makeFlags = [
|
2011-03-06 16:07:43 +00:00
|
|
|
''PREFIX=$out''
|
2011-03-15 23:08:59 +00:00
|
|
|
''APPL=$out/share/applications''
|
|
|
|
''PIXMAPS=$out/share/pixmaps''
|
2011-03-06 16:07:43 +00:00
|
|
|
''UDEVBIN=$out/bin''
|
|
|
|
''UDEVDIR=$out/etc/udev/rules.d''
|
2015-10-03 18:52:03 +00:00
|
|
|
''UDEVD=${systemd.udev.bin}/sbin/udevd''
|
2011-03-06 16:07:43 +00:00
|
|
|
''LIBUDEVDIR=$out/lib/udev/rules.d''
|
|
|
|
''USBDIR=$out/etc/hotplug/usb''
|
|
|
|
''FOODB=$out/share/foomatic/db/source''
|
|
|
|
''MODEL=$out/share/cups/model''
|
2011-01-28 08:44:31 +00:00
|
|
|
];
|
2011-03-06 16:07:53 +00:00
|
|
|
|
2011-03-06 16:07:43 +00:00
|
|
|
installFlags = [ "install-hotplug" ];
|
2011-03-06 16:07:53 +00:00
|
|
|
|
|
|
|
fixHardcodedPaths = a.fullDepEntry ''
|
2011-01-28 08:44:31 +00:00
|
|
|
touch all-test
|
2011-01-28 10:22:30 +00:00
|
|
|
sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
|
2011-03-15 23:08:59 +00:00
|
|
|
sed -e "s@PREFIX=/usr@PREFIX=$out@" -i *-wrapper{,.in}
|
|
|
|
sed -e "s@/usr/share@$out/share@" -i hplj10xx_gui.tcl
|
|
|
|
sed -e "s@\[.*-x.*/usr/bin/logger.*\]@type logger >/dev/null 2>\&1@" -i *wrapper{,.in}
|
2011-03-06 16:07:43 +00:00
|
|
|
sed -e '/install-usermap/d' -i Makefile
|
|
|
|
sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
|
2011-03-15 23:08:59 +00:00
|
|
|
sed -e "s@/usr@$out@g" -i hplj1020.desktop
|
2011-03-06 16:07:53 +00:00
|
|
|
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
|
|
|
|
'' ["doPatch" "minInit"];
|
2011-01-28 08:44:31 +00:00
|
|
|
|
2011-03-06 16:07:43 +00:00
|
|
|
doMakeDirs = a.fullDepEntry ''
|
|
|
|
mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
|
|
|
|
mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver}
|
|
|
|
mkdir -pv $out/share/cups/model
|
2011-03-15 23:08:59 +00:00
|
|
|
mkdir -pv $out/share/{applications,pixmaps}
|
2011-03-06 16:07:43 +00:00
|
|
|
'' ["minInit"];
|
|
|
|
|
2011-01-28 08:44:31 +00:00
|
|
|
deployGetWeb = a.fullDepEntry ''
|
2011-03-15 23:08:59 +00:00
|
|
|
mkdir -pv "$out/bin"
|
|
|
|
cp -v getweb arm2hpdl "$out/bin"
|
|
|
|
'' ["minInit"];
|
2011-01-28 08:44:31 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ZjStream printer drivers";
|
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
2011-03-15 23:08:59 +00:00
|
|
|
raskin urkud
|
2011-01-28 08:44:31 +00:00
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
|
|
|
license = a.lib.licenses.gpl2Plus;
|
|
|
|
};
|
|
|
|
}) x
|