about summary refs log tree commit diff
path: root/pkgs/applications/graphics/gimp/plugins/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/gimp/plugins/default.nix')
-rw-r--r--pkgs/applications/graphics/gimp/plugins/default.nix23
1 files changed, 14 insertions, 9 deletions
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index 2c520f21f848..29c1445b9ce8 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -8,31 +8,33 @@ 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 []);
     }
   );
 
-  scriptDerivation = {name, src} : pluginDerivation {
-    inherit name; phases = "extraLib installPhase";
+  scriptDerivation = {src, ...}@attrs : pluginDerivation ({
+    phases = [ "extraLib" "installPhase" ];
     installPhase = "installScripts ${src}";
-  };
+  } // attrs);
 
 in
 
@@ -46,6 +48,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; {
       url = https://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2;
       sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql";
     };
+    NIX_LDFLAGS = [ "-lm" ];
     patchPhase = ''
       sed -e 's,^\(GIMP_PLUGIN_DIR=\).*,\1'"$out/${gimp.name}-plugins", \
        -e 's,^\(GIMP_DATA_DIR=\).*,\1'"$out/share/${gimp.name}", -i configure
@@ -131,6 +134,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; {
       Filters/Enhance/Wavelet sharpen
     */
     name = "wavelet-sharpen-0.1.2";
+    NIX_LDFLAGS = [ "-lm" ];
     src = fetchurl {
       url = http://registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz;
       sha256 = "0vql1k67i21g5ivaa1jh56rg427m0icrkpryrhg75nscpirfxxqw";
@@ -195,6 +199,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; {
       url = http://tir.astro.utoledo.edu/jdsmith/code/eb/exposure-blend.scm;
       sha256 = "1b6c9wzpklqras4wwsyw3y3jp6fjmhnnskqiwm5sabs8djknfxla";
     };
+    meta.broken = true;
   };
 
   lightning = scriptDerivation {