about summary refs log tree commit diff
path: root/pkgs/applications/graphics/gimp
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2023-03-17 14:50:47 +0100
committerJan Tojnar <jtojnar@gmail.com>2023-03-17 14:50:47 +0100
commit94f5d6e5c2b9adf59330681bc661d70d0f7d964c (patch)
tree2984ebf21d711e21f6f873037854b8a675001568 /pkgs/applications/graphics/gimp
parentac718d02867a84b42522a0ece52d841188208f2c (diff)
gimp: Switch to finalAttrs
This will keep the attributes consistent with overrides.
Diffstat (limited to 'pkgs/applications/graphics/gimp')
-rw-r--r--pkgs/applications/graphics/gimp/default.nix20
1 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix
index def4bc2e1bb8b..3b9572a8a982a 100644
--- a/pkgs/applications/graphics/gimp/default.nix
+++ b/pkgs/applications/graphics/gimp/default.nix
@@ -53,14 +53,14 @@
 
 let
   python = python2.withPackages (pp: [ pp.pygtk ]);
-in stdenv.mkDerivation rec {
+in stdenv.mkDerivation (finalAttrs: {
   pname = "gimp";
   version = "2.10.34";
 
   outputs = [ "out" "dev" ];
 
   src = fetchurl {
-    url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
+    url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor finalAttrs.version}/gimp-${finalAttrs.version}.tar.bz2";
     sha256 = "hABGQtNRs5ikKTzX/TWSBEqUTwW7UoUO5gaPJHxleqM=";
   };
 
@@ -165,18 +165,18 @@ in stdenv.mkDerivation rec {
   '';
 
   postFixup = ''
-    wrapProgram $out/bin/gimp-${lib.versions.majorMinor version} \
+    wrapProgram $out/bin/gimp-${lib.versions.majorMinor finalAttrs.version} \
       --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
   '';
 
-  passthru = rec {
+  passthru = {
     # The declarations for `gimp-with-plugins` wrapper,
     # used for determining plug-in installation paths
-    majorVersion = "${lib.versions.major version}.0";
-    targetLibDir = "lib/gimp/${majorVersion}";
-    targetDataDir = "share/gimp/${majorVersion}";
-    targetPluginDir = "${targetLibDir}/plug-ins";
-    targetScriptDir = "${targetDataDir}/scripts";
+    majorVersion = "${lib.versions.major finalAttrs.version}.0";
+    targetLibDir = "lib/gimp/${finalAttrs.passthru.majorVersion}";
+    targetDataDir = "share/gimp/${finalAttrs.passthru.majorVersion}";
+    targetPluginDir = "${finalAttrs.passthru.targetLibDir}/plug-ins";
+    targetScriptDir = "${finalAttrs.passthru.targetDataDir}/scripts";
 
     # probably its a good idea to use the same gtk in plugins ?
     gtk = gtk2;
@@ -190,4 +190,4 @@ in stdenv.mkDerivation rec {
     platforms = platforms.unix;
     mainProgram = "gimp";
   };
-}
+})