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).
This commit is contained in:
Jan Malakhovski 2015-08-15 19:01:22 +00:00 committed by Luca Bruno
parent 844bfc605a
commit c88e9deff4
1 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam { stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam
, dbus, acl, gmp, xdg_utils , dbus, acl, gmp
, libusb ? null, gnutls ? null, avahi ? null, libpaper ? null , libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
}: }:
@ -17,7 +17,7 @@ stdenv.mkDerivation {
}; };
buildInputs = [ pkgconfig zlib libjpeg libpng libtiff libusb gnutls avahi libpaper ] 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 ]; propagatedBuildInputs = [ gmp ];
@ -54,8 +54,7 @@ stdenv.mkDerivation {
"CUPS_PRIMARY_SYSTEM_GROUP=root" "CUPS_PRIMARY_SYSTEM_GROUP=root"
]; ];
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
@ -71,6 +70,10 @@ stdenv.mkDerivation {
mv "$f" "''${f/org\.cups\./}" mv "$f" "''${f/org\.cups\./}"
fi fi
done done
'' + optionalString stdenv.isLinux ''
# Use xdg-open when on Linux
substituteInPlace $out/share/applications/cups.desktop \
--replace "Exec=htmlview" "Exec=xdg-open"
''; '';
meta = { meta = {