From a881d113a98f31a1d30c4ab7a5dc1d692cf6bf77 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 23:34:06 +0100 Subject: [PATCH 01/13] netsurf.buildsystem: build on Darwin --- pkgs/applications/misc/netsurf/buildsystem/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/netsurf/buildsystem/default.nix b/pkgs/applications/misc/netsurf/buildsystem/default.nix index 36d5a70735a7..0560b1d25b3e 100644 --- a/pkgs/applications/misc/netsurf/buildsystem/default.nix +++ b/pkgs/applications/misc/netsurf/buildsystem/default.nix @@ -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; }; } From fdd6153555420b0e49079977f64644fe1d72abfe Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 22:54:09 +0100 Subject: [PATCH 02/13] netsurf.libnsgif: build on Darwin --- pkgs/applications/misc/netsurf/libnsgif/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/netsurf/libnsgif/default.nix b/pkgs/applications/misc/netsurf/libnsgif/default.nix index 4de882243fe2..e826dee0d252 100644 --- a/pkgs/applications/misc/netsurf/libnsgif/default.nix +++ b/pkgs/applications/misc/netsurf/libnsgif/default.nix @@ -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; }; } From 148eae459ba2a8e977474ab886b49b84341518a0 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 14:31:23 +0100 Subject: [PATCH 03/13] poly2tri-c: init at 0.1.0 --- .../libraries/poly2tri-c/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/poly2tri-c/default.nix diff --git a/pkgs/development/libraries/poly2tri-c/default.nix b/pkgs/development/libraries/poly2tri-c/default.nix new file mode 100644 index 000000000000..a3e42b3ae4b2 --- /dev/null +++ b/pkgs/development/libraries/poly2tri-c/default.nix @@ -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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c9a78ab6f00..4f8303a85e85 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5670,6 +5670,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 { }; From 258f6f4437b50a69cea154c154fe5f75a56f84d7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 25 Aug 2019 03:13:13 +0200 Subject: [PATCH 04/13] =?UTF-8?q?gegl=5F0=5F4:=200.4.16=20=E2=86=92=200.4.?= =?UTF-8?q?18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/gegl/blob/GEGL_0_4_18/docs/NEWS.txt#L1-123 Ported to Meson, which means ton of extra dependencies used by default. Though the closure size effect appears to be minimal: 88.9M → 92.9M Also drop GTK dependency, since it is not needed any more (was it ever?) --- pkgs/desktops/gnome-3/default.nix | 3 +- pkgs/development/libraries/gegl/4.0.nix | 118 +++++++++++++++++++++--- pkgs/top-level/all-packages.nix | 6 +- 3 files changed, 108 insertions(+), 19 deletions(-) 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 {}; From c75c6b588ad37c4f300ee6055938a0b5ab7ee8a7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 21:53:28 +0100 Subject: [PATCH 05/13] =?UTF-8?q?gimp:=202.10.12=20=E2=86=92=202.10.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2019/10/31/gimp-2-10-14-released/ --- pkgs/applications/graphics/gimp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index e3994b1b4128..ef0348cbee77 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -9,11 +9,11 @@ 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"; + sha256 = "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz"; }; nativeBuildInputs = [ pkgconfig intltool gettext wrapPython ]; From 43c3f471b8899eaf55e298f81b8cf79b65c0bf7d Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 23:20:09 +0100 Subject: [PATCH 06/13] gimp: format with nixpkgs-format --- pkgs/applications/graphics/gimp/default.nix | 127 +++++++++++++++++--- 1 file changed, 107 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index ef0348cbee77..3eff5642f11a 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -1,9 +1,50 @@ -{ 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; @@ -12,20 +53,66 @@ in stdenv.mkDerivation rec { version = "2.10.14"; src = fetchurl { - url = "http://download.gimp.org/pub/gimp/v${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; + 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,7 +143,7 @@ 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"; @@ -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; From ae21a2bc60bb4338e8d13899605b2378c1d89c87 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 2 Nov 2019 15:42:33 +0100 Subject: [PATCH 07/13] gimp-with-plugins: fix installing custom scripts script-fu (Scheme) scripts are not actually loaded from $GIMP2_PLUGINDIR (lib/gimp/2.10) but $GIMP_DATADIR (share/gimp/2.10). --- pkgs/applications/graphics/gimp/default.nix | 2 +- pkgs/applications/graphics/gimp/wrapper.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 3eff5642f11a..e53deb99b5bd 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -145,7 +145,7 @@ in stdenv.mkDerivation rec { # used for determining plug-in installation paths 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; diff --git a/pkgs/applications/graphics/gimp/wrapper.nix b/pkgs/applications/graphics/gimp/wrapper.nix index d58dc375cb9b..841728d3a294 100644 --- a/pkgs/applications/graphics/gimp/wrapper.nix +++ b/pkgs/applications/graphics/gimp/wrapper.nix @@ -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 From 8da26cc578eaea5b211d424e792408e29186c544 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 04:35:30 +0100 Subject: [PATCH 08/13] gimp-with-plugins: install plug-ins into subdirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GIMP 3 will require all plugins to be installed into their own subdirectories, so let’s just do that now. --- .../applications/graphics/gimp/plugins/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 2c520f21f848..c50d39548c9c 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -8,22 +8,24 @@ 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 []); } From a73ad445a9b4a96eb21b9ad51e0254f5931fe5de Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 11:57:27 +0100 Subject: [PATCH 09/13] gimpPlugins.waveletSharpen: fix build --- pkgs/applications/graphics/gimp/plugins/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index c50d39548c9c..a1bd7eac1536 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -133,6 +133,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"; From 46818a55b1c3bc06d170d2dc21686d27e6e32d34 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 12:01:36 +0100 Subject: [PATCH 10/13] gimpPlugins.gap: fix build --- pkgs/applications/graphics/gimp/plugins/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index a1bd7eac1536..298352421931 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -48,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 From e93c38ff7cc3500e771dde8488330545c660635e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 13:56:21 +0100 Subject: [PATCH 11/13] gimp-with-plugins: pass all script attributes to the pluginDerivation --- pkgs/applications/graphics/gimp/plugins/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 298352421931..c11910da5688 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -31,10 +31,10 @@ let } ); - scriptDerivation = {name, src} : pluginDerivation { - inherit name; phases = "extraLib installPhase"; + scriptDerivation = {src, ...}@attrs : pluginDerivation ({ + phases = [ "extraLib" "installPhase" ]; installPhase = "installScripts ${src}"; - }; + } // attrs); in From f3a81474045e817192b860a45abf357d4a7c0aea Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 13:57:25 +0100 Subject: [PATCH 12/13] gimpPlugin.exposureBlend: mark as broken It produces an error: GIMP-Error: Calling error for procedure 'gimp-image-get-active-layer': Procedure 'gimp-image-get-active-layer' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer. (script-fu:25123): GLib-WARNING **: 12:41:03.500: (../glib/gerror.c:416):g_error_new_valist: runtime check failed: (domain != 0) script-fu-Warning: Error while loading /nix/store/31y1qiyg8fzn07yz6lrnkbja33298gmz-gimp-with-plugins-2.10.14/share/gimp/2.0/scripts/exposure-blend/nds9ds1m18d0wg1b01fch8wyzdwpmr8x-exposure-blend.scm: Error: (/nix/store/31y1qiyg8fzn07yz6lrnkbja33298gmz-gimp-with-plugins-2.10.14/share/gimp/2.0/scripts/exposure-blend/nds9ds1m18d0wg1b01fch8wyzdwpmr8x-exposure-blend.scm : 627) Procedure execution of gimp-image-get-active-layer failed on invalid input arguments: Procedure 'gimp-image-get-active-layer' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer. --- pkgs/applications/graphics/gimp/plugins/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index c11910da5688..29c1445b9ce8 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -199,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 { From 80a5dd7f0277f37b90ccf65b6a94635dd7b45311 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 3 Nov 2019 18:37:39 +0100 Subject: [PATCH 13/13] gegl: fix darwin build ../gegl/opencl/cl_gl.h:37:10: fatal error: 'OpenGL/CGLDevice.h' file not found #include --- pkgs/development/libraries/gegl/4.0.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gegl/4.0.nix b/pkgs/development/libraries/gegl/4.0.nix index 8632035caf7b..2edb47cb9bb4 100644 --- a/pkgs/development/libraries/gegl/4.0.nix +++ b/pkgs/development/libraries/gegl/4.0.nix @@ -28,6 +28,7 @@ , libwebp , luajit , openexr +, OpenCL }: stdenv.mkDerivation rec { @@ -86,7 +87,7 @@ stdenv.mkDerivation rec { gexiv2 luajit openexr - ]; + ] ++ stdenv.lib.optional stdenv.isDarwin OpenCL; # for gegl-4.0.pc propagatedBuildInputs = [ @@ -115,7 +116,8 @@ stdenv.mkDerivation rec { 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; + # 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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a98e59e8b6c6..4b0d6743a7f4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11063,7 +11063,9 @@ in inherit (darwin.apple_sdk.frameworks) OpenGL; }; - gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { }; + gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { + inherit (darwin.apple_sdk.frameworks) OpenCL; + }; geoclue2 = callPackage ../development/libraries/geoclue {};