2013-02-05 18:58:31 +00:00
|
|
|
{stdenv, fetchurl, cups, zlib, libjpeg, libusb, pythonPackages, saneBackends, dbus
|
|
|
|
, pkgconfig, polkit, qtSupport ? true, qt4, pythonDBus, pyqt4
|
2010-06-18 09:16:17 +01:00
|
|
|
}:
|
|
|
|
|
2011-03-06 16:07:47 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hplip-3.11.1";
|
2010-06-18 09:16:17 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-03-06 16:07:47 +00:00
|
|
|
url = "mirror://sourceforge/hplip/${name}.tar.gz";
|
|
|
|
sha256 = "0y68s4xm5d0kv7p5j41qq0xglp4vdbjwbrjs89b4a21wwn69hp9g";
|
2010-06-18 09:16:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#preBuild=''
|
|
|
|
# makeFlags="V=1 DISABLE_JBIG=1 CUPSFILTER=$out/lib/cups/filter CUPSPPD=$out/share/cups/model"
|
|
|
|
#'';
|
|
|
|
|
|
|
|
prePatch = ''
|
2010-09-21 02:24:00 +01:00
|
|
|
sed -i s,/etc/sane.d,$out/etc/sane.d/, Makefile.in
|
2013-02-05 18:58:31 +00:00
|
|
|
sed -i s,/etc/hp/,$out/etc/hp/, base/g.py
|
2010-06-18 09:16:17 +01:00
|
|
|
'';
|
|
|
|
|
2010-09-21 02:24:00 +01:00
|
|
|
# --disable-network-build Until we have snmp
|
|
|
|
|
2010-06-18 09:16:17 +01:00
|
|
|
preConfigure = ''
|
|
|
|
export configureFlags="$configureFlags
|
|
|
|
--with-cupsfilterdir=$out/lib/cups/filter
|
|
|
|
--with-cupsbackenddir=$out/lib/cups/backend
|
|
|
|
--with-icondir=$out/share/applications
|
|
|
|
--with-systraydir=$out/xdg/autostart
|
|
|
|
--with-mimedir=$out/etc/cups
|
2011-03-06 16:07:47 +00:00
|
|
|
--enable-policykit
|
2010-06-18 09:16:17 +01:00
|
|
|
--disable-network-build"
|
|
|
|
|
|
|
|
export makeFlags="
|
|
|
|
halpredir=$out/share/hal/fdi/preprobe/10osvendor
|
|
|
|
hplip_statedir=$out/var
|
|
|
|
rulesdir=$out/etc/udev/rules.d
|
2011-03-06 16:07:47 +00:00
|
|
|
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
|
2010-06-18 09:16:17 +01:00
|
|
|
hplip_confdir=$out/etc/hp
|
|
|
|
";
|
|
|
|
'';
|
|
|
|
|
2013-02-05 18:58:31 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libjpeg
|
|
|
|
cups
|
|
|
|
libusb
|
|
|
|
pythonPackages.python
|
|
|
|
pythonPackages.wrapPython
|
|
|
|
saneBackends
|
|
|
|
dbus
|
|
|
|
pkgconfig] ++
|
2010-06-18 09:16:17 +01:00
|
|
|
stdenv.lib.optional qtSupport qt4;
|
|
|
|
|
2013-02-05 18:58:31 +00:00
|
|
|
pythonPath = with pythonPackages; [
|
|
|
|
pythonDBus
|
|
|
|
pyqt4
|
|
|
|
pygobject
|
2013-02-05 19:27:51 +00:00
|
|
|
recursivePthLoader
|
2013-02-05 18:58:31 +00:00
|
|
|
];
|
|
|
|
|
2010-09-21 02:24:00 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-06-18 09:16:17 +01:00
|
|
|
description = "Print, scan and fax HP drivers for Linux";
|
|
|
|
homepage = http://hplipopensource.com/;
|
2010-06-18 10:45:23 +01:00
|
|
|
license = "free"; # MIT/BSD/GPL
|
2010-09-21 02:24:00 +01:00
|
|
|
platforms = platforms.linux;
|
2010-06-18 09:16:17 +01:00
|
|
|
};
|
|
|
|
}
|