From f0f8229ee398a5c4fbc1bef2d5074710ac7f4a71 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 15 Aug 2018 00:37:30 +0200 Subject: [PATCH 1/8] gssdp: enable docs, tests, gir and split outputs --- pkgs/development/libraries/gssdp/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/gssdp/default.nix b/pkgs/development/libraries/gssdp/default.nix index d48ba9082af2..0d77018eee5f 100644 --- a/pkgs/development/libraries/gssdp/default.nix +++ b/pkgs/development/libraries/gssdp/default.nix @@ -1,22 +1,30 @@ -{ stdenv, fetchurl, pkgconfig, libsoup, glib }: +{ stdenv, fetchurl, pkgconfig, gobjectIntrospection, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, libsoup, gtk3, glib }: stdenv.mkDerivation rec { name = "gssdp-${version}"; version = "1.0.2"; + outputs = [ "out" "bin" "dev" "devdoc" ]; + src = fetchurl { - url = "mirror://gnome/sources/gssdp/1.0/${name}.tar.xz"; + url = "mirror://gnome/sources/gssdp/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; sha256 = "1p1m2m3ndzr2whipqw4vfb6s6ia0g7rnzzc4pnq8b8g1qw4prqd1"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ libsoup ]; + nativeBuildInputs = [ pkgconfig gobjectIntrospection vala gtk-doc docbook_xsl docbook_xml_dtd_412 ]; + buildInputs = [ libsoup gtk3 ]; propagatedBuildInputs = [ glib ]; + configureFlags = [ + "--enable-gtk-doc" + ]; + + doCheck = true; + meta = with stdenv.lib; { description = "GObject-based API for handling resource discovery and announcement over SSDP"; homepage = http://www.gupnp.org/; - license = licenses.lgpl2; + license = licenses.lgpl2Plus; platforms = platforms.all; }; } From 1aaea3839b1ff01718d6a02407672a08406a5df5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 15 Aug 2018 00:45:35 +0200 Subject: [PATCH 2/8] gupnp: enable docs, gir and split outputs --- pkgs/development/libraries/gupnp/default.nix | 39 ++++++++++++------- .../libraries/gupnp/fix-requires.patch | 9 +++++ 2 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 pkgs/development/libraries/gupnp/fix-requires.patch diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix index 963b93ef6917..7ec6199dc076 100644 --- a/pkgs/development/libraries/gupnp/default.nix +++ b/pkgs/development/libraries/gupnp/default.nix @@ -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 = [ + # Nix’s 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; }; } diff --git a/pkgs/development/libraries/gupnp/fix-requires.patch b/pkgs/development/libraries/gupnp/fix-requires.patch new file mode 100644 index 000000000000..4538fc55460f --- /dev/null +++ b/pkgs/development/libraries/gupnp/fix-requires.patch @@ -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@ From 5bee539f1cacf5b8708c41edaaf2146fe347ae36 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 15 Aug 2018 00:58:52 +0200 Subject: [PATCH 3/8] gupnp-dlna: enable docs, tests and split outputs --- .../libraries/gupnp-dlna/default.nix | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/gupnp-dlna/default.nix b/pkgs/development/libraries/gupnp-dlna/default.nix index 75818f756921..aba95889b698 100644 --- a/pkgs/development/libraries/gupnp-dlna/default.nix +++ b/pkgs/development/libraries/gupnp-dlna/default.nix @@ -1,22 +1,34 @@ -{ stdenv, fetchurl, pkgconfig, gobjectIntrospection, gupnp, gst-plugins-base }: +{ stdenv, fetchurl, pkgconfig, gobjectIntrospection, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, gupnp, gst_all_1 }: stdenv.mkDerivation rec { name = "gupnp-dlna-${version}"; - majorVersion = "0.10"; - version = "${majorVersion}.5"; + version = "0.10.5"; + + outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { - url = "mirror://gnome/sources/gupnp-dlna/${majorVersion}/${name}.tar.xz"; + url = "mirror://gnome/sources/gupnp-dlna/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; sha256 = "0spzd2saax7w776p5laixdam6d7smyynr9qszhbmq7f14y13cghj"; }; - nativeBuildInputs = [ pkgconfig gobjectIntrospection ]; - buildInputs = [ gupnp gst-plugins-base ]; + nativeBuildInputs = [ pkgconfig gobjectIntrospection vala gtk-doc docbook_xsl docbook_xml_dtd_412 ]; + buildInputs = [ gupnp gst_all_1.gst-plugins-base ]; - meta = { + configureFlags = [ + "--enable-gtk-doc" + ]; + + doCheck = true; + + postPatch = '' + chmod +x tests/test-discoverer.sh.in + patchShebangs tests/test-discoverer.sh.in + ''; + + meta = with stdenv.lib; { homepage = https://wiki.gnome.org/Projects/GUPnP/; description = "Library to ease DLNA-related bits for applications using GUPnP"; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl2Plus; + platforms = platforms.linux; }; } From 0f063f97a6db56c751e5e56dde3b3dac31a942bd Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 15 Aug 2018 01:13:16 +0200 Subject: [PATCH 4/8] =?UTF-8?q?gupnp:=201.0.2=20=E2=86=92=201.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/libraries/gupnp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix index 7ec6199dc076..45adf46ff36f 100644 --- a/pkgs/development/libraries/gupnp/default.nix +++ b/pkgs/development/libraries/gupnp/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "gupnp-${version}"; - version = "1.0.2"; + version = "1.0.3"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/gupnp/${stdenv.lib.versions.majorMinor version}/gupnp-${version}.tar.xz"; - sha256 = "043nqxlj030a3wvd6x4c9z8fjarjjjsl2pjarl0nn70ig6kzswsi"; + sha256 = "1fyb6yn75vf2y1b8nbc1df572swzr74yiwy3v3g5xn36wlp1cjvr"; }; patches = [ From 05506a27850c777cefc4b58bceeb12fcd1845872 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 15 Aug 2018 01:25:51 +0200 Subject: [PATCH 5/8] gupnp-av: enable docs, gir, tests and split outputs --- .../libraries/gupnp-av/default.nix | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/gupnp-av/default.nix b/pkgs/development/libraries/gupnp-av/default.nix index 9b61f4b648e1..7491da7c3e2f 100644 --- a/pkgs/development/libraries/gupnp-av/default.nix +++ b/pkgs/development/libraries/gupnp-av/default.nix @@ -1,22 +1,29 @@ -{ stdenv, fetchurl, pkgconfig, gupnp, glib, libxml2 }: +{ stdenv, fetchurl, pkgconfig, gobjectIntrospection, vala, gtk-doc, docbook_xsl, docbook_xml_dtd_412, gupnp, glib, libxml2 }: stdenv.mkDerivation rec { name = "gupnp-av-${version}"; - majorVersion = "0.12"; - version = "${majorVersion}.10"; + version = "0.12.10"; + + outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { - url = "mirror://gnome/sources/gupnp-av/${majorVersion}/${name}.tar.xz"; + url = "mirror://gnome/sources/gupnp-av/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; sha256 = "0nmq6wlbfsssanv3jgv2z0nhfkv8vzfr3gq5qa8svryvvn2fyf40"; }; - - nativeBuildInputs = [ pkgconfig ]; + + nativeBuildInputs = [ pkgconfig gobjectIntrospection vala gtk-doc docbook_xsl docbook_xml_dtd_412 ]; buildInputs = [ gupnp glib libxml2 ]; - meta = { + configureFlags = [ + "--enable-gtk-doc" + ]; + + doCheck = true; + + meta = with stdenv.lib; { homepage = http://gupnp.org/; description = "A collection of helpers for building AV (audio/video) applications using GUPnP"; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl2Plus; + platforms = platforms.linux; }; } From b18461b085a319b1bc8b09144c6af0cb6058a7bf Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 8 Sep 2018 03:07:59 +0200 Subject: [PATCH 6/8] =?UTF-8?q?gupnp-igd:=200.2.4=20=E2=86=92=200.2.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../libraries/gupnp-igd/default.nix | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/gupnp-igd/default.nix b/pkgs/development/libraries/gupnp-igd/default.nix index 182905e9546a..50107959786d 100644 --- a/pkgs/development/libraries/gupnp-igd/default.nix +++ b/pkgs/development/libraries/gupnp-igd/default.nix @@ -1,22 +1,29 @@ -{ stdenv, fetchurl, pkgconfig, glib, gupnp }: - +{ stdenv, fetchurl, pkgconfig, gettext, gobjectIntrospection, gtk-doc, docbook_xsl, docbook_xml_dtd_412, glib, gupnp }: + stdenv.mkDerivation rec { name = "gupnp-igd-${version}"; - majorVersion = "0.2"; - version = "${majorVersion}.4"; + version = "0.2.5"; + + outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { - url = "mirror://gnome/sources/gupnp-igd/${majorVersion}/${name}.tar.xz"; - sha256 = "38c4a6d7718d17eac17df95a3a8c337677eda77e58978129ad3182d769c38e44"; + url = "mirror://gnome/sources/gupnp-igd/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; + sha256 = "081v1vhkbz3wayv49xfiskvrmvnpx93k25am2wnarg5cifiiljlb"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection gtk-doc docbook_xsl docbook_xml_dtd_412 ]; propagatedBuildInputs = [ glib gupnp ]; - meta = { + configureFlags = [ + "--enable-gtk-doc" + ]; + + doCheck = true; + + meta = with stdenv.lib; { + description = "Library to handle UPnP IGD port mapping"; homepage = http://www.gupnp.org/; - license = stdenv.lib.licenses.lgpl21; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl21; + platforms = platforms.linux; }; } - From feb18af0609de04f8e19e4b7edf76b014ce82729 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 15 Aug 2018 00:11:34 +0200 Subject: [PATCH 7/8] gnome3.rygel: init at 0.36.2 --- pkgs/desktops/gnome-3/core/rygel/default.nix | 54 ++++++++++++++++++++ pkgs/desktops/gnome-3/default.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/desktops/gnome-3/core/rygel/default.nix diff --git a/pkgs/desktops/gnome-3/core/rygel/default.nix b/pkgs/desktops/gnome-3/core/rygel/default.nix new file mode 100644 index 000000000000..ef0886328974 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/rygel/default.nix @@ -0,0 +1,54 @@ +{ stdenv, fetchurl, pkgconfig, vala, gettext, libxml2, gobjectIntrospection, gtk-doc, wrapGAppsHook, glib, gssdp, gupnp, gupnp-av, gupnp-dlna, gst_all_1, libgee, libsoup, gtk3, libmediaart, sqlite, systemd, tracker, shared-mime-info, gnome3 }: + +let + pname = "rygel"; + version = "0.36.2"; +in stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + # TODO: split out lib + outputs = [ "out" "dev" "devdoc" ]; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; + sha256 = "0i12z6bzfzgcjidhxa2jsvpm4hqpab0s032z13jy2vbifrncfcnk"; + }; + + nativeBuildInputs = [ + pkgconfig vala gettext libxml2 gobjectIntrospection gtk-doc wrapGAppsHook + ]; + buildInputs = [ + glib gssdp gupnp gupnp-av gupnp-dlna libgee libsoup gtk3 libmediaart sqlite systemd tracker shared-mime-info + ] ++ (with gst_all_1; [ + gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly + ]); + + configureFlags = [ + "--with-systemduserunitdir=$(out)/lib/systemd/user" + "--enable-apidocs" + "--sysconfdir=/etc" + ]; + + installFlags = [ + "sysconfdir=$(out)/etc" + ]; + + doCheck = true; + + enableParallelBuilding = true; + + passthru = { + updateScript = gnome3.updateScript { + packageName = pname; + attrPath = "gnome3.${pname}"; + }; + }; + + meta = with stdenv.lib; { + description = "A home media solution (UPnP AV MediaServer) that allows you to easily share audio, video and pictures to other devices"; + homepage = https://wiki.gnome.org/Projects/Rygel; + license = licenses.lgpl21Plus; + maintainers = gnome3.maintainers; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index d90440d5f557..5112f8b496f5 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -216,6 +216,8 @@ lib.makeScope pkgs.newScope (self: with self; { rest = callPackage ./core/rest { }; + rygel = callPackage ./core/rygel { }; + simple-scan = callPackage ./core/simple-scan { }; sushi = callPackage ./core/sushi { }; From 60ae12f5de19c784de869f81f1074236a8db1c6b Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 15 Aug 2018 11:16:39 +0200 Subject: [PATCH 8/8] nixos/rygel: init --- nixos/modules/module-list.nix | 1 + .../services/desktops/gnome3/rygel.nix | 30 +++++++++++++++++++ .../services/x11/desktop-managers/gnome3.nix | 1 + 3 files changed, 32 insertions(+) create mode 100644 nixos/modules/services/desktops/gnome3/rygel.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 4795922abcfb..b1ae2f356cd6 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -245,6 +245,7 @@ ./services/desktops/gnome3/gnome-user-share.nix ./services/desktops/gnome3/gpaste.nix ./services/desktops/gnome3/gvfs.nix + ./services/desktops/gnome3/rygel.nix ./services/desktops/gnome3/seahorse.nix ./services/desktops/gnome3/sushi.nix ./services/desktops/gnome3/tracker.nix diff --git a/nixos/modules/services/desktops/gnome3/rygel.nix b/nixos/modules/services/desktops/gnome3/rygel.nix new file mode 100644 index 000000000000..55d5e703aa19 --- /dev/null +++ b/nixos/modules/services/desktops/gnome3/rygel.nix @@ -0,0 +1,30 @@ +# rygel service. +{ config, lib, pkgs, ... }: + +with lib; + +{ + ###### interface + options = { + services.gnome3.rygel = { + enable = mkOption { + default = false; + description = '' + Whether to enable Rygel UPnP Mediaserver. + + You will need to also allow UPnP connections in firewall, see the following comment. + ''; + type = types.bool; + }; + }; + }; + + ###### implementation + config = mkIf config.services.gnome3.rygel.enable { + environment.systemPackages = [ pkgs.gnome3.rygel ]; + + services.dbus.packages = [ pkgs.gnome3.rygel ]; + + systemd.packages = [ pkgs.gnome3.rygel ]; + }; +} diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index faf5214130db..eb86f7b53bb6 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -110,6 +110,7 @@ in { services.gnome3.gnome-terminal-server.enable = mkDefault true; services.gnome3.gnome-user-share.enable = mkDefault true; services.gnome3.gvfs.enable = true; + services.gnome3.rygel.enable = mkDefault true; services.gnome3.seahorse.enable = mkDefault true; services.gnome3.sushi.enable = mkDefault true; services.gnome3.tracker.enable = mkDefault true;