From 52e1479febf3d3264660005215ea5c15306a4a30 Mon Sep 17 00:00:00 2001 From: Yochai Meir Date: Wed, 1 Dec 2021 14:49:34 +0200 Subject: [PATCH] mfcj470dw-cupswrapper: fixed issue #147793 --- .../drivers/mfcj470dwcupswrapper/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix b/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix index 2ff073591d05..dc54611d335a 100644 --- a/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix +++ b/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix @@ -21,8 +21,7 @@ stdenv.mkDerivation rec { --replace /etc "$out/etc" substituteInPlace $WRAPPER \ - --replace "\`cp " "\`cp -p " \ - --replace "\`mv " "\`cp -p " + --replace "cp " "cp -p " ''; buildPhase = '' @@ -33,11 +32,18 @@ stdenv.mkDerivation rec { installPhase = '' TARGETFOLDER=$out/opt/brother/Printers/mfcj470dw/cupswrapper/ - mkdir -p $out/opt/brother/Printers/mfcj470dw/cupswrapper/ + PPDFOLDER=$out/share/cups/model/ + FILTERFOLDER=$out/lib/cups/filter/ + + mkdir -p $TARGETFOLDER + mkdir -p $PPDFOLDER + mkdir -p $FILTERFOLDER cp brcupsconfpt1/brcupsconfpt1 $TARGETFOLDER - cp cupswrapper/cupswrappermfcj470dw $TARGETFOLDER/ - cp PPD/brother_mfcj470dw_printer_en.ppd $TARGETFOLDER/ + cp cupswrapper/cupswrappermfcj470dw $TARGETFOLDER + cp PPD/brother_mfcj470dw_printer_en.ppd $PPDFOLDER + + ln -s ${mfcj470dwlpr}/lib/cups/filter/brother_lpdwrapper_mfcj470dw $FILTERFOLDER/ ''; cleanPhase = ''