* Sync with the trunk. Remove glib_2_28 because the branch already
has it. svn path=/nixpkgs/branches/x-updates/; revision=26189
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
x@{builderDefsPackage
|
||||
, foomatic_filters, bc, unzip, ghostscript
|
||||
, foomatic_filters, bc, unzip, ghostscript, udev, vim
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
@@ -11,10 +11,10 @@ let
|
||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||
sourceInfo = rec {
|
||||
baseName="foo2zjs";
|
||||
version="20090908";
|
||||
version="20110210";
|
||||
name="${baseName}-${version}";
|
||||
url="http://ftp.de.debian.org/debian/pool/main/f/foo2zjs/foo2zjs_${version}dfsg.orig.tar.gz";
|
||||
hash="1pg4dmckvlx94zxh4gcw7jfmyb10ada7f6vsp5bgz1z95fwwlqjz";
|
||||
url="http://www.loegria.net/mirrors/foo2zjs/${name}.tar.gz";
|
||||
hash="0vss8gdbbgxr694xw48rys2qflbnb4sp4gdb1v6z4m9ab97hs5yk";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
@@ -26,15 +26,36 @@ rec {
|
||||
inherit (sourceInfo) name version;
|
||||
inherit buildInputs;
|
||||
|
||||
phaseNames = ["fixMakefile" "doMakeInstall" "deployGetWeb"];
|
||||
phaseNames = ["doPatch" "fixHardcodedPaths" "doMakeDirs" "doMakeInstall" "deployGetWeb"];
|
||||
|
||||
patches = [ ./no-hardcode-fw.diff ];
|
||||
|
||||
makeFlags = [
|
||||
''PREFIX=$out/''
|
||||
''UDEVBIN=$out/bin/''
|
||||
''PREFIX=$out''
|
||||
''UDEVBIN=$out/bin''
|
||||
''UDEVDIR=$out/etc/udev/rules.d''
|
||||
''UDEVD=${udev}/sbin/udevd''
|
||||
''LIBUDEVDIR=$out/lib/udev/rules.d''
|
||||
''USBDIR=$out/etc/hotplug/usb''
|
||||
''FOODB=$out/share/foomatic/db/source''
|
||||
''MODEL=$out/share/cups/model''
|
||||
];
|
||||
fixMakefile = a.fullDepEntry ''
|
||||
|
||||
installFlags = [ "install-hotplug" ];
|
||||
|
||||
fixHardcodedPaths = a.fullDepEntry ''
|
||||
touch all-test
|
||||
sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
|
||||
'' ["doUnpack" "minInit"];
|
||||
sed -e '/install-usermap/d' -i Makefile
|
||||
sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
|
||||
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
|
||||
'' ["doPatch" "minInit"];
|
||||
|
||||
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
|
||||
'' ["minInit"];
|
||||
|
||||
deployGetWeb = a.fullDepEntry ''
|
||||
ensureDir "$out/bin"
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
#
|
||||
#
|
||||
# patch "hplj1000"
|
||||
# from [d5336e74866d31735d97874191351a0dcc092b44]
|
||||
# to [55102b37684ee5181674d19d866caec2cf603412]
|
||||
#
|
||||
============================================================
|
||||
--- a/hplj1000 d5336e74866d31735d97874191351a0dcc092b44
|
||||
+++ b/hplj1000 55102b37684ee5181674d19d866caec2cf603412
|
||||
@@ -39,11 +39,6 @@ DEV=""
|
||||
DEV=""
|
||||
|
||||
#
|
||||
-# Directory to find downloadable HP firmware files sihpMMMM.dl
|
||||
-#
|
||||
-FWDIR=/usr/share/foo2zjs/firmware
|
||||
-
|
||||
-#
|
||||
# Program used to determine USB printer id information
|
||||
#
|
||||
# NOTE: /usr/bin is NOT mounted at this point
|
||||
@@ -83,57 +78,61 @@ case "$0" in
|
||||
MODEL=P1005; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x3d17 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1006)
|
||||
MODEL=P1006; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x3e17 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1007)
|
||||
MODEL=P1007; FWMODEL=P1005 # Alias
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4817 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1008)
|
||||
MODEL=P1008; FWMODEL=P1006 # Alias
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4917 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1505)
|
||||
MODEL=P1505; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x3f17 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1505n)
|
||||
MODEL=P1505n; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4017 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*1000)
|
||||
MODEL=1000; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x0517 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*1005)
|
||||
MODEL=1005; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x1317 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*1018)
|
||||
MODEL=1018; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4117 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*1020)
|
||||
MODEL=1020; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x2b17 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*)
|
||||
log "Only HP LaserJet 100[05],1018,1020,P100[5678],P1505 are supported"
|
||||
@@ -203,7 +202,7 @@ load1() {
|
||||
#
|
||||
load1() {
|
||||
_dev="$1"
|
||||
- fw="$FWDIR/sihp$FWMODEL.dl"
|
||||
+ fw="${FOO2ZJS_DATADIR:-/usr/share}/$DRIVER/firmware/sihp$FWMODEL.dl"
|
||||
if [ ! -f "$fw" ]; then
|
||||
log "Missing HP LaserJet $MODEL firmware file $fw"
|
||||
log "...read foo2zjs installation instructions and run ./getweb $MODEL"
|
||||
@@ -1,13 +1,13 @@
|
||||
{stdenv, fetchurl, cups, zlib, libjpeg, libusb, python, saneBackends, dbus, pkgconfig
|
||||
, qtSupport ? false, qt4
|
||||
{stdenv, fetchurl, cups, zlib, libjpeg, libusb, python, saneBackends, dbus
|
||||
, pkgconfig, polkit, qtSupport ? false, qt4
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "hplip-3.10.5";
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hplip-3.11.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://prdownloads.sourceforge.net/hplip/hplip-3.10.5.tar.gz";
|
||||
sha256 = "1lyl9nrdaih64cqw6fa7ivjf7a74bq8zn0gkj1gap47b04my608p";
|
||||
url = "mirror://sourceforge/hplip/${name}.tar.gz";
|
||||
sha256 = "0y68s4xm5d0kv7p5j41qq0xglp4vdbjwbrjs89b4a21wwn69hp9g";
|
||||
};
|
||||
|
||||
#preBuild=''
|
||||
@@ -27,12 +27,16 @@ stdenv.mkDerivation {
|
||||
--with-icondir=$out/share/applications
|
||||
--with-systraydir=$out/xdg/autostart
|
||||
--with-mimedir=$out/etc/cups
|
||||
--enable-policykit
|
||||
--disable-network-build"
|
||||
|
||||
export makeFlags="
|
||||
halpredir=$out/share/hal/fdi/preprobe/10osvendor
|
||||
hplip_statedir=$out/var
|
||||
rulesdir=$out/etc/udev/rules.d
|
||||
policykit_dir=$out/share/polkit-1/actions
|
||||
policykit_dbus_etcdir=$out/etc/dbus-1/system.d
|
||||
policykit_dbus_sharedir=$out/share/dbus-1/system-services
|
||||
hplip_confdir=$out/etc/hp
|
||||
";
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user