cups: 2.2.2 -> 2.2.6

This commit is contained in:
Peter Hoeg 2017-11-30 23:23:33 +08:00 committed by Orivej Desh
parent dc4200f934
commit e5715d9464
2 changed files with 13 additions and 9 deletions

View File

@ -39,7 +39,7 @@ import ./make-test.nix ({pkgs, ... }: {
$client->waitForUnit("cups.service");
$client->sleep(10); # wait until cups is fully initialized
$client->succeed("lpstat -r") =~ /scheduler is running/ or die;
$client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die;
$client->succeed("lpstat -H") =~ "localhost:631" or die;
$client->succeed("curl --fail http://localhost:631/");
$client->succeed("curl --fail http://server:631/");
$server->fail("curl --fail --connect-timeout 2 http://client:631/");

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam
{ stdenv, fetchurl, fetchpatch, pkgconfig, zlib, libjpeg, libpng, libtiff, pam
, dbus, systemd, acl, gmp, darwin
, libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
}:
@ -9,18 +9,26 @@
with stdenv.lib;
stdenv.mkDerivation rec {
name = "cups-${version}";
version = "2.2.2";
version = "2.2.6";
passthru = { inherit version; };
src = fetchurl {
url = "https://github.com/apple/cups/releases/download/v${version}/cups-${version}-source.tar.gz";
sha256 = "1xp4ji4rz3xffsz6w6nd60ajxvvihn02pkyp2l4smhqxbmyvp2gm";
sha256 = "16qn41b84xz6khrr2pa2wdwlqxr29rrrkjfi618gbgdkq9w5ff20";
};
outputs = [ "out" "lib" "dev" "man" ];
patches = [
(fetchpatch {
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/cups-systemd-socket.patch?h=packages/cups";
sha256 = "1ddgdlg9s0l2ph6l8lx1m1lx6k50gyxqi3qiwr44ppq1rxs80ny5";
})
];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ zlib libjpeg libpng libtiff libusb gnutls libpaper ]
++ optionals stdenv.isLinux [ avahi pam dbus systemd acl ]
++ optionals stdenv.isDarwin (with darwin; [
@ -39,6 +47,7 @@ stdenv.mkDerivation rec {
"--localstatedir=/var"
"--sysconfdir=/etc"
"--with-rundir=/run"
"--with-systemd=\${out}/lib/systemd/system"
"--enable-raw-printing"
"--enable-threads"
@ -54,11 +63,6 @@ stdenv.mkDerivation rec {
"--disable-launchd"
];
# XXX: Hackery until https://github.com/NixOS/nixpkgs/issues/24693
preBuild = if stdenv.isDarwin then ''
export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks
'' else null;
installFlags =
[ # Don't try to write in /var at build time.
"CACHEDIR=$(TMPDIR)/dummy"