diff --git a/pkgs/development/libraries/gupnp/1.6.nix b/pkgs/development/libraries/gupnp/1.6.nix new file mode 100644 index 000000000000..8aeae4310cf5 --- /dev/null +++ b/pkgs/development/libraries/gupnp/1.6.nix @@ -0,0 +1,88 @@ +{ stdenv +, lib +, fetchurl +, fetchpatch +, meson +, ninja +, pkg-config +, gobject-introspection +, vala +, gi-docgen +, glib +, gssdp_1_6 +, libsoup_3 +, libxml2 +, gnome +}: + +stdenv.mkDerivation rec { + pname = "gupnp"; + version = "1.5.3"; + + outputs = [ "out" "dev" "devdoc" ]; + + src = fetchurl { + url = "mirror://gnome/sources/gupnp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-dF4/qzOzqhbbNCYxmK/c/9XjWCKjKA277O9210HEhoc="; + }; + + patches = [ + # Do not use deprecated symbols after libsoup update. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gupnp/-/commit/1296d10eda308792d2924f141d72b8b6818878bd.patch"; + sha256 = "mboJQ9I7oV+HXt0atUSLt6FDTCCT22lbuI7OUb0tDLM="; + }) + + # Fix test after libsoup update. + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gupnp/-/commit/fba0ca75445189f6554bd66fb3aa4f022b8f69e9.patch"; + sha256 = "6dkpnDqHVvesrzEIYLbHdoB0dfePr0ll8jQxijuu24E="; + }) + ]; + + depsBuildBuild = [ + pkg-config + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gobject-introspection + vala + gi-docgen + ]; + + propagatedBuildInputs = [ + glib + gssdp_1_6 + libsoup_3 + libxml2 + ]; + + mesonFlags = [ + "-Dgtk_doc=true" + "-Dintrospection=true" + ]; + + doCheck = true; + + postFixup = '' + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + moveToOutput "share/doc" "$devdoc" + ''; + + passthru = { + updateScript = gnome.updateScript { + attrPath = "gupnp_1_6"; + packageName = pname; + }; + }; + + meta = with lib; { + homepage = "http://www.gupnp.org/"; + description = "An implementation of the UPnP specification"; + license = licenses.lgpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix index afb6c0d037cb..07b64064ce63 100644 --- a/pkgs/development/libraries/gupnp/default.nix +++ b/pkgs/development/libraries/gupnp/default.nix @@ -72,6 +72,7 @@ stdenv.mkDerivation rec { passthru = { updateScript = gnome.updateScript { packageName = pname; + freeze = true; }; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f248f3e0910f..664f95b56f2f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7460,6 +7460,8 @@ with pkgs; gupnp = callPackage ../development/libraries/gupnp { }; + gupnp_1_6 = callPackage ../development/libraries/gupnp/1.6.nix { }; + gupnp-av = callPackage ../development/libraries/gupnp-av {}; gupnp-dlna = callPackage ../development/libraries/gupnp-dlna {};