git.iko.soy/typeable/nixpkgs
on master help sign in
Fix compiled-in /bin/bash in foomatic filters

Foomatic filters contained a 64-char c string hardcoded to /bin/bash. This caused some filters (at least pdftops) to fail. I also had to increase the size of the string because nix paths are too long.

commit6a2195c3a5ff2cfb1e5ec0792976cdb609ddb022 authorBrandon Dimcheff <bdimchef-git@wieldim.com> dateSun 21 Dec 2014, 20:33 (12 years ago) parent6a7971b
2 files changed+21−1
pkgs/misc/cups/filters.nix+8−1 pkgs/misc/cups/longer-shell-path.patch+13
pkgs/misc/cups/filters.nix+8−1
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, pkgconfig, cups, poppler, fontconfig
2−, libjpeg, libpng, perl, ijs, qpdf, dbus }:
2+, libjpeg, libpng, perl, ijs, qpdf, dbus, bash }:
33
44stdenv.mkDerivation rec {
55 name = "cups-filters-${version}";
@@ -34,6 +34,13 @@ stdenv.mkDerivation rec {
3434 substituteInPlace filter/gstoraster.c --replace execve execvpe
3535 '';
3636
37+ patches = [ ./longer-shell-path.patch ];
38+
39+ postPatch =
40+ ''
41+ substituteInPlace filter/foomatic-rip/foomaticrip.c --replace "/bin/bash" "${bash}/bin/bash"
42+ '';
43+
3744 postInstall =
3845 ''
3946 for i in $out/lib/cups/filter/{pstopdf,texttops,imagetops}; do
pkgs/misc/cups/longer-shell-path.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/filter/foomatic-rip/foomaticrip.c b/filter/foomatic-rip/foomaticrip.c
2+index 1c019aa..431d2f9 100644
3+--- a/filter/foomatic-rip/foomaticrip.c
4++++ b/filter/foomatic-rip/foomaticrip.c
5+@@ -174,7 +174,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/local/lib/cups/filter:"
6+ "/opt/cups/filter:"
7+ "/usr/lib/cups/filter";
8+
9+-char modern_shell[64] = "/bin/bash";
10++char modern_shell[128] = "/bin/bash";
11+
12+ void config_set_option(const char *key, const char *value)
13+ {