diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index aa50aa18c401..952f6eaf4f87 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -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 }) diff --git a/pkgs/development/libraries/gegl/4.0.nix b/pkgs/development/libraries/gegl/4.0.nix index 0e3f79b1814c..8632035caf7b 100644 --- a/pkgs/development/libraries/gegl/4.0.nix +++ b/pkgs/development/libraries/gegl/4.0.nix @@ -1,31 +1,121 @@ -{ 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 +}: 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 + ]; + + # 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 + ''; + + doCheck = true; meta = with stdenv.lib; { description = "Graph-based image processing framework"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f8303a85e85..a98e59e8b6c6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3513,7 +3513,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 { }; @@ -11063,9 +11063,7 @@ in inherit (darwin.apple_sdk.frameworks) OpenGL; }; - gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { - gtk = res.gtk2; - }; + gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { }; geoclue2 = callPackage ../development/libraries/geoclue {};