gimp: Use env attribute for environment variables
This is in preparation for __structuredAttrs.
This commit is contained in:
parent
29638c4a7e
commit
ed923bb61d
|
@ -154,10 +154,12 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
doCheck = true;
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DGDK_OSX_BIG_SUR=16";
|
||||
env = {
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DGDK_OSX_BIG_SUR=16";
|
||||
|
||||
# Check if librsvg was built with --disable-pixbuf-loader.
|
||||
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
|
||||
# Check if librsvg was built with --disable-pixbuf-loader.
|
||||
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
# The check runs before glib-networking is registered
|
||||
|
|
|
@ -31,26 +31,27 @@ let
|
|||
install -Dt "$pluginDir" "$@"
|
||||
}
|
||||
'';
|
||||
|
||||
# Override installation paths.
|
||||
PKG_CONFIG_GIMP_2_0_GIMPLIBDIR = "${placeholder "out"}/${gimp.targetLibDir}";
|
||||
PKG_CONFIG_GIMP_2_0_GIMPDATADIR = "${placeholder "out"}/${gimp.targetDataDir}";
|
||||
}
|
||||
// attrs
|
||||
// {
|
||||
name = "${gimp.pname}-plugin-${name}";
|
||||
buildInputs = [
|
||||
gimp
|
||||
gimp.gtk
|
||||
glib
|
||||
] ++ (attrs.buildInputs or []);
|
||||
name = "${gimp.pname}-plugin-${name}";
|
||||
buildInputs = [
|
||||
gimp
|
||||
gimp.gtk
|
||||
glib
|
||||
] ++ (attrs.buildInputs or []);
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
intltool
|
||||
] ++ (attrs.nativeBuildInputs or []);
|
||||
}
|
||||
);
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
intltool
|
||||
] ++ (attrs.nativeBuildInputs or []);
|
||||
|
||||
# Override installation paths.
|
||||
env = {
|
||||
PKG_CONFIG_GIMP_2_0_GIMPLIBDIR = "${placeholder "out"}/${gimp.targetLibDir}";
|
||||
PKG_CONFIG_GIMP_2_0_GIMPDATADIR = "${placeholder "out"}/${gimp.targetDataDir}";
|
||||
} // attrs.env or { };
|
||||
});
|
||||
|
||||
scriptDerivation = {src, ...}@attrs : pluginDerivation ({
|
||||
prePhases = "extraLib";
|
||||
|
@ -116,8 +117,13 @@ in
|
|||
url = "https://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2";
|
||||
sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql";
|
||||
};
|
||||
NIX_LDFLAGS = "-lm";
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
env = {
|
||||
NIX_LDFLAGS = "-lm";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "The GIMP Animation Package";
|
||||
homepage = "https://www.gimp.org";
|
||||
|
@ -233,15 +239,19 @@ in
|
|||
pname = "wavelet-sharpen";
|
||||
version = "0.1.2";
|
||||
|
||||
# Workaround build failure on -fno-common toolchains like upstream
|
||||
# gcc-10. Otherwise build fails as:
|
||||
# ld: interface.o:(.bss+0xe0): multiple definition of `fimg'; plugin.o:(.bss+0x40): first defined here
|
||||
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
NIX_LDFLAGS = "-lm";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/pixlsus/registry.gimp.org_static/raw/master/registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz";
|
||||
sha256 = "0vql1k67i21g5ivaa1jh56rg427m0icrkpryrhg75nscpirfxxqw";
|
||||
};
|
||||
|
||||
env = {
|
||||
# Workaround build failure on -fno-common toolchains like upstream
|
||||
# gcc-10. Otherwise build fails as:
|
||||
# ld: interface.o:(.bss+0xe0): multiple definition of `fimg'; plugin.o:(.bss+0x40): first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
NIX_LDFLAGS = "-lm";
|
||||
};
|
||||
|
||||
installPhase = "installPlugin src/wavelet-sharpen"; # TODO translations are not copied .. How to do this on nix?
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue