diff options
Diffstat (limited to 'pkgs/development/libraries/gdk-pixbuf/default.nix')
-rw-r--r-- | pkgs/development/libraries/gdk-pixbuf/default.nix | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index cbed6a62a3c..93fb05a13b6 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -16,22 +16,18 @@ , libjpeg , libpng , gnome +, gobject-introspection +, buildPackages , doCheck ? false , makeWrapper , lib -, withIntrospection ? (stdenv.buildPlatform == stdenv.hostPlatform) -, gobject-introspection }: -let - withGtkDoc = stdenv.buildPlatform == stdenv.hostPlatform; -in stdenv.mkDerivation rec { pname = "gdk-pixbuf"; version = "2.42.8"; - outputs = [ "out" "dev" "man" ] - ++ lib.optional withGtkDoc "devdoc" + outputs = [ "out" "dev" "man" "devdoc" ] ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) "installedTests"; src = fetchurl { @@ -60,6 +56,7 @@ stdenv.mkDerivation rec { makeWrapper glib gi-docgen + gobject-introspection # for man pages libxslt @@ -67,8 +64,6 @@ stdenv.mkDerivation rec { docbook_xml_dtd_43 ] ++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames - ] ++ lib.optionals withIntrospection [ - gobject-introspection ]; propagatedBuildInputs = [ @@ -79,9 +74,8 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgtk_doc=${lib.boolToString withGtkDoc}" - "-Dintrospection=${if withIntrospection then "enabled" else "disabled"}" "-Dgio_sniffing=false" + "-Dgtk_doc=true" ]; postPatch = '' @@ -89,10 +83,13 @@ stdenv.mkDerivation rec { patchShebangs build-aux substituteInPlace tests/meson.build --subst-var-by installedtestsprefix "$installedTests" - ''; - preInstall = '' - PATH=$PATH:$out/bin # for install script + # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) + # it should be a build-time dep for build + # TODO: send upstream + substituteInPlace docs/meson.build \ + --replace "dependency('gi-docgen'," "dependency('gi-docgen', native:true," \ + --replace "'gi-docgen', req" "'gi-docgen', native:true, req" ''; postInstall = @@ -108,9 +105,9 @@ stdenv.mkDerivation rec { install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f mv $f ''${f%.dylib}.so done - '' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' + '' + '' # We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/ - $dev/bin/gdk-pixbuf-query-loaders --update-cache + ${stdenv.hostPlatform.emulator buildPackages} $dev/bin/gdk-pixbuf-query-loaders --update-cache ''; # The fixDarwinDylibNames hook doesn't patch binaries. @@ -120,7 +117,7 @@ stdenv.mkDerivation rec { done ''; - postFixup = lib.optionalString withGtkDoc '' + postFixup = '' # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. moveToOutput "share/doc" "$devdoc" ''; |