diff --git a/pkgs/development/libraries/babl/default.nix b/pkgs/development/libraries/babl/default.nix index eff6ff626325..d95797d5a5f6 100644 --- a/pkgs/development/libraries/babl/default.nix +++ b/pkgs/development/libraries/babl/default.nix @@ -1,15 +1,41 @@ -{ stdenv, fetchurl }: +{ stdenv +, fetchurl +, meson +, ninja +, pkgconfig +, gobject-introspection +, lcms2 +}: stdenv.mkDerivation rec { pname = "babl"; - version = "0.1.66"; + version = "0.1.72"; + + outputs = [ "out" "dev" ]; src = fetchurl { - url = "https://ftp.gtk.org/pub/babl/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; - sha256 = "0qx1dwbinxihwl2lmxi60qiqi402jlrdcnixx14kk6j88n9xi79n"; + url = "https://download.gimp.org/pub/babl/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0hkagjrnza77aasa1kss5hvy37ndm50y6i7hkdn2z8hzgc4i3qb4"; }; - doCheck = true; + patches = [ + # Apple linker does not know --version-script flag + # https://gitlab.gnome.org/GNOME/babl/merge_requests/26 + ./fix-darwin.patch + ]; + + nativeBuildInputs = [ + meson + ninja + pkgconfig + gobject-introspection + ]; + + buildInputs = [ + lcms2 + ]; + + doCheck = !stdenv.isDarwin; meta = with stdenv.lib; { description = "Image pixel format conversion library"; diff --git a/pkgs/development/libraries/babl/fix-darwin.patch b/pkgs/development/libraries/babl/fix-darwin.patch new file mode 100644 index 000000000000..eaeff63689fc --- /dev/null +++ b/pkgs/development/libraries/babl/fix-darwin.patch @@ -0,0 +1,16 @@ +diff --git a/babl/meson.build b/babl/meson.build +index b551c9a..f452435 100644 +--- a/babl/meson.build ++++ b/babl/meson.build +@@ -24,9 +24,9 @@ + ] + + # Linker arguments +-babl_link_args = [ ++babl_link_args = cc.get_supported_link_arguments([ + '-Wl,--version-script,' + version_script, +-] ++]) + if platform_win32 + babl_link_args += '-Wl,--no-undefined' + endif