1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

Merge pull request #72386 from jtojnar/gimp-2.10.14

gimp: 2.10.12 → 2.10.14
This commit is contained in:
Jan Tojnar 2019-11-03 21:48:13 +01:00 committed by GitHub
commit 3df93dbe0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 281 additions and 51 deletions

View file

@ -1,31 +1,118 @@
{ stdenv, fetchurl, substituteAll, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk-pixbuf, isocodes
, pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, poppler_data, libtiff
, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, shared-mime-info
, python2Packages, libexif, gettext, xorg, glib-networking, libmypaint, gexiv2
, harfbuzz, mypaint-brushes, libwebp, libheif, libgudev, openexr
, AppKit, Cocoa, gtk-mac-integration-gtk2 }:
{ stdenv
, lib
, fetchurl
, substituteAll
, pkgconfig
, intltool
, babl
, gegl
, gtk2
, glib
, gdk-pixbuf
, isocodes
, pango
, cairo
, freetype
, fontconfig
, lcms
, libpng
, libjpeg
, poppler
, poppler_data
, libtiff
, libmng
, librsvg
, libwmf
, zlib
, libzip
, ghostscript
, aalib
, shared-mime-info
, python2Packages
, libexif
, gettext
, xorg
, glib-networking
, libmypaint
, gexiv2
, harfbuzz
, mypaint-brushes
, libwebp
, libheif
, libgudev
, openexr
, AppKit
, Cocoa
, gtk-mac-integration-gtk2
}:
let
inherit (python2Packages) pygtk wrapPython python;
in stdenv.mkDerivation rec {
pname = "gimp";
version = "2.10.12";
version = "2.10.14";
src = fetchurl {
url = "http://download.gimp.org/pub/gimp/v${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "0wdcr8d2ink4swn5r4v13bsiya6s3xm4ya97sdbhs4l40y7bb03x";
url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz";
};
nativeBuildInputs = [ pkgconfig intltool gettext wrapPython ];
propagatedBuildInputs = [ gegl ]; # needed by gimp-2.0.pc
nativeBuildInputs = [
pkgconfig
intltool
gettext
wrapPython
];
buildInputs = [
babl gegl gtk2 glib gdk-pixbuf pango cairo gexiv2 harfbuzz isocodes
freetype fontconfig lcms libpng libjpeg poppler poppler_data libtiff openexr
libmng librsvg libwmf zlib libzip ghostscript aalib shared-mime-info libwebp libheif
python pygtk libexif xorg.libXpm glib-networking libmypaint mypaint-brushes
] ++ stdenv.lib.optionals stdenv.isDarwin [
AppKit Cocoa gtk-mac-integration-gtk2
] ++ stdenv.lib.optionals stdenv.isLinux [ libgudev ];
babl
gegl
gtk2
glib
gdk-pixbuf
pango
cairo
gexiv2
harfbuzz
isocodes
freetype
fontconfig
lcms
libpng
libjpeg
poppler
poppler_data
libtiff
openexr
libmng
librsvg
libwmf
zlib
libzip
ghostscript
aalib
shared-mime-info
libwebp
libheif
python
pygtk
libexif
xorg.libXpm
glib-networking
libmypaint
mypaint-brushes
] ++ lib.optionals stdenv.isDarwin [
AppKit
Cocoa
gtk-mac-integration-gtk2
] ++ lib.optionals stdenv.isLinux [
libgudev
];
# needed by gimp-2.0.pc
propagatedBuildInputs = [
gegl
];
pythonPath = [ pygtk ];
@ -48,7 +135,7 @@ in stdenv.mkDerivation rec {
postFixup = ''
wrapPythonProgramsIn $out/lib/gimp/${passthru.majorVersion}/plug-ins/
wrapProgram $out/bin/gimp-${stdenv.lib.versions.majorMinor version} \
wrapProgram $out/bin/gimp-${lib.versions.majorMinor version} \
--prefix PYTHONPATH : "$PYTHONPATH" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
'';
@ -56,9 +143,9 @@ in stdenv.mkDerivation rec {
passthru = rec {
# The declarations for `gimp-with-plugins` wrapper,
# used for determining plug-in installation paths
majorVersion = "${stdenv.lib.versions.major version}.0";
majorVersion = "${lib.versions.major version}.0";
targetPluginDir = "lib/gimp/${majorVersion}/plug-ins";
targetScriptDir = "lib/gimp/${majorVersion}/scripts";
targetScriptDir = "share/gimp/${majorVersion}/scripts";
# probably its a good idea to use the same gtk in plugins ?
gtk = gtk2;
@ -76,9 +163,9 @@ in stdenv.mkDerivation rec {
enableParallelBuilding = true;
meta = with stdenv.lib; {
meta = with lib; {
description = "The GNU Image Manipulation Program";
homepage = https://www.gimp.org/;
homepage = "https://www.gimp.org/";
maintainers = with maintainers; [ jtojnar ];
license = licenses.gpl3Plus;
platforms = platforms.unix;

View file

@ -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 {

View file

@ -17,6 +17,7 @@ in symlinkJoin {
for each in gimp-${versionBranch} gimp-console-${versionBranch}; do
wrapProgram $out/bin/$each \
--set GIMP2_PLUGINDIR "$out/lib/gimp/2.0" \
--set GIMP2_DATADIR "$out/share/gimp/2.0" \
--prefix GTK_PATH : "${gnome3.gnome-themes-extra}/lib/gtk-2.0" \
${toString extraArgs}
done

View file

@ -19,6 +19,6 @@ stdenv.mkDerivation rec {
description = "Build system for netsurf browser";
license = licenses.gpl2;
maintainers = [ maintainers.vrthra ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View file

@ -26,6 +26,6 @@ stdenv.mkDerivation rec {
description = "GIF Decoder for netsurf browser";
license = licenses.gpl2;
maintainers = [ maintainers.vrthra ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View file

@ -24,7 +24,6 @@ lib.makeScope pkgs.newScope (self: with self; {
libsoup = pkgs.libsoup.override { gnomeSupport = true; };
libchamplain = pkgs.libchamplain.override { libsoup = libsoup; };
gnome3 = self // { recurseForDerivations = false; };
gegl_0_4 = pkgs.gegl_0_4.override { gtk = pkgs.gtk3; };
# ISO installer
# installerIso = callPackage ./installer.nix {};
@ -359,4 +358,6 @@ lib.makeScope pkgs.newScope (self: with self; {
nautilus-sendto = throw "deprecated 2019-09-17: abandoned";
inherit (pkgs) vala; # added 2019-10-10
inherit (pkgs) gegl_0_4; # added 2019-10-31
})

View file

@ -1,31 +1,123 @@
{ stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg, which
, librsvg, pango, gtk, bzip2, json-glib, gettext, autoreconfHook, libraw
, gexiv2, libwebp, libintl }:
{ stdenv
, fetchurl
, fetchpatch
, pkgconfig
, vala
, gobject-introspection
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_43
, glib
, babl
, libpng
, cairo
, libjpeg
, librsvg
, lensfun
, libspiro
, netsurf
, pango
, poly2tri-c
, bzip2
, json-glib
, gettext
, meson
, ninja
, libraw
, gexiv2
, libwebp
, luajit
, openexr
, OpenCL
}:
stdenv.mkDerivation rec {
pname = "gegl";
version = "0.4.16";
version = "0.4.18";
outputs = [ "out" "dev" "devdoc" ];
outputBin = "dev";
src = fetchurl {
url = "https://download.gimp.org/pub/gegl/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "0njydcr6qdmfzh4fxx544681qxdpf7y6b2f47jcypn810dlxy4h1";
url = "https://download.gimp.org/pub/gegl/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0r6akqnrkvxizyhyi8sv40mxm7j4bcwjb6mqjpxy0zzbbfsdyin9";
};
enableParallelBuilding = true;
patches = [
# Fix arch detection.
# https://gitlab.gnome.org/GNOME/gegl/merge_requests/53
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gegl/commit/6bcf95fd0f32cf5e8b1ddbe17b14d9ad049bded8.patch";
sha256 = "0aqdr3y5mr47wq44jnhp97188bvpjlf56zrlmn8aazdf07r2apma";
})
doCheck = true;
buildInputs = [
libpng cairo libjpeg librsvg pango gtk bzip2
libraw libwebp gexiv2
# Fix Darwin build.
# https://gitlab.gnome.org/GNOME/gegl/merge_requests/54
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gegl/commit/2bc06bfedee4fb25f6a966c8235b75292e24e55f.patch";
sha256 = "1psls61wsrdq5pzpvj22mrm46lpzrw3wkx6li7dv6fyb65wz2n4d";
})
];
propagatedBuildInputs = [ glib json-glib babl ]; # for gegl-4.0.pc
nativeBuildInputs = [
pkgconfig
gettext
meson
ninja
vala
gobject-introspection
gtk-doc
docbook_xsl
docbook_xml_dtd_43
];
nativeBuildInputs = [ pkgconfig gettext which autoreconfHook libintl ];
buildInputs = [
libpng
cairo
libjpeg
librsvg
lensfun
libspiro
netsurf.libnsgif
pango
poly2tri-c
bzip2
libraw
libwebp
gexiv2
luajit
openexr
] ++ stdenv.lib.optional stdenv.isDarwin OpenCL;
# for gegl-4.0.pc
propagatedBuildInputs = [
glib
json-glib
babl
];
mesonFlags = [
"-Ddocs=true"
"-Dmrg=disabled" # not sure what that is
"-Dsdl2=disabled"
"-Dpygobject=disabled"
"-Dlibav=disabled"
"-Dlibv4l=disabled"
"-Dlibv4l2=disabled"
"-Dumfpack=disabled"
];
# TODO: Fix missing math symbols in gegl seamless clone.
# It only appears when we use packaged poly2tri-c instead of vendored one.
NIX_CFLAGS_COMPILE = [ "-lm" ];
postPatch = ''
chmod +x tests/opencl/opencl_test.sh tests/buffer/buffer-tests-run.sh
patchShebangs tests/ff-load-save/tests_ff_load_save.sh tests/opencl/opencl_test.sh tests/buffer/buffer-tests-run.sh tools/xml_insert.sh
'';
# tests fail to connect to the com.apple.fonts daemon in sandboxed mode
doCheck = !stdenv.isDarwin;
meta = with stdenv.lib; {
description = "Graph-based image processing framework";

View file

@ -0,0 +1,42 @@
{ stdenv
, fetchFromGitHub
, autoreconfHook
, pkgconfig
, glib
}:
stdenv.mkDerivation rec {
pname = "poly2tri-c";
version = "0.1.0";
outputs = [ "bin" "out" "dev" ];
src = fetchFromGitHub {
owner = "Paul-Browne";
repo = "poly2tri-c";
rev = "p2tc-${version}";
sha256 = "158vm3wqfxs22b74kqc4prlvjny38qqm3kz5wrgasmx0qciwh0g8";
};
nativeBuildInputs = [
autoreconfHook
pkgconfig
];
buildInputs = [
glib
];
NIX_CFLAGS_COMPILE = [
"--std=gnu99"
"-Wno-error"
];
meta = with stdenv.lib; {
description = "Library for generating, refining and rendering 2-Dimensional Constrained Delaunay Triangulations";
homepage = "https://code.google.com/archive/p/poly2tri-c/";
license = licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}

View file

@ -3524,7 +3524,7 @@ in
gnome-podcasts = callPackage ../applications/audio/gnome-podcasts { };
gnome-photos = callPackage ../applications/graphics/gnome-photos {
gegl = gnome3.gegl_0_4;
gegl = gegl_0_4;
};
gnokii = callPackage ../tools/misc/gnokii { };
@ -5681,6 +5681,8 @@ in
polkit_gnome = callPackage ../tools/security/polkit-gnome { };
poly2tri-c = callPackage ../development/libraries/poly2tri-c { };
polysh = callPackage ../tools/networking/polysh { };
ponysay = callPackage ../tools/misc/ponysay { };
@ -11077,7 +11079,7 @@ in
};
gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix {
gtk = res.gtk2;
inherit (darwin.apple_sdk.frameworks) OpenCL;
};
geoclue2 = callPackage ../development/libraries/geoclue {};