diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-11-03 04:35:30 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-11-03 14:43:13 +0100 |
commit | 8da26cc578eaea5b211d424e792408e29186c544 (patch) | |
tree | 6ed3c58dfdce2259e90aeb8f885aa048f475077a /pkgs/applications/graphics/gimp | |
parent | ae21a2bc60bb4338e8d13899605b2378c1d89c87 (diff) |
gimp-with-plugins: install plug-ins into subdirs
GIMP 3 will require all plugins to be installed into their own subdirectories, so let’s just do that now.
Diffstat (limited to 'pkgs/applications/graphics/gimp')
-rw-r--r-- | pkgs/applications/graphics/gimp/plugins/default.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 2c520f21f848..c50d39548c9c 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -8,22 +8,24 @@ let inherit (pkgs) stdenv fetchurl pkgconfig intltool glib fetchFromGitHub; inherit (gimp) targetPluginDir targetScriptDir; - pluginDerivation = a: stdenv.mkDerivation ({ + pluginDerivation = a: let + name = a.name or "${a.pname}-${a.version}"; + in stdenv.mkDerivation ({ prePhases = "extraLib"; extraLib = '' installScripts(){ - mkdir -p $out/${targetScriptDir}; - for p in "$@"; do cp "$p" $out/${targetScriptDir}; done + mkdir -p $out/${targetScriptDir}/${name}; + for p in "$@"; do cp "$p" -r $out/${targetScriptDir}/${name}; done } installPlugins(){ - mkdir -p $out/${targetPluginDir}; - for p in "$@"; do cp "$p" $out/${targetPluginDir}; done + mkdir -p $out/${targetPluginDir}/${name}; + for p in "$@"; do cp "$p" -r $out/${targetPluginDir}/${name}; done } ''; } // a // { - name = "gimp-plugin-${a.name or "${a.pname}-${a.version}"}"; + name = "gimp-plugin-${name}"; buildInputs = [ gimp gimp.gtk glib ] ++ (a.buildInputs or []); nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []); } |