2021-07-04 02:40:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-11-03 02:18:15 +00:00
|
|
|
, fetchurl
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2021-07-04 02:40:35 +00:00
|
|
|
, vala
|
2024-02-29 20:09:43 +00:00
|
|
|
, gi-docgen
|
2021-07-04 02:40:35 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, glib
|
2020-11-03 02:18:15 +00:00
|
|
|
, babl
|
|
|
|
, libpng
|
2022-11-21 17:40:18 +00:00
|
|
|
, llvmPackages
|
2020-11-03 02:18:15 +00:00
|
|
|
, cairo
|
|
|
|
, libjpeg
|
|
|
|
, librsvg
|
2021-07-04 02:40:35 +00:00
|
|
|
, lensfun
|
|
|
|
, libspiro
|
|
|
|
, maxflow
|
|
|
|
, netsurf
|
2020-11-03 02:18:15 +00:00
|
|
|
, pango
|
2021-07-04 02:40:35 +00:00
|
|
|
, poly2tri-c
|
|
|
|
, poppler
|
2020-11-03 02:18:15 +00:00
|
|
|
, bzip2
|
2021-07-04 02:40:35 +00:00
|
|
|
, json-glib
|
|
|
|
, gettext
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, libraw
|
|
|
|
, gexiv2
|
|
|
|
, libwebp
|
|
|
|
, luajit
|
|
|
|
, openexr
|
|
|
|
, OpenCL
|
|
|
|
, suitesparse
|
2024-06-05 15:53:02 +00:00
|
|
|
, withLuaJIT ? lib.meta.availableOn stdenv.hostPlatform luajit
|
2021-07-04 02:40:35 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-03 02:18:15 +00:00
|
|
|
pname = "gegl";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.4.48";
|
2021-07-04 02:40:35 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
outputBin = "dev";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://download.gimp.org/pub/gegl/${lib.versions.majorMinor version}/gegl-${version}.tar.xz";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-QYwm2UvogF19mPbeDGglyia9dPystsGI2kdTPZ7igkc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
vala
|
|
|
|
gobject-introspection
|
2024-02-29 20:09:43 +00:00
|
|
|
gi-docgen
|
2021-07-04 02:40:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libpng
|
|
|
|
cairo
|
|
|
|
libjpeg
|
|
|
|
librsvg
|
|
|
|
lensfun
|
|
|
|
libspiro
|
|
|
|
maxflow
|
|
|
|
netsurf.libnsgif
|
|
|
|
pango
|
|
|
|
poly2tri-c
|
|
|
|
poppler
|
|
|
|
bzip2
|
|
|
|
libraw
|
|
|
|
libwebp
|
|
|
|
gexiv2
|
|
|
|
openexr
|
|
|
|
suitesparse
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2022-11-21 17:40:18 +00:00
|
|
|
OpenCL
|
|
|
|
] ++ lib.optionals stdenv.cc.isClang [
|
|
|
|
llvmPackages.openmp
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals withLuaJIT [
|
|
|
|
luajit
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
2021-07-04 02:40:35 +00:00
|
|
|
|
|
|
|
# for gegl-4.0.pc
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
glib
|
|
|
|
json-glib
|
|
|
|
babl
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dmrg=disabled" # not sure what that is
|
|
|
|
"-Dsdl2=disabled"
|
|
|
|
"-Dpygobject=disabled"
|
|
|
|
"-Dlibav=disabled"
|
|
|
|
"-Dlibv4l=disabled"
|
|
|
|
"-Dlibv4l2=disabled"
|
|
|
|
# Disabled due to multiple vulnerabilities, see
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/73586
|
|
|
|
"-Djasper=disabled"
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (!withLuaJIT) [
|
|
|
|
"-Dlua=disabled"
|
2021-07-04 02:40:35 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
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
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postFixup = ''
|
|
|
|
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
|
|
|
moveToOutput "share/doc" "$devdoc"
|
|
|
|
'';
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
# tests fail to connect to the com.apple.fonts daemon in sandboxed mode
|
2024-09-26 11:04:55 +00:00
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Graph-based image processing framework";
|
2020-11-03 02:18:15 +00:00
|
|
|
homepage = "https://www.gegl.org";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|