From 862510079a4ac370d8e7c6015f38a049231fd640 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Thu, 26 Mar 2015 13:30:45 -0700 Subject: [PATCH] cups: 1.7.5 -> 2.0.2 --- pkgs/misc/cups/default.nix | 25 ++++++++++++++++++++----- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index e62cfcff8327..d2170cfc332f 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -1,8 +1,11 @@ { stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam, openssl -, dbus, libusb, acl, gmp }: +, dbus, acl, gmp +, libusb ? null, gnutls ? null, avahi ? null, libpaper ? null +}: -let version = "1.7.5"; in +let version = "2.0.2"; in +with stdenv.lib; stdenv.mkDerivation { name = "cups-${version}"; @@ -10,15 +13,27 @@ stdenv.mkDerivation { src = fetchurl { url = "https://www.cups.org/software/${version}/cups-${version}-source.tar.bz2"; - sha256 = "00mx4rpiqw9cwx46bd3hd5lcgmcxy63zfnmkr02smanv8xl4rjqq"; + sha256 = "12xild9nrhqnrzx8zqh78v3chm4mpp5gf5iamr0h9zb6dgvj11w5"; }; - buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb ] + buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls avahi libpaper ] ++ stdenv.lib.optionals stdenv.isLinux [ pam dbus.libs acl ] ; propagatedBuildInputs = [ openssl gmp ]; - configureFlags = "--localstatedir=/var --sysconfdir=/etc --enable-dbus"; # --with-dbusdir + configureFlags = [ + "--localstatedir=/var" + "--sysconfdir=/etc" + "--with-systemd=\${out}/lib/systemd/system" + "--enable-raw-printing" + "--enable-threads" + ] ++ optionals stdenv.isLinux [ + "--enable-dbus" + "--enable-pam" + ] ++ optional (libusb != null) "--enable-libusb" + ++ optional (gnutls != null) "--enable-ssl" + ++ optional (avahi != null) "--enable-avahi" + ++ optional (libpaper != null) "--enable-libpaper"; installFlags = [ # Don't try to write in /var at build time. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d5bd3d71c956..09c7fa0b2745 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13983,7 +13983,9 @@ let beep = callPackage ../misc/beep { }; - cups = callPackage ../misc/cups { libusb = libusb1; }; + cups = callPackage ../misc/cups { + libusb = libusb1; + }; cups_filters = callPackage ../misc/cups/filters.nix { };