diff options
author | Jan Tojnar | 2024-06-22 14:08:32 +0200 |
---|---|---|
committer | Jan Tojnar | 2024-07-01 08:26:46 +0200 |
commit | 545822250cb564c9360f7d86dc851fe153e18a45 (patch) | |
tree | d3ebd51e5a99ab82d815ff7c75a82933e9334dd8 /pkgs/by-name/ry | |
parent | 0fc6f66f88f16f9401d64d5a16a09ed35fb34d1a (diff) |
rygel: Move from gnome scope to top-level
Diffstat (limited to 'pkgs/by-name/ry')
-rw-r--r-- | pkgs/by-name/ry/rygel/add-option-for-installation-sysconfdir.patch | 35 | ||||
-rw-r--r-- | pkgs/by-name/ry/rygel/package.nix | 107 |
2 files changed, 142 insertions, 0 deletions
diff --git a/pkgs/by-name/ry/rygel/add-option-for-installation-sysconfdir.patch b/pkgs/by-name/ry/rygel/add-option-for-installation-sysconfdir.patch new file mode 100644 index 000000000000..5204e3518aba --- /dev/null +++ b/pkgs/by-name/ry/rygel/add-option-for-installation-sysconfdir.patch @@ -0,0 +1,35 @@ +diff --git a/meson.build b/meson.build +index 27bde61f..3d434de9 100644 +--- a/meson.build ++++ b/meson.build +@@ -22,7 +22,11 @@ if not get_option('uninstalled') + rygel_datadir = join_paths(get_option('prefix'), get_option('datadir'), 'rygel') + rygel_libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), + 'rygel') +- rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) ++ if get_option('sysconfdir_install') != '' ++ rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir_install')) ++ else ++ rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) ++ endif + rygel_plugindir = join_paths(rygel_libdir, 'rygel-2.8', 'plugins') + rygel_enginedir = join_paths(rygel_libdir, 'rygel-2.8', 'engines') + rygel_presetdir = join_paths(rygel_datadir, 'presets') +@@ -57,7 +61,7 @@ conf.set_quoted('DATA_DIR', rygel_datadir) + conf.set_quoted('PLUGIN_DIR', rygel_plugindir) + conf.set_quoted('BIG_ICON_DIR', rygel_bigicondir) + conf.set_quoted('SMALL_ICON_DIR', rygel_smallicondir) +-conf.set_quoted('SYS_CONFIG_DIR', rygel_sysconfdir) ++conf.set_quoted('SYS_CONFIG_DIR', get_option('sysconfdir')) + conf.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) + conf.set_quoted('MX_EXTRACT_PATH', join_paths(rygel_libexecdir, 'mx-extract')) + conf.set_quoted('DESKTOP_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'applications')) +diff --git a/meson_options.txt b/meson_options.txt +index fd04776a..3dee43ba 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,3 +1,4 @@ ++option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation') + option('uninstalled', type: 'boolean', value: 'false', description: 'Run Rygel from build directory only') + option('api-docs', type: 'boolean', value: 'false', description: 'Build the API documentation') + option('man_pages', type: 'boolean', value: 'true', description: 'Build the man pages') diff --git a/pkgs/by-name/ry/rygel/package.nix b/pkgs/by-name/ry/rygel/package.nix new file mode 100644 index 000000000000..66d2a5ffae8c --- /dev/null +++ b/pkgs/by-name/ry/rygel/package.nix @@ -0,0 +1,107 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, vala +, gettext +, libxml2 +, gobject-introspection +, wrapGAppsHook3 +, python3 +, glib +, gssdp_1_6 +, gupnp_1_6 +, gupnp-av +, gupnp-dlna +, gst_all_1 +, libgee +, libsoup_3 +, gtk3 +, libmediaart +, sqlite +, systemd +, tracker +, shared-mime-info +, gnome +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "rygel"; + version = "0.42.6"; + + # TODO: split out lib + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "mirror://gnome/sources/rygel/${lib.versions.majorMinor finalAttrs.version}/rygel-${finalAttrs.version}.tar.xz"; + sha256 = "R9JXBLYQiDdeJqq6Vr5HwXGJRy5vgMdSq+hvAu9OMwQ="; + }; + + patches = [ + ./add-option-for-installation-sysconfdir.patch + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + gettext + libxml2 + gobject-introspection + wrapGAppsHook3 + python3 + ]; + + buildInputs = [ + glib + gssdp_1_6 + gupnp_1_6 + gupnp-av + gupnp-dlna + libgee + libsoup_3 + gtk3 + libmediaart + sqlite + systemd + tracker + shared-mime-info + ] ++ (with gst_all_1; [ + gstreamer + gst-editing-services + gst-plugins-base + gst-plugins-good + gst-plugins-bad + gst-plugins-ugly + ]); + + mesonFlags = [ + "-Dsystemd-user-units-dir=${placeholder "out"}/lib/systemd/user" + "-Dapi-docs=false" + "--sysconfdir=/etc" + "-Dsysconfdir_install=${placeholder "out"}/etc" + ]; + + doCheck = true; + + postPatch = '' + patchShebangs data/xml/process-xml.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "rygel"; + versionPolicy = "odd-unstable"; + }; + }; + + meta = with lib; { + description = "Home media solution (UPnP AV MediaServer) that allows you to easily share audio, video and pictures to other devices"; + homepage = "https://gitlab.gnome.org/GNOME/rygel"; + license = licenses.lgpl21Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +}) |