about summary refs log tree commit diff
path: root/pkgs/kde/gear/kdegraphics-thumbnailers
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-02-05 18:43:41 +0300
committerK900 <me@0upti.me>2024-02-28 18:49:23 +0300
commitce77225e21f9cf8726d197897ad9a6882a3daecc (patch)
tree64d68e597c2a1875962305608ec42e3b02016b8a /pkgs/kde/gear/kdegraphics-thumbnailers
parentfc40d637fe78d717b7909e710ccb310458c2410f (diff)
downloadnixlib-ce77225e21f9cf8726d197897ad9a6882a3daecc.tar
nixlib-ce77225e21f9cf8726d197897ad9a6882a3daecc.tar.gz
nixlib-ce77225e21f9cf8726d197897ad9a6882a3daecc.tar.bz2
nixlib-ce77225e21f9cf8726d197897ad9a6882a3daecc.tar.lz
nixlib-ce77225e21f9cf8726d197897ad9a6882a3daecc.tar.xz
nixlib-ce77225e21f9cf8726d197897ad9a6882a3daecc.tar.zst
nixlib-ce77225e21f9cf8726d197897ad9a6882a3daecc.zip
pkgs/kde: init at 6.0.0 / 24.02.0, the Nix bits
This is the thing you want to look at.
Diffstat (limited to 'pkgs/kde/gear/kdegraphics-thumbnailers')
-rw-r--r--pkgs/kde/gear/kdegraphics-thumbnailers/default.nix17
-rw-r--r--pkgs/kde/gear/kdegraphics-thumbnailers/gs-paths.patch22
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/kde/gear/kdegraphics-thumbnailers/default.nix b/pkgs/kde/gear/kdegraphics-thumbnailers/default.nix
new file mode 100644
index 000000000000..bfb3ba1fc850
--- /dev/null
+++ b/pkgs/kde/gear/kdegraphics-thumbnailers/default.nix
@@ -0,0 +1,17 @@
+{
+  mkKdeDerivation,
+  substituteAll,
+  ghostscript,
+}:
+mkKdeDerivation {
+  pname = "kdegraphics-thumbnailers";
+
+  patches = [
+    # Hardcode patches to Ghostscript so PDF thumbnails work OOTB.
+    # Intentionally not doing the same for dvips because TeX is big.
+    (substituteAll {
+      gs = "${ghostscript}/bin/gs";
+      src = ./gs-paths.patch;
+    })
+  ];
+}
diff --git a/pkgs/kde/gear/kdegraphics-thumbnailers/gs-paths.patch b/pkgs/kde/gear/kdegraphics-thumbnailers/gs-paths.patch
new file mode 100644
index 000000000000..5aa4a8d7444c
--- /dev/null
+++ b/pkgs/kde/gear/kdegraphics-thumbnailers/gs-paths.patch
@@ -0,0 +1,22 @@
+diff --git a/ps/gscreator.cpp b/ps/gscreator.cpp
+index 5b84e49..cbb7c25 100644
+--- a/ps/gscreator.cpp
++++ b/ps/gscreator.cpp
+@@ -101,7 +101,7 @@ static const char *epsprolog =
+     "[ ] 0 setdash newpath false setoverprint false setstrokeadjust\n";
+ 
+ static const char * gsargs_ps[] = {
+-    "gs",
++    "@gs@",
+     "-sDEVICE=png16m",
+     "-sOutputFile=-",
+     "-dSAFER",
+@@ -120,7 +120,7 @@ static const char * gsargs_ps[] = {
+ };
+ 
+ static const char * gsargs_eps[] = {
+-    "gs",
++    "@gs@",
+     "-sDEVICE=png16m",
+     "-sOutputFile=-",
+     "-dSAFER",