2016-08-26 08:46:17 +02:00
|
|
|
{ stdenv, fetchurl, foomatic-filters, bc, unzip, ghostscript, systemd, vim }:
|
2011-01-28 09:44:31 +01:00
|
|
|
|
2016-08-03 00:41:47 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2018-02-20 20:25:07 +01:00
|
|
|
name = "foo2zjs-20171202";
|
2011-01-28 09:44:31 +01:00
|
|
|
|
2016-08-03 00:41:47 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
|
2018-02-20 20:25:07 +01:00
|
|
|
sha256 = "b63c65e8e0e7c9fd8d19b9e63f7cd85048eba01a877aac1ca13a6bfc979ea182";
|
2016-08-03 00:41:47 +02:00
|
|
|
};
|
2011-01-28 09:44:31 +01:00
|
|
|
|
2016-08-26 08:46:17 +02:00
|
|
|
buildInputs = [ foomatic-filters bc unzip ghostscript systemd vim ];
|
2011-03-06 17:07:53 +01:00
|
|
|
|
|
|
|
patches = [ ./no-hardcode-fw.diff ];
|
|
|
|
|
2011-01-28 09:44:31 +01:00
|
|
|
makeFlags = [
|
2016-08-03 00:41:47 +02:00
|
|
|
"PREFIX=$(out)"
|
|
|
|
"APPL=$(out)/share/applications"
|
|
|
|
"PIXMAPS=$(out)/share/pixmaps"
|
|
|
|
"UDEVBIN=$(out)/bin"
|
|
|
|
"UDEVDIR=$(out)/etc/udev/rules.d"
|
2017-10-27 22:20:20 +02:00
|
|
|
"UDEVD=${systemd}/sbin/udevd"
|
2016-08-03 00:41:47 +02: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 09:44:31 +01:00
|
|
|
];
|
2011-03-06 17:07:53 +01:00
|
|
|
|
2011-03-06 17:07:43 +01:00
|
|
|
installFlags = [ "install-hotplug" ];
|
2011-03-06 17:07:53 +01:00
|
|
|
|
2016-08-03 00:41:47 +02:00
|
|
|
postPatch = ''
|
2011-01-28 09:44:31 +01:00
|
|
|
touch all-test
|
2011-01-28 11:22:30 +01:00
|
|
|
sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
|
2011-03-16 00:08:59 +01: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 17:07:43 +01:00
|
|
|
sed -e '/install-usermap/d' -i Makefile
|
|
|
|
sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
|
2011-03-16 00:08:59 +01:00
|
|
|
sed -e "s@/usr@$out@g" -i hplj1020.desktop
|
2011-03-06 17:07:53 +01:00
|
|
|
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
|
2016-08-03 00:41:47 +02:00
|
|
|
'';
|
2011-01-28 09:44:31 +01:00
|
|
|
|
2016-08-03 00:41:47 +02:00
|
|
|
preInstall = ''
|
2011-03-06 17:07:43 +01:00
|
|
|
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-16 00:08:59 +01:00
|
|
|
mkdir -pv $out/share/{applications,pixmaps}
|
2011-03-06 17:07:43 +01:00
|
|
|
|
2011-03-16 00:08:59 +01:00
|
|
|
mkdir -pv "$out/bin"
|
|
|
|
cp -v getweb arm2hpdl "$out/bin"
|
2016-08-03 00:41:47 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2011-01-28 09:44:31 +01:00
|
|
|
description = "ZjStream printer drivers";
|
2016-08-03 00:41:47 +02:00
|
|
|
maintainers = with maintainers;
|
2011-01-28 09:44:31 +01:00
|
|
|
[
|
2017-03-27 19:11:17 +02:00
|
|
|
raskin
|
2011-01-28 09:44:31 +01:00
|
|
|
];
|
2016-08-03 00:41:47 +02:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2Plus;
|
2011-01-28 09:44:31 +01:00
|
|
|
};
|
2016-08-03 00:41:47 +02:00
|
|
|
}
|