From c0a963e3cc6bd9c049f6db198a6acf92ee795e4e Mon Sep 17 00:00:00 2001 From: Brandon Dimcheff Date: Mon, 19 Oct 2015 21:07:21 -0400 Subject: cups-filters: make shell string longer (close #10493) The cstring for the shell path is too short for nixos in cups-filters, causing it to be truncated. This was previously fixed in #5428, but regressed. This is a permanent solution accepted even upstream https://bugs.linuxfoundation.org/show_bug.cgi?id=1325 http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7401 --- pkgs/misc/cups/filters.nix | 13 ++++++++----- pkgs/misc/cups/longer-shell-path.patch | 13 +++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 pkgs/misc/cups/longer-shell-path.patch (limited to 'pkgs/misc/cups') 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) + { -- cgit 1.4.1