···
1
-
{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, bash, file }:
1
+
{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, a2ps, coreutils, gnused, gawk, file }:
stdenv.mkDerivation rec {
name = "mfcj470dw-cupswrapper-${version}";
···
18
-
buildInputs = [ dpkg cups patchelf bash ];
18
+
buildInputs = [ cups ghostscript dpkg a2ps ];
···
substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \
--replace /opt "$out/opt" \
32
-
--replace file "/run/current-system/sw/bin/file"
32
+
--replace file "${file}/bin/file" \
33
+
--replace sed "${gnused}/bin/sed" \
34
+
--replace mktemp "${coreutils}/bin/mktemp" \
35
+
--replace cat "${coreutils}/bin/cat" \
36
+
--replace rm "${coreutils}/bin/rm"
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2
39
+
substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2 \
40
+
--replace awk "${gawk}/bin/awk" \
41
+
--replace cat "${coreutils}/bin/cat" \
42
+
--replace mktemp "${coreutils}/bin/mktemp" \
43
+
--replace sed "${gnused}/bin/sed" \
44
+
--replace expr "${coreutils}/bin/expr" \
45
+
--replace rm "${coreutils}/bin/rm"
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/cupswrapper/brcupsconfpt1