From 3d1a53e4a4e33a02be134daf81b4b4b0447fef13 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 20 Feb 2022 19:56:13 +0100 Subject: [PATCH 1/3] librest: propagate dependencies listed in Required These are listed in the pkg-config file so we need to propagate them for them to be found. Also split outputs to avoid dev outputs of propagated dependencies in the closure. --- pkgs/development/libraries/librest/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/librest/default.nix b/pkgs/development/libraries/librest/default.nix index 0c885f0764b5..292558e45947 100644 --- a/pkgs/development/libraries/librest/default.nix +++ b/pkgs/development/libraries/librest/default.nix @@ -4,6 +4,7 @@ , pkg-config , glib , libsoup +, libxml2 , gobject-introspection , gnome }: @@ -12,6 +13,8 @@ stdenv.mkDerivation rec { pname = "rest"; version = "0.8.1"; + outputs = [ "out" "dev" ]; + src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "0513aad38e5d3cedd4ae3c551634e3be1b9baaa79775e53b2dba9456f15b01c9"; @@ -22,9 +25,10 @@ stdenv.mkDerivation rec { gobject-introspection ]; - buildInputs = [ + propagatedBuildInputs = [ glib libsoup + libxml2 ]; configureFlags = [ From 0c68f9b952c73d9306fc10e506885d59fc4d68f4 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 20 Feb 2022 19:58:50 +0100 Subject: [PATCH 2/3] librest: build developer docs --- pkgs/development/libraries/librest/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/librest/default.nix b/pkgs/development/libraries/librest/default.nix index 292558e45947..ce2df9cc9a8a 100644 --- a/pkgs/development/libraries/librest/default.nix +++ b/pkgs/development/libraries/librest/default.nix @@ -6,6 +6,9 @@ , libsoup , libxml2 , gobject-introspection +, gtk-doc +, docbook-xsl-nons +, docbook_xml_dtd_412 , gnome }: @@ -13,7 +16,7 @@ stdenv.mkDerivation rec { pname = "rest"; version = "0.8.1"; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; @@ -23,6 +26,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config gobject-introspection + gtk-doc + docbook-xsl-nons + docbook_xml_dtd_412 ]; propagatedBuildInputs = [ @@ -32,6 +38,7 @@ stdenv.mkDerivation rec { ]; configureFlags = [ + "--enable-gtk-doc" # Remove when https://gitlab.gnome.org/GNOME/librest/merge_requests/2 is merged. "--with-ca-certificates=/etc/ssl/certs/ca-certificates.crt" ]; From e70d829bdb9f51d82e1ef54e444964e6dcf5ed3c Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 20 Feb 2022 12:05:21 +0100 Subject: [PATCH 3/3] libgovirt: clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split outputs to prevent closure contamination with propagated dependencies’ dev outputs. - Use mirror URL. - Add update script (also change source URL so it can be auto-updated). - Correct dependencies: - Even though glib is propagated by other dependencies, let’s add it here as well for completeness. - libsoup should not need to be propagated. - Add gobject-introspection (on by default with meson). - Use correct non-deprecated license. - Reduce scope of lib. Ideally, we would also switch to Meson but it currently specifies dependencies incorrectly: https://gitlab.gnome.org/GNOME/libgovirt/-/merge_requests/15 --- .../virtualization/libgovirt/default.nix | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/virtualization/libgovirt/default.nix b/pkgs/applications/virtualization/libgovirt/default.nix index bd92f7666abf..9c9da54c3632 100644 --- a/pkgs/applications/virtualization/libgovirt/default.nix +++ b/pkgs/applications/virtualization/libgovirt/default.nix @@ -2,38 +2,52 @@ , stdenv , fetchurl , glib +, gnome , librest , libsoup , pkg-config +, gobject-introspection }: -with lib; - stdenv.mkDerivation rec { pname = "libgovirt"; version = "0.3.8"; - src = fetchurl { - url = "https://download.gnome.org/sources/libgovirt/0.3/${pname}-${version}.tar.xz"; - sha256 = "sha256-HckYYikXa9+p8l/Y+oLAoFi2pgwcyAfHUH7IqTwPHfg="; - }; + outputs = [ "out" "dev" ]; - enableParallelBuilding = true; + src = fetchurl { + url = "mirror://gnome/sources/libgovirt/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "HckYYikXa9+p8l/Y+oLAoFi2pgwcyAfHUH7IqTwPHfg="; + }; nativeBuildInputs = [ pkg-config + gobject-introspection ]; - propagatedBuildInputs = [ - librest + buildInputs = [ libsoup ]; - meta = { + propagatedBuildInputs = [ + glib + librest + ]; + + enableParallelBuilding = true; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + versionPolicy = "none"; + }; + }; + + meta = with lib; { homepage = "https://gitlab.gnome.org/GNOME/libgovirt"; description = "GObject wrapper for the oVirt REST API"; maintainers = [ maintainers.amarshall ]; platforms = platforms.linux; - license = licenses.lgpl21; + license = licenses.lgpl21Plus; }; }