Commit 1c6d1907 authored by Jan Tojnar's avatar Jan Tojnar
Browse files
parent 204057ee
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, fetchpatch2
, pkg-config
, vala
, gobject-introspection
@@ -37,16 +38,25 @@

stdenv.mkDerivation rec {
  pname = "gegl";
  version = "0.4.44";
  version = "0.4.46";

  outputs = [ "out" "dev" "devdoc" ];
  outputBin = "dev";

  src = fetchurl {
    url = "https://download.gimp.org/pub/gegl/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "CkzbQWNeQGoISc0NPwPK99l8q4qhPShwfVMtAInVYSY=";
    url = "https://download.gimp.org/pub/gegl/${lib.versions.majorMinor version}/gegl-${version}.tar.xz";
    hash = "sha256-0LOySBvId0xfPQpIdhGRAWbRju+COoWfuR54Grex6JI=";
  };

  patches = [
    # https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/136
    # Fix missing libm dependency.
    (fetchpatch2 {
      url = "https://gitlab.gnome.org/GNOME/gegl/-/commit/ee970f10f4fe442cbf8a4f5cb94049deab33e786.patch";
      hash = "sha256-0LLKH+Gg+1H83kN7hJGK2u+oLrw7Hxed7R4tTwT3C5s=";
    })
  ];

  nativeBuildInputs = [
    pkg-config
    gettext
@@ -104,10 +114,6 @@ stdenv.mkDerivation rec {
    "-Djasper=disabled"
  ];

  # TODO: Fix missing math symbols in gegl seamless clone.
  # It only appears when we use packaged poly2tri-c instead of vendored one.
  env.NIX_CFLAGS_COMPILE = "-lm";

  postPatch = ''
    chmod +x tests/opencl/opencl_test.sh
    patchShebangs tests/ff-load-save/tests_ff_load_save.sh tests/opencl/opencl_test.sh tools/xml_insert.sh