From ce77225e21f9cf8726d197897ad9a6882a3daecc Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 5 Feb 2024 18:43:41 +0300 Subject: pkgs/kde: init at 6.0.0 / 24.02.0, the Nix bits This is the thing you want to look at. --- pkgs/kde/gear/kdegraphics-thumbnailers/default.nix | 17 +++++++++++++++++ .../gear/kdegraphics-thumbnailers/gs-paths.patch | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/kde/gear/kdegraphics-thumbnailers/default.nix create mode 100644 pkgs/kde/gear/kdegraphics-thumbnailers/gs-paths.patch (limited to 'pkgs/kde/gear/kdegraphics-thumbnailers') 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", -- cgit 1.4.1