From 5787e9a0352e2e200ee4c5de768813a3a41290a5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 18 May 2020 20:26:28 +0200 Subject: [PATCH 1/3] 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 82fbbc967ef..64a1adef0c4 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; }; From 6323002aac02cb9e0c2da30873195b3e2e110334 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 18 May 2020 21:03:24 +0200 Subject: [PATCH 2/3] gdk-pixbuf-xlib: init at 2019-10-19-unstable https://mail.gnome.org/archives/desktop-devel-list/2019-November/msg00009.html --- .../development/libraries/gdk-pixbuf/xlib.nix | 55 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/libraries/gdk-pixbuf/xlib.nix diff --git a/pkgs/development/libraries/gdk-pixbuf/xlib.nix b/pkgs/development/libraries/gdk-pixbuf/xlib.nix new file mode 100644 index 00000000000..e5f1718f075 --- /dev/null +++ b/pkgs/development/libraries/gdk-pixbuf/xlib.nix @@ -0,0 +1,55 @@ +{ stdenv +, fetchFromGitLab +, meson +, ninja +, pkg-config +, docbook-xsl-nons +, docbook_xml_dtd_43 +, gtk-doc +, gdk-pixbuf +, libX11 +}: + +stdenv.mkDerivation rec { + pname = "gdk-pixbuf-xlib"; + version = "2019-10-19-unstable"; + + outputs = [ "out" "dev" "devdoc" ]; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "Archive"; + repo = "gdk-pixbuf-xlib"; + rev = "dc22ea36f69755007c66877284596df270532cc1"; + sha256 = "XhBQ4wano+MtGaqF6JNKoWgYQN6eBW+b8ZCGEBGt8IM="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + docbook-xsl-nons + docbook_xml_dtd_43 + gtk-doc + ]; + + buildInputs = [ + libX11 + ]; + + propagatedBuildInputs = [ + gdk-pixbuf + ]; + + mesonFlags = [ + "-Dgtk_doc=true" + ]; + + meta = with stdenv.lib; { + description = "Deprecated API for integrating GdkPixbuf with Xlib data types"; + homepage = "https://gitlab.gnome.org/Archive/gdk-pixbuf-xlib"; + maintainers = teams.gnome.members; + license = licenses.lgpl21Plus; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e32522158c..0e6b92476a1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12089,6 +12089,8 @@ in gdk-pixbuf = callPackage ../development/libraries/gdk-pixbuf { }; + gdk-pixbuf-xlib = callPackage ../development/libraries/gdk-pixbuf/xlib.nix { }; + gnome-sharp = callPackage ../development/libraries/gnome-sharp { }; gnome-menus = callPackage ../development/libraries/gnome-menus { }; From 80a89002f1ad1d89f8fe926b6ac6aefae169d5b4 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 18 May 2020 21:03:59 +0200 Subject: [PATCH 3/3] gdk-pixbuf: do not build deprecated xlib library It is deprecated and will be removed: https://mail.gnome.org/archives/desktop-devel-list/2019-November/msg00009.html Until then, you can use gdk-pixbuf-xlib package. --- pkgs/development/libraries/gdk-pixbuf/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 64a1adef0c4..08b8f70b2d9 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -16,7 +16,6 @@ , libtiff , libjpeg , libpng -, libX11 , gnome3 , gobject-introspection , doCheck ? false @@ -65,11 +64,6 @@ stdenv.mkDerivation rec { fixDarwinDylibNames ]; - # !!! We might want to factor out the gdk-pixbuf-xlib subpackage. - buildInputs = [ - libX11 - ]; - propagatedBuildInputs = [ glib libtiff @@ -79,7 +73,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Ddocs=true" - "-Dx11=true" + "-Dx11=false" # use gdk-pixbuf-xlib "-Dgir=${if gobject-introspection != null then "true" else "false"}" "-Dgio_sniffing=false" ];