3
0
Fork 0
forked from mirrors/nixpkgs

gimp: Switch to finalAttrs

This will keep the attributes consistent with overrides.
This commit is contained in:
Jan Tojnar 2023-03-17 14:50:47 +01:00
parent ac718d0286
commit 94f5d6e5c2

View file

@ -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";
};
}
})