about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2021-12-17 16:04:37 +0800
committerGitHub <noreply@github.com>2021-12-17 16:04:37 +0800
commit933b1b73de61c924a1f7802eda01201d8c91dada (patch)
treeb6446c50cdf9203896c6602d544da170c7f53710 /pkgs/misc
parent4ab7be9a55b02d9c45da7f00a74f76657538e704 (diff)
parent52e1479febf3d3264660005215ea5c15306a4a30 (diff)
Merge pull request #148146 from yochai/fix-mfcj470dwlpr
mfcj470dw-cupswrapper: fixed issue #147793
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix b/pkgs/misc/cups/drivers/mfcj470dwcupswrapper/default.nix
index 2ff073591d05d..dc54611d335a7 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 = ''