diff --git a/pkgs/misc/cups/drivers/samsung/4.01.17.nix b/pkgs/misc/cups/drivers/samsung/4.01.17.nix index 12cfcde82f76..dc9cb8f0515b 100644 --- a/pkgs/misc/cups/drivers/samsung/4.01.17.nix +++ b/pkgs/misc/cups/drivers/samsung/4.01.17.nix @@ -11,7 +11,13 @@ # } # (This advice was tested on the 1st November 2016.) -{ lib, stdenv, fetchurl, cups, libusb-compat-0_1 }: +{ lib +, stdenv +, cups +, libusb-compat-0_1 +, fetchurl +, patchPpdFilesHook +}: # Do not bump lightly! Visit # to see what will break when upgrading. Consider a new versioned attribute. @@ -28,6 +34,8 @@ in stdenv.mkDerivation rec { sha256 = "1vv3pzvqpg1dq3xjr8161x2yp3v7ca75vil56ranhw5pkjwq66x0"; }; + nativeBuildInputs = [ patchPpdFilesHook ]; + dontPatchELF = true; dontStrip = true; @@ -63,15 +71,11 @@ in stdenv.mkDerivation rec { mkdir -p $out/share/cups/model/samsung cd - cd ../noarch/at_opt/share/ppd - for i in *.ppd; do - sed -i $i -e \ - "s,pstosecps,$out/lib/cups/filter/pstosecps,g; \ - s,pstospl,$out/lib/cups/filter/pstospl,g; \ - s,rastertospl,$out/lib/cups/filter/rastertospl,g" - done; cp -r ./* $out/share/cups/model/samsung ''; + ppdFileCommands = [ "pstosecps" "pstospl" "rastertospl" ]; + meta = with lib; { description = "Samsung's Linux printing drivers; includes binaries without source code"; homepage = "http://www.samsung.com/";