3
0
Fork 0
forked from mirrors/nixpkgs

hplip: ensure plugin version always up-to-date

This commit is contained in:
Thomas Tuegel 2015-01-21 07:42:30 -06:00
parent 7a20c4cae4
commit 28b55a318a
2 changed files with 16 additions and 4 deletions

View file

@ -1,10 +1,11 @@
{ stdenv, fetchurl, automake, pkgconfig { stdenv, fetchurl, automake, pkgconfig
, cups, zlib, libjpeg, libusb1, pythonPackages, saneBackends, dbus , cups, zlib, libjpeg, libusb1, pythonPackages, saneBackends, dbus
, polkit, qtSupport ? true, qt4, pythonDBus, pyqt4, net_snmp , polkit, qtSupport ? true, qt4, pythonDBus, pyqt4, net_snmp
, withPlugin ? false , withPlugin ? false, substituteAll
}: }:
stdenv.mkDerivation rec { let
name = "hplip-3.14.10"; name = "hplip-3.14.10";
src = fetchurl { src = fetchurl {
@ -12,12 +13,23 @@ stdenv.mkDerivation rec {
sha256 = "164mm30yb61psk5j4ziybxdd310y09fixgl09hmb59ny261wvcqi"; sha256 = "164mm30yb61psk5j4ziybxdd310y09fixgl09hmb59ny261wvcqi";
}; };
hplip_state =
substituteAll
{
src = ./hplip.state;
# evaluated this way, version is always up-to-date
version = (builtins.parseDrvName name).version;
};
plugin = fetchurl { plugin = fetchurl {
url = "http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run"; url = "http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/${name}-plugin.run";
sha256 = "10cvgy1h84fwh7xpw4x6cbkpisqbn3nbcqrgd9xz5fc6mn0b95dk"; sha256 = "10cvgy1h84fwh7xpw4x6cbkpisqbn3nbcqrgd9xz5fc6mn0b95dk";
}; };
hplip_state = ./hplip.state; in
stdenv.mkDerivation {
inherit name src;
prePatch = '' prePatch = ''
# HPLIP hardcodes absolute paths everywhere. Nuke from orbit. # HPLIP hardcodes absolute paths everywhere. Nuke from orbit.

View file

@ -1,4 +1,4 @@
[plugin] [plugin]
installed=1 installed=1
eula=1 eula=1
version=3.14.4 version=@version@