diff options
author | Domen Kožar <domen@dev.si> | 2014-12-23 21:05:10 +0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2014-12-23 21:05:10 +0100 |
commit | 1980e6225d4d40259784d2d1e0f6023bdc5120cb (patch) | |
tree | 73b7b5b52ac2955939f9f621860035892a8f6362 | |
parent | 83119737597c06844fc47b949af74ca47294c4ed (diff) | |
parent | 139d7f6e1a3aafd79897e0c3997913d412b31308 (diff) | |
download | nixlib-1980e6225d4d40259784d2d1e0f6023bdc5120cb.tar nixlib-1980e6225d4d40259784d2d1e0f6023bdc5120cb.tar.gz nixlib-1980e6225d4d40259784d2d1e0f6023bdc5120cb.tar.bz2 nixlib-1980e6225d4d40259784d2d1e0f6023bdc5120cb.tar.lz nixlib-1980e6225d4d40259784d2d1e0f6023bdc5120cb.tar.xz nixlib-1980e6225d4d40259784d2d1e0f6023bdc5120cb.tar.zst nixlib-1980e6225d4d40259784d2d1e0f6023bdc5120cb.zip |
Merge pull request #5428 from bdimcheff/fix-cups-filter-bash
Fix compiled-in /bin/bash in foomatic filters
-rw-r--r-- | pkgs/misc/cups/filters.nix | 9 | ||||
-rw-r--r-- | pkgs/misc/cups/longer-shell-path.patch | 13 |
2 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/misc/cups/filters.nix b/pkgs/misc/cups/filters.nix index 8a0406203aeb..524662a0ee6c 100644 --- a/pkgs/misc/cups/filters.nix +++ b/pkgs/misc/cups/filters.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, pkgconfig, cups, poppler, fontconfig -, libjpeg, libpng, perl, ijs, qpdf, dbus }: +, libjpeg, libpng, perl, ijs, qpdf, dbus, substituteAll, bash }: stdenv.mkDerivation rec { name = "cups-filters-${version}"; @@ -34,6 +34,13 @@ stdenv.mkDerivation rec { substituteInPlace filter/gstoraster.c --replace execve execvpe ''; + patches = [ + (substituteAll { + src = ./longer-shell-path.patch; + bash = "${bash}/bin/bash"; + }) + ]; + postInstall = '' for i in $out/lib/cups/filter/{pstopdf,texttops,imagetops}; do diff --git a/pkgs/misc/cups/longer-shell-path.patch b/pkgs/misc/cups/longer-shell-path.patch new file mode 100644 index 000000000000..a15fd4832258 --- /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 1c019aa..431d2f9 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] = "/bin/bash"; ++char modern_shell[128] = "@bash@"; + + void config_set_option(const char *key, const char *value) + { |