mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-23 05:37:27 +03:00
gimpPlugins: clean up using gimp.targetLibDir
This commit is contained in:
parent
3000a0f87e
commit
a84a2de0ae
@ -8,8 +8,8 @@ let
|
|||||||
inherit (pkgs) stdenv fetchurl pkgconfig intltool glib fetchFromGitHub;
|
inherit (pkgs) stdenv fetchurl pkgconfig intltool glib fetchFromGitHub;
|
||||||
inherit (gimp) targetPluginDir targetScriptDir;
|
inherit (gimp) targetPluginDir targetScriptDir;
|
||||||
|
|
||||||
pluginDerivation = a: let
|
pluginDerivation = attrs: let
|
||||||
name = a.name or "${a.pname}-${a.version}";
|
name = attrs.name or "${attrs.pname}-${attrs.version}";
|
||||||
in stdenv.mkDerivation ({
|
in stdenv.mkDerivation ({
|
||||||
prePhases = "extraLib";
|
prePhases = "extraLib";
|
||||||
extraLib = ''
|
extraLib = ''
|
||||||
@ -22,12 +22,16 @@ let
|
|||||||
for p in "$@"; do cp "$p" -r $out/${targetPluginDir}/${name}; done
|
for p in "$@"; do cp "$p" -r $out/${targetPluginDir}/${name}; done
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Override installation paths.
|
||||||
|
PKG_CONFIG_GIMP_2_0_GIMPLIBDIR = "${placeholder "out"}/${gimp.targetLibDir}";
|
||||||
|
PKG_CONFIG_GIMP_2_0_GIMPDATADIR = "${placeholder "out"}/${gimp.targetDataDir}";
|
||||||
}
|
}
|
||||||
// a
|
// attrs
|
||||||
// {
|
// {
|
||||||
name = "gimp-plugin-${name}";
|
name = "gimp-plugin-${name}";
|
||||||
buildInputs = [ gimp gimp.gtk glib ] ++ (a.buildInputs or []);
|
buildInputs = [ gimp gimp.gtk glib ] ++ (attrs.buildInputs or []);
|
||||||
nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []);
|
nativeBuildInputs = [ pkgconfig intltool ] ++ (attrs.nativeBuildInputs or []);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -49,10 +53,6 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; {
|
|||||||
sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql";
|
sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql";
|
||||||
};
|
};
|
||||||
NIX_LDFLAGS = "-lm";
|
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
|
|
||||||
'';
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "The GIMP Animation Package";
|
description = "The GIMP Animation Package";
|
||||||
@ -99,7 +99,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; {
|
|||||||
version = "2.0.3";
|
version = "2.0.3";
|
||||||
buildInputs = with pkgs; [ fftw ];
|
buildInputs = with pkgs; [ fftw ];
|
||||||
nativeBuildInputs = with pkgs; [ autoreconfHook ];
|
nativeBuildInputs = with pkgs; [ autoreconfHook ];
|
||||||
makeFlags = [ "GIMP_LIBDIR=${placeholder "out"}/lib/gimp/2.0" ];
|
makeFlags = [ "GIMP_LIBDIR=${placeholder "out"}/${gimp.targetLibDir}" ];
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bootchk";
|
owner = "bootchk";
|
||||||
repo = "resynthesizer";
|
repo = "resynthesizer";
|
||||||
|
Loading…
Reference in New Issue
Block a user