summary refs log tree commit diff
path: root/pkgs/development/libraries/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-05-31 11:41:14 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2018-05-31 12:34:16 -0400
commit85ae7137ac6a1623be90c8f0897566367d300c12 (patch)
tree09b9ff8068e1583f88052e3604bc0c097ad361c3 /pkgs/development/libraries/gdk-pixbuf
parent03b3148beb975645b762bfd9f6961d967a926a5e (diff)
downloadnixpkgs-85ae7137ac6a1623be90c8f0897566367d300c12.tar
nixpkgs-85ae7137ac6a1623be90c8f0897566367d300c12.tar.gz
nixpkgs-85ae7137ac6a1623be90c8f0897566367d300c12.tar.bz2
nixpkgs-85ae7137ac6a1623be90c8f0897566367d300c12.tar.lz
nixpkgs-85ae7137ac6a1623be90c8f0897566367d300c12.tar.xz
nixpkgs-85ae7137ac6a1623be90c8f0897566367d300c12.tar.zst
nixpkgs-85ae7137ac6a1623be90c8f0897566367d300c12.zip
Revert commit 4b2f3971981272b79da7f87b639ca8854a6ea89c
This reverts commit 4b2f3971981272b79da7f87b639ca8854a6ea89c. It
updated gdk_pixbuf to 2.36.12 but unfortunately broke macOS builds.
The new mime sniffing is not working correctly so that .png files
cannot be built.

Fixes #41314

/cc @jtojnar @lnl7
Diffstat (limited to 'pkgs/development/libraries/gdk-pixbuf')
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/default.nix70
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch13
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch18
3 files changed, 17 insertions, 84 deletions
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix
index 849e72d9a97..7660d6481c3 100644
--- a/pkgs/development/libraries/gdk-pixbuf/default.nix
+++ b/pkgs/development/libraries/gdk-pixbuf/default.nix
@@ -4,72 +4,39 @@
 
 let
   pname = "gdk-pixbuf";
-  version = "2.36.12";
+  version = "2.36.7";
+  # TODO: since 2.36.8 gdk-pixbuf gets configured to use mime-type sniffing,
+  # which apparently requires access to shared-mime-info files during runtime.
 in
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
 
-  # TODO: Change back once tests/bug753605-atsize.jpg is part of the dist tarball
-  # src = fetchurl {
-  #   url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
-  #   sha256 = "0d534ysa6n9prd17wwzisq7mj6qkhwh8wcf8qgin1ar3hbs5ry7z";
-  # };
-  src = fetchgit {
-    url = https://gitlab.gnome.org/GNOME/gdk-pixbuf.git;
-    rev = version;
-    sha256 = "18lwqg63vyap2m1mw049rnb8fm869429xbf7636a2n21gs3d3jwv";
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz";
+    sha256 = "1b6e5eef09d98f05f383014ecd3503e25dfb03d7e5b5f5904e5a65b049a6a4d8";
   };
 
-  patches = [
-    # TODO: since 2.36.8 gdk-pixbuf gets configured to use mime-type sniffing,
-    # which requires access to shared-mime-info files during runtime.
-    # For now, we are patching the build script to avoid the dependency.
-    ./no-mime-sniffing.patch
-
-    # Fix installed tests with meson
-    # https://bugzilla.gnome.org/show_bug.cgi?id=795527
-    (fetchurl {
-      url = https://bugzilla.gnome.org/attachment.cgi?id=371381;
-      sha256 = "0nl1cixkjfa5kcfh0laz8h6hdsrpdkxqn7a1k35jrb6zwc9hbydn";
-    })
-
-    # Add missing test file bug753605-atsize.jpg
-    (fetchpatch {
-      url = https://gitlab.gnome.org/GNOME/gdk-pixbuf/commit/87f8f4bf01dfb9982c1ef991e4060a5e19fdb7a7.patch;
-      sha256 = "1slzywwnrzfx3zjzdsxrvp4g2q4skmv50pdfmyccp41j7bfyb2j0";
-    })
-
-    # Move installed tests to a separate output
-    ./installed-tests-path.patch
-  ];
-
-  outputs = [ "out" "dev" "man" "devdoc" "installedTests" ];
+  outputs = [ "out" "dev" "devdoc" ];
 
   setupHook = ./setup-hook.sh;
 
+  enableParallelBuilding = true;
+
   # !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
-  buildInputs = [ libX11 ];
+  buildInputs = [ libX11 gobjectIntrospection ];
 
-  nativeBuildInputs = [
-    meson ninja pkgconfig gettext python3 libxml2 libxslt docbook_xsl docbook_xml_dtd_43
-    gtk-doc gobjectIntrospection makeWrapper
-  ]
+  nativeBuildInputs = [ pkgconfig ]
     ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
 
   propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ];
 
-  mesonFlags = [
-    "-Ddocs=true"
-    "-Djasper=true"
-    "-Dx11=true"
-    "-Dgir=${if gobjectIntrospection != null then "true" else "false"}"
-  ];
-
-  postPatch = ''
-    chmod +x build-aux/* # patchShebangs only applies to executables
-    patchShebangs build-aux
+  configureFlags = "--with-libjasper --with-x11"
+    + stdenv.lib.optionalString (gobjectIntrospection != null) " --enable-introspection=yes"
+    ;
 
-    substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests"
+  # on darwin, tests don't link
+  preBuild = stdenv.lib.optionalString (stdenv.isDarwin && !doCheck) ''
+    substituteInPlace Makefile --replace "docs tests" "docs"
   '';
 
   postInstall =
@@ -77,9 +44,6 @@ stdenv.mkDerivation rec {
     ''
       moveToOutput "bin" "$dev"
       moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
-
-      # We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
-      $dev/bin/gdk-pixbuf-query-loaders --update-cache
     '';
 
   # The fixDarwinDylibNames hook doesn't patch library references or binaries.
diff --git a/pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch b/pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch
deleted file mode 100644
index 1da2b0a10dc..00000000000
--- a/pkgs/development/libraries/gdk-pixbuf/installed-tests-path.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/tests/meson.build
-+++ b/tests/meson.build
-@@ -85,8 +85,8 @@
-   'aero.gif',
- ]
- 
--installed_test_bindir = join_paths(gdk_pixbuf_libexecdir, 'installed-tests', meson.project_name())
--installed_test_datadir = join_paths(gdk_pixbuf_datadir, 'installed-tests', meson.project_name())
-+installed_test_bindir = join_paths('@installedtestsprefix@', 'libexec', 'installed-tests', meson.project_name())
-+installed_test_datadir = join_paths('@installedtestsprefix@', 'share', 'installed-tests', meson.project_name())
- 
- install_data(test_data, install_dir: installed_test_bindir)
- install_subdir('test-images', install_dir: installed_test_bindir)
diff --git a/pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch b/pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch
deleted file mode 100644
index 9896e25acda..00000000000
--- a/pkgs/development/libraries/gdk-pixbuf/no-mime-sniffing.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/meson.build
-+++ b/meson.build
-@@ -186,13 +186,8 @@
- gmodule_dep = dependency('gmodule-no-export-2.0')
- gio_dep = dependency('gio-2.0')
- 
--# On non-Windows/macOS systems we always required shared-mime-info and GIO
--if host_system != 'windows' and host_system != 'darwin'
--  shared_mime_dep = dependency('shared-mime-info')
--  gdk_pixbuf_conf.set('GDK_PIXBUF_USE_GIO_MIME', 1)
--else
--  shared_mime_dep = []
--endif
-+# No MIME sniffing for now
-+shared_mime_dep = []
- 
- gdk_pixbuf_deps = [ mathlib_dep, gobject_dep, gmodule_dep, gio_dep, shared_mime_dep ]
-