diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-11-20 14:32:58 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-11-20 14:32:58 +0100 |
commit | 333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb (patch) | |
tree | 0f4757ddd2bb3d73b438eea85828d8e01c049583 /pkgs/misc/cups | |
parent | bdbbfa0d4247e203ffe3171621b614374da05f70 (diff) | |
parent | b809f886c0bdbd4665fc65a4c308d38a30c368d8 (diff) | |
download | nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.gz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.bz2 nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.lz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.xz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.zst nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.zip |
Merge staging into closure-size
The most complex problems were from dealing with switches reverted in the meantime (gcc5, gmp6, ncurses6). It's likely that darwin is (still) broken nontrivially.
Diffstat (limited to 'pkgs/misc/cups')
-rw-r--r-- | pkgs/misc/cups/drivers/mfcj470dw/default.nix | 50 | ||||
-rw-r--r-- | pkgs/misc/cups/filters.nix | 13 | ||||
-rw-r--r-- | pkgs/misc/cups/longer-shell-path.patch | 13 |
3 files changed, 71 insertions, 5 deletions
diff --git a/pkgs/misc/cups/drivers/mfcj470dw/default.nix b/pkgs/misc/cups/drivers/mfcj470dw/default.nix new file mode 100644 index 000000000000..d1a1b239371a --- /dev/null +++ b/pkgs/misc/cups/drivers/mfcj470dw/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, bash, file }: + +stdenv.mkDerivation rec { + name = "mfcj470dw-cupswrapper-${version}"; + version = "3.0.0-1"; + + srcs = + [ (fetchurl { + url = "http://download.brother.com/welcome/dlf006843/mfcj470dwlpr-${version}.i386.deb"; + sha256 = "7202dd895d38d50bb767080f2995ed350eed99bc2b7871452c3c915c8eefc30a"; + }) + (fetchurl { + url = "http://download.brother.com/welcome/dlf006845/mfcj470dwcupswrapper-${version}.i386.deb"; + sha256 = "92af9024e821159eccd78a8925fc77fb92b4f247f2d2c824ca303004077076a7"; + }) + ]; + + buildInputs = [ dpkg cups patchelf bash ]; + + unpackPhase = "true"; + + installPhase = '' + for s in $srcs; do dpkg-deb -x $s $out; done + + substituteInPlace $out/opt/brother/Printers/mfcj470dw/cupswrapper/cupswrappermfcj470dw \ + --replace /opt "$out/opt" \ + --replace /usr "$out/usr" \ + --replace /etc "$out/etc" + + substituteInPlace $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw \ + --replace /opt "$out/opt" \ + --replace file "/run/current-system/sw/bin/file" + + sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2 + + 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 + + mkdir -p $out/lib/cups/filter/ + ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw + ''; + + meta = { + homepage = http://www.brother.com/; + description = "A driver for brother mfcj470dw printers to print over WiFi and USB"; + license = stdenv.lib.licenses.unfree; + platforms = stdenv.lib.platforms.linux; + downloadPage = http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=mfcj470dw_us_eu_as&os=128; + }; +} diff --git a/pkgs/misc/cups/filters.nix b/pkgs/misc/cups/filters.nix index a860273e9eb5..b4b3a5a06247 100644 --- a/pkgs/misc/cups/filters.nix +++ b/pkgs/misc/cups/filters.nix @@ -10,11 +10,14 @@ stdenv.mkDerivation rec { sha256 = "07wwlqcykfjfqcwj1bxk60ggahyaw7wcx32n5s104d1qkhham01i"; }; - patches = [(fetchpatch { # drop on update - name = "poppler-0.34.patch"; - url = "https://bugs.linuxfoundation.org/attachment.cgi?id=493"; - sha256 = "18za83q0b0n4hpvvw76jsv0hm89zmijvps2z5kg1srickqlxj891"; - })]; + patches = [ + ./longer-shell-path.patch + (fetchpatch { # drop on update + name = "poppler-0.34.patch"; + url = "https://bugs.linuxfoundation.org/attachment.cgi?id=493"; + sha256 = "18za83q0b0n4hpvvw76jsv0hm89zmijvps2z5kg1srickqlxj891"; + }) + ]; buildInputs = [ pkgconfig cups poppler poppler_utils fontconfig libjpeg libpng perl diff --git a/pkgs/misc/cups/longer-shell-path.patch b/pkgs/misc/cups/longer-shell-path.patch new file mode 100644 index 000000000000..397cc681732b --- /dev/null +++ b/pkgs/misc/cups/longer-shell-path.patch @@ -0,0 +1,13 @@ +diff --git a/filter/foomatic-rip/foomaticrip.c b/filter/foomatic-rip/foomaticrip.c +index 90a851c..689a2bd 100644 +--- a/filter/foomatic-rip/foomaticrip.c ++++ b/filter/foomatic-rip/foomaticrip.c +@@ -174,7 +174,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/local/lib/cups/filter:" + "/opt/cups/filter:" + "/usr/lib/cups/filter"; + +-char modern_shell[64] = SHELL; ++char modern_shell[] = SHELL; + + void config_set_option(const char *key, const char *value) + { |