From 5787e9a0352e2e200ee4c5de768813a3a41290a5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 18 May 2020 20:26:28 +0200 Subject: [PATCH] gdk-pixbuf: clean up * format with nixpkgs-fmt * reorder the attributes * replace aliases * inline pname & version * add GNOME maintainers * update homepage from devdocs to repo --- .../libraries/gdk-pixbuf/default.nix | 78 ++++++++++++++----- 1 file changed, 58 insertions(+), 20 deletions(-) diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 82fbbc967efc..64a1adef0c4a 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -1,23 +1,44 @@ -{ stdenv, fetchurl, nixosTests, fixDarwinDylibNames, meson, ninja, pkgconfig, gettext, python3, libxml2, libxslt, docbook_xsl -, docbook_xml_dtd_43, gtk-doc, glib, libtiff, libjpeg, libpng, libX11, gnome3 -, gobject-introspection, doCheck ? false, makeWrapper +{ stdenv +, fetchurl +, nixosTests +, fixDarwinDylibNames +, meson +, ninja +, pkg-config +, gettext +, python3 +, libxml2 +, libxslt +, docbook-xsl-nons +, docbook_xml_dtd_43 +, gtk-doc +, glib +, libtiff +, libjpeg +, libpng +, libX11 +, gnome3 +, gobject-introspection +, doCheck ? false +, makeWrapper , fetchpatch }: -let +stdenv.mkDerivation rec { pname = "gdk-pixbuf"; version = "2.40.0"; -in stdenv.mkDerivation rec { - name = "${pname}-${version}"; + + outputs = [ "out" "dev" "man" "devdoc" "installedTests" ]; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "1rnlx9yfw970maxi2x6niaxmih5la11q1ilr7gzshz2kk585k0hm"; }; patches = [ # Move installed tests to a separate output ./installed-tests-path.patch + # Temporary until the fix is released. (fetchpatch { name = "tests-circular-table.patch"; @@ -26,20 +47,35 @@ in stdenv.mkDerivation rec { }) ]; - outputs = [ "out" "dev" "man" "devdoc" "installedTests" ]; - - setupHook = ./setup-hook.sh; + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + python3 + libxml2 + libxslt + docbook-xsl-nons + docbook_xml_dtd_43 + gtk-doc + gobject-introspection + makeWrapper + glib + ] ++ stdenv.lib.optional stdenv.isDarwin [ + fixDarwinDylibNames + ]; # !!! We might want to factor out the gdk-pixbuf-xlib subpackage. - buildInputs = [ libX11 ]; + buildInputs = [ + libX11 + ]; - nativeBuildInputs = [ - meson ninja pkgconfig gettext python3 libxml2 libxslt docbook_xsl docbook_xml_dtd_43 - gtk-doc gobject-introspection makeWrapper glib - ] - ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; - - propagatedBuildInputs = [ glib libtiff libjpeg libpng ]; + propagatedBuildInputs = [ + glib + libtiff + libjpeg + libpng + ]; mesonFlags = [ "-Ddocs=true" @@ -87,6 +123,8 @@ in stdenv.mkDerivation rec { # The tests take an excessive amount of time (> 1.5 hours) and memory (> 6 GB). inherit doCheck; + setupHook = ./setup-hook.sh; + passthru = { updateScript = gnome3.updateScript { packageName = pname; @@ -102,8 +140,8 @@ in stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "A library for image loading and manipulation"; - homepage = "http://library.gnome.org/devel/gdk-pixbuf/"; - maintainers = [ maintainers.eelco ]; + homepage = "https://gitlab.gnome.org/GNOME/gdk-pixbuf"; + maintainers = [ maintainers.eelco ] ++ teams.gnome.members; license = licenses.lgpl21; platforms = platforms.unix; };