tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
mfcj470dw: tidy up
Cillian de Róiste
10 years ago
eacf656d
55d80762
+12
-12
1 changed file
expand all
collapse all
unified
split
pkgs
misc
cups
drivers
mfcj470dw
default.nix
+12
-12
pkgs/misc/cups/drivers/mfcj470dw/default.nix
···
1
-
{stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, bash, file}:
2
3
stdenv.mkDerivation rec {
4
name = "mfcj470dw-cupswrapper-${version}";
5
version = "3.0.0-1";
6
-
7
srcs =
8
[ (fetchurl {
9
url = "http://download.brother.com/welcome/dlf006843/mfcj470dwlpr-${version}.i386.deb";
···
14
sha256 = "92af9024e821159eccd78a8925fc77fb92b4f247f2d2c824ca303004077076a7";
15
})
16
];
17
-
18
buildInputs = [ dpkg cups patchelf bash ];
19
-
20
unpackPhase = "true";
21
-
22
installPhase = ''
23
for s in $srcs; do dpkg-deb -x $s $out; done
24
-
25
substituteInPlace $out/opt/brother/Printers/mfcj470dw/cupswrapper/cupswrappermfcj470dw \
26
--replace /opt "$out/opt" \
27
--replace /usr "$out/usr" \
28
--replace /etc "$out/etc"
29
-
30
substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \
31
--replace /opt "$out/opt" \
32
--replace file "/run/current-system/sw/bin/file"
33
-
34
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2
35
-
36
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
37
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/cupswrapper/brcupsconfpt1
38
-
39
mkdir -p $out/lib/cups/filter/
40
ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw
41
'';
42
-
43
meta = {
44
homepage = http://www.brother.com/;
45
-
description = "Driver for brother mfcj470dw pritners to print over WiFi and USB.";
46
license = stdenv.lib.licenses.unfree;
47
platforms = stdenv.lib.platforms.linux;
48
downloadPage = http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj470dw_us_eu_as&os=128;
···
1
+
{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, bash, file }:
2
3
stdenv.mkDerivation rec {
4
name = "mfcj470dw-cupswrapper-${version}";
5
version = "3.0.0-1";
6
+
7
srcs =
8
[ (fetchurl {
9
url = "http://download.brother.com/welcome/dlf006843/mfcj470dwlpr-${version}.i386.deb";
···
14
sha256 = "92af9024e821159eccd78a8925fc77fb92b4f247f2d2c824ca303004077076a7";
15
})
16
];
17
+
18
buildInputs = [ dpkg cups patchelf bash ];
19
+
20
unpackPhase = "true";
21
+
22
installPhase = ''
23
for s in $srcs; do dpkg-deb -x $s $out; done
24
+
25
substituteInPlace $out/opt/brother/Printers/mfcj470dw/cupswrapper/cupswrappermfcj470dw \
26
--replace /opt "$out/opt" \
27
--replace /usr "$out/usr" \
28
--replace /etc "$out/etc"
29
+
30
substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \
31
--replace /opt "$out/opt" \
32
--replace file "/run/current-system/sw/bin/file"
33
+
34
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2
35
+
36
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
37
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/cupswrapper/brcupsconfpt1
38
+
39
mkdir -p $out/lib/cups/filter/
40
ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw
41
'';
42
+
43
meta = {
44
homepage = http://www.brother.com/;
45
+
description = "A driver for brother mfcj470dw printers to print over WiFi and USB";
46
license = stdenv.lib.licenses.unfree;
47
platforms = stdenv.lib.platforms.linux;
48
downloadPage = http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj470dw_us_eu_as&os=128;