libsForQt5.kdegraphics-thumbnailers: hardcode Ghostscript path

Fixes #153983.

K900 f2c59d34 ade134ec

+46 -15
+1 -1
pkgs/applications/kde/default.nix
··· 120 120 kdebugsettings = callPackage ./kdebugsettings.nix {}; 121 121 kdeconnect-kde = callPackage ./kdeconnect-kde.nix {}; 122 122 kdegraphics-mobipocket = callPackage ./kdegraphics-mobipocket.nix {}; 123 - kdegraphics-thumbnailers = callPackage ./kdegraphics-thumbnailers.nix {}; 123 + kdegraphics-thumbnailers = callPackage ./kdegraphics-thumbnailers {}; 124 124 kdenetwork-filesharing = callPackage ./kdenetwork-filesharing.nix {}; 125 125 kdenlive = callPackage ./kdenlive {}; 126 126 kdepim-addons = callPackage ./kdepim-addons.nix {};
-14
pkgs/applications/kde/kdegraphics-thumbnailers.nix
··· 1 - { 2 - mkDerivation, lib, fetchpatch, 3 - extra-cmake-modules, karchive, kio, libkexiv2, libkdcraw, kdegraphics-mobipocket 4 - }: 5 - 6 - mkDerivation { 7 - pname = "kdegraphics-thumbnailers"; 8 - meta = { 9 - license = [ lib.licenses.lgpl21 ]; 10 - maintainers = [ lib.maintainers.ttuegel ]; 11 - }; 12 - nativeBuildInputs = [ extra-cmake-modules ]; 13 - buildInputs = [ karchive kio libkexiv2 libkdcraw kdegraphics-mobipocket ]; 14 - }
+23
pkgs/applications/kde/kdegraphics-thumbnailers/default.nix
··· 1 + { 2 + mkDerivation, lib, ghostscript, substituteAll, 3 + extra-cmake-modules, karchive, kio, libkexiv2, libkdcraw, kdegraphics-mobipocket 4 + }: 5 + 6 + mkDerivation { 7 + pname = "kdegraphics-thumbnailers"; 8 + meta = { 9 + license = [ lib.licenses.lgpl21 ]; 10 + maintainers = [ lib.maintainers.ttuegel ]; 11 + }; 12 + nativeBuildInputs = [ extra-cmake-modules ]; 13 + buildInputs = [ karchive kio libkexiv2 libkdcraw kdegraphics-mobipocket ]; 14 + 15 + patches = [ 16 + # Hardcode patches to Ghostscript so PDF thumbnails work OOTB. 17 + # Intentionally not doing the same for dvips because TeX is big. 18 + (substituteAll { 19 + gs = "${ghostscript}/bin/gs"; 20 + src = ./gs-paths.patch; 21 + }) 22 + ]; 23 + }
+22
pkgs/applications/kde/kdegraphics-thumbnailers/gs-paths.patch
··· 1 + diff --git a/ps/gscreator.cpp b/ps/gscreator.cpp 2 + index 5b84e49..cbb7c25 100644 3 + --- a/ps/gscreator.cpp 4 + +++ b/ps/gscreator.cpp 5 + @@ -101,7 +101,7 @@ static const char *epsprolog = 6 + "[ ] 0 setdash newpath false setoverprint false setstrokeadjust\n"; 7 + 8 + static const char * gsargs_ps[] = { 9 + - "gs", 10 + + "@gs@", 11 + "-sDEVICE=png16m", 12 + "-sOutputFile=-", 13 + "-dSAFER", 14 + @@ -120,7 +120,7 @@ static const char * gsargs_ps[] = { 15 + }; 16 + 17 + static const char * gsargs_eps[] = { 18 + - "gs", 19 + + "@gs@", 20 + "-sDEVICE=png16m", 21 + "-sOutputFile=-", 22 + "-dSAFER",