From c88e9deff451097aa2d6ec97a22ffd53ee4103b7 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sat, 15 Aug 2015 19:01:22 +0000 Subject: [PATCH] cups: remove xdg_utils dependency `cups.desktop` that depends on some fixed version of `xdg-open` is not particularly useful; it should use `xdg-open` from the environment it's being run from. As a side effect, one can now fiddle with `xdg_utils` package without rebuilding pretty much every single one of graphical packages (they all depend on `cups` through their graphical toolkits). --- pkgs/misc/cups/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index bcd27d68ce02..5032ef245a6e 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam -, dbus, acl, gmp, xdg_utils +, dbus, acl, gmp , libusb ? null, gnutls ? null, avahi ? null, libpaper ? null }: @@ -17,7 +17,7 @@ stdenv.mkDerivation { }; buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls avahi libpaper ] - ++ optionals stdenv.isLinux [ pam dbus.libs acl xdg_utils ] ; + ++ optionals stdenv.isLinux [ pam dbus.libs acl ]; propagatedBuildInputs = [ gmp ]; @@ -54,8 +54,7 @@ stdenv.mkDerivation { "CUPS_PRIMARY_SYSTEM_GROUP=root" ]; - postInstall = - '' + postInstall = '' # Delete obsolete stuff that conflicts with cups-filters. rm -rf $out/share/cups/banners $out/share/cups/data/testprint @@ -71,6 +70,10 @@ stdenv.mkDerivation { mv "$f" "''${f/org\.cups\./}" fi done + '' + optionalString stdenv.isLinux '' + # Use xdg-open when on Linux + substituteInPlace $out/share/applications/cups.desktop \ + --replace "Exec=htmlview" "Exec=xdg-open" ''; meta = {