mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
Merge pull request #13365 from abbradar/cups-second-attempt
CUPS update (second attempt)
This commit is contained in:
commit
a469681a51
@ -78,7 +78,7 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
# (showing that the right filters have been applied). Of
|
# (showing that the right filters have been applied). Of
|
||||||
# course, since there is no actual USB printer attached, the
|
# course, since there is no actual USB printer attached, the
|
||||||
# file will stay in the queue forever.
|
# file will stay in the queue forever.
|
||||||
$server->waitForFile("/var/spool/cups/d00001-001");
|
$server->waitForFile("/var/spool/cups/d*-001");
|
||||||
$server->sleep(10);
|
$server->sleep(10);
|
||||||
$server->succeed("lpq -a") =~ /$fn/ or die;
|
$server->succeed("lpq -a") =~ /$fn/ or die;
|
||||||
|
|
||||||
@ -90,6 +90,9 @@ import ./make-test.nix ({pkgs, ... }: {
|
|||||||
Machine::retry sub {
|
Machine::retry sub {
|
||||||
return 1 if $server->succeed("lpq -a") =~ /no entries/;
|
return 1 if $server->succeed("lpq -a") =~ /no entries/;
|
||||||
};
|
};
|
||||||
|
# The queue is empty already, so this should be safe.
|
||||||
|
# Otherwise, pairs of "c*"-"d*-001" files might persist.
|
||||||
|
$server->execute("rm /var/spool/cups/*");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
|
### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
|
||||||
### works at least for your platform.
|
### works at least for your platform.
|
||||||
let version = "2.0.4"; in
|
let version = "2.1.3"; in
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
@ -15,7 +15,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://www.cups.org/software/${version}/cups-${version}-source.tar.bz2";
|
url = "https://www.cups.org/software/${version}/cups-${version}-source.tar.bz2";
|
||||||
sha256 = "1gaakz24k6x5nc09rmpiq0xq20j1qdjc3szag8qwmyi4ky6ydmg1";
|
sha256 = "1lyl3z01xhg9xb9c8m42398c6h9kw8qr6jwiv8bjdsjab11hv9rn";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls libpaper ]
|
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls libpaper ]
|
||||||
@ -53,7 +53,6 @@ stdenv.mkDerivation {
|
|||||||
# Idem for /etc.
|
# Idem for /etc.
|
||||||
"PAMDIR=$(out)/etc/pam.d"
|
"PAMDIR=$(out)/etc/pam.d"
|
||||||
"DBUSDIR=$(out)/etc/dbus-1"
|
"DBUSDIR=$(out)/etc/dbus-1"
|
||||||
"INITDIR=$(out)/etc/rc.d"
|
|
||||||
"XINETD=$(out)/etc/xinetd.d"
|
"XINETD=$(out)/etc/xinetd.d"
|
||||||
"SERVERROOT=$(out)/etc/cups"
|
"SERVERROOT=$(out)/etc/cups"
|
||||||
# Idem for /usr.
|
# Idem for /usr.
|
||||||
@ -63,6 +62,8 @@ stdenv.mkDerivation {
|
|||||||
"CUPS_PRIMARY_SYSTEM_GROUP=root"
|
"CUPS_PRIMARY_SYSTEM_GROUP=root"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# Delete obsolete stuff that conflicts with cups-filters.
|
# Delete obsolete stuff that conflicts with cups-filters.
|
||||||
rm -rf $out/share/cups/banners $out/share/cups/data/testprint
|
rm -rf $out/share/cups/banners $out/share/cups/data/testprint
|
||||||
|
Loading…
Reference in New Issue
Block a user