From e5715d94645a46c26d09c633214e5421db758d2c Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Thu, 30 Nov 2017 23:23:33 +0800 Subject: [PATCH] cups: 2.2.2 -> 2.2.6 --- nixos/tests/printing.nix | 2 +- pkgs/misc/cups/default.nix | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/nixos/tests/printing.nix b/nixos/tests/printing.nix index e44e5bf11d3..2d3ecaf94cf 100644 --- a/nixos/tests/printing.nix +++ b/nixos/tests/printing.nix @@ -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/"); diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index d005f6becad..9d8134d2156 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -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"