gupnp: enable docs, gir and split outputs

This commit is contained in:
Jan Tojnar 2018-08-15 00:45:35 +02:00
parent f0f8229ee3
commit 1aaea3839b
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
2 changed files with 34 additions and 14 deletions

View File

@ -1,28 +1,39 @@
{ stdenv, fetchurl, pkgconfig, glib, gssdp, libsoup, libxml2, libuuid }:
{ stdenv, fetchurl, pkgconfig, gobjectIntrospection, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, docbook_xml_dtd_44, glib, gssdp, libsoup, libxml2, libuuid }:
stdenv.mkDerivation rec {
name = "gupnp-${version}";
majorVersion = "1.0";
version = "${majorVersion}.2";
version = "1.0.2";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/gupnp/${majorVersion}/gupnp-${version}.tar.xz";
url = "mirror://gnome/sources/gupnp/${stdenv.lib.versions.majorMinor version}/gupnp-${version}.tar.xz";
sha256 = "043nqxlj030a3wvd6x4c9z8fjarjjjsl2pjarl0nn70ig6kzswsi";
};
nativeBuildInputs = [ pkgconfig ];
patches = [
# Nixs pkg-config ignores Requires.private
# https://github.com/NixOS/nixpkgs/commit/1e6622f4d5d500d6e701bd81dd4a22977d10637d
# We are essentialy reverting the following patch for now
# https://bugzilla.gnome.org/show_bug.cgi?id=685477
# at least until Requires.internal or something is implemented
# https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/7
./fix-requires.patch
];
nativeBuildInputs = [ pkgconfig gobjectIntrospection vala gtk-doc docbook_xsl docbook_xml_dtd_412 docbook_xml_dtd_44 ];
propagatedBuildInputs = [ glib gssdp libsoup libxml2 libuuid ];
postInstall = ''
ln -sv ${libsoup.dev}/include/libsoup-2*/libsoup $out/include
ln -sv ${libxml2.dev}/include/*/libxml $out/include
ln -sv ${gssdp}/include/*/libgssdp $out/include
'';
configureFlags = [
"--enable-gtk-doc"
];
meta = {
doCheck = true;
meta = with stdenv.lib; {
homepage = http://www.gupnp.org/;
description = "An implementation of the UPnP specification";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
license = licenses.lgpl2Plus;
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,9 @@
--- a/gupnp-1.0.pc.in
+++ b/gupnp-1.0.pc.in
@@ -8,4 +8,5 @@
Version: @VERSION@
Libs: -L${libdir} -lgupnp-1.0
Cflags: -I${includedir}/gupnp-1.0
-Requires.private: gssdp-1.0 libxml-2.0 libsoup-2.4 @UUID_LIBS@
+Requires: glib-2.0 gobject-2.0 gssdp-1.0 libxml-2.0 libsoup-2.4
+Requires.private: @UUID_LIBS@