summary refs log tree commit diff
path: root/pkgs/misc/cups/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc/cups/default.nix')
-rw-r--r--pkgs/misc/cups/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix
index feeb73a27e90..38ad73d01600 100644
--- a/pkgs/misc/cups/default.nix
+++ b/pkgs/misc/cups/default.nix
@@ -1,6 +1,7 @@
 { stdenv, fetchurl, fetchpatch, pkgconfig, removeReferencesTo
 , zlib, libjpeg, libpng, libtiff, pam, dbus, systemd, acl, gmp, darwin
 , libusb ? null, gnutls ? null, avahi ? null, libpaper ? null
+, coreutils
 }:
 
 ### IMPORTANT: before updating cups, make sure the nixos/tests/printing.nix test
@@ -30,6 +31,11 @@ stdenv.mkDerivation rec {
     ./cups-clean-dirty.patch
   ];
 
+  postPatch = ''
+    substituteInPlace cups/testfile.c \
+      --replace 'cupsFileFind("cat", "/bin' 'cupsFileFind("cat", "${coreutils}/bin'
+  '';
+
   nativeBuildInputs = [ pkgconfig removeReferencesTo ];
 
   buildInputs = [ zlib libjpeg libpng libtiff libusb gnutls libpaper ]