uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
54
pkgs/development/libraries/pipewire/0.2.nix
Normal file
54
pkgs/development/libraries/pipewire/0.2.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, doxygen, graphviz
|
||||
, glib, dbus, gst_all_1, alsa-lib, ffmpeg_4, libjack2, udev, libva, xorg
|
||||
, sbc, SDL2, makeFontsConf
|
||||
}:
|
||||
|
||||
let
|
||||
fontsConf = makeFontsConf {
|
||||
fontDirectories = [ ];
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "pipewire";
|
||||
version = "0.2.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PipeWire";
|
||||
repo = "pipewire";
|
||||
rev = version;
|
||||
sha256 = "1q5wrqnhhs6r49p8yvkw1pl0cnsd4rndxy4h5lvdydwgf1civcwc";
|
||||
};
|
||||
|
||||
outputs = [ "out" "lib" "dev" "doc" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson ninja pkg-config doxygen graphviz
|
||||
];
|
||||
buildInputs = [
|
||||
glib dbus gst_all_1.gst-plugins-base gst_all_1.gstreamer
|
||||
alsa-lib ffmpeg_4 libjack2 udev libva xorg.libX11 sbc SDL2
|
||||
];
|
||||
|
||||
# Workaround build on gcc-10+ and clang11+:
|
||||
# spa/plugins/bluez5/libspa-bluez5.so.p/bluez5-monitor.c.o:(.bss+0x0):
|
||||
# multiple definition of `spa_a2dp_sink_factory'
|
||||
NIX_CFLAGS_COMPILE = [ "-fcommon" ];
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=true"
|
||||
"-Dgstreamer=enabled"
|
||||
];
|
||||
|
||||
PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
|
||||
|
||||
FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Server and user space API to deal with multimedia pipelines";
|
||||
homepage = "https://pipewire.org/";
|
||||
license = licenses.lgpl21;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 99a4b2d1..d4a4cda7 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -55,7 +55,7 @@ endif
|
||||
|
||||
spa_plugindir = pipewire_libdir / spa_name
|
||||
|
||||
-alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer'
|
||||
+alsadatadir = pipewire_libdir / '..' / 'share' / 'alsa-card-profile' / 'mixer'
|
||||
|
||||
pipewire_headers_dir = pipewire_name / 'pipewire'
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 961ae2a76..692b84dfd 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -179,6 +179,9 @@ option('udev',
|
||||
option('udevrulesdir',
|
||||
type : 'string',
|
||||
description : 'Directory for udev rules (defaults to /lib/udev/rules.d)')
|
||||
+option('pipewire_pulse_prefix',
|
||||
+ type : 'string',
|
||||
+ description: 'Install directory for the pipewire-pulse daemon')
|
||||
option('systemd-system-unit-dir',
|
||||
type : 'string',
|
||||
description : 'Directory for system systemd units (defaults to /usr/lib/systemd/system)')
|
||||
diff --git a/src/daemon/systemd/user/meson.build b/src/daemon/systemd/user/meson.build
|
||||
index d17f3794f..34afe4f1a 100644
|
||||
--- a/src/daemon/systemd/user/meson.build
|
||||
+++ b/src/daemon/systemd/user/meson.build
|
||||
@@ -9,7 +9,7 @@ install_data(
|
||||
|
||||
systemd_config = configuration_data()
|
||||
systemd_config.set('PW_BINARY', pipewire_bindir / 'pipewire')
|
||||
-systemd_config.set('PW_PULSE_BINARY', pipewire_bindir / 'pipewire-pulse')
|
||||
+systemd_config.set('PW_PULSE_BINARY', get_option('pipewire_pulse_prefix') / 'bin/pipewire-pulse')
|
||||
|
||||
configure_file(input : 'pipewire.service.in',
|
||||
output : 'pipewire.service',
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 2107c19ec..20ccdfd9f 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -380,8 +380,8 @@ lilv_lib = dependency('lilv-0', required: get_option('lv2'))
|
||||
summary({'lilv (for lv2 plugins)': lilv_lib.found()}, bool_yn: true)
|
||||
cdata.set('HAVE_LILV', lilv_lib.found())
|
||||
|
||||
-installed_tests_metadir = pipewire_datadir / 'installed-tests' / pipewire_name
|
||||
-installed_tests_execdir = pipewire_libexecdir / 'installed-tests' / pipewire_name
|
||||
+installed_tests_metadir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / pipewire_name
|
||||
+installed_tests_execdir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / pipewire_name
|
||||
installed_tests_enabled = get_option('installed_tests').allowed()
|
||||
installed_tests_template = files('template.test.in')
|
||||
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 961ae2a76..a36e9e45f 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -22,6 +22,9 @@ option('installed_tests',
|
||||
description: 'Install manual and automated test executables',
|
||||
type: 'feature',
|
||||
value: 'disabled')
|
||||
+option('installed_test_prefix',
|
||||
+ description: 'Prefix for installed tests',
|
||||
+ type: 'string')
|
||||
option('gstreamer',
|
||||
description: 'Build GStreamer plugins',
|
||||
type: 'feature',
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index b6b4553b..f21c29d8 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -37,7 +37,10 @@ pipewire_localedir = prefix / get_option('localedir')
|
||||
pipewire_sysconfdir = prefix / get_option('sysconfdir')
|
||||
|
||||
pipewire_configdir = pipewire_sysconfdir / 'pipewire'
|
||||
-pipewire_confdatadir = pipewire_datadir / 'pipewire'
|
||||
+pipewire_confdatadir = get_option('pipewire_confdata_dir')
|
||||
+if pipewire_confdatadir == ''
|
||||
+ pipewire_confdatadir = pipewire_datadir / 'pipewire'
|
||||
+endif
|
||||
modules_install_dir = pipewire_libdir / pipewire_name
|
||||
|
||||
if host_machine.system() == 'linux'
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 9bc33fcd..e4bd2dc1 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -61,6 +61,9 @@ option('jack-devel',
|
||||
option('libjack-path',
|
||||
description: 'Where to install the libjack.so library',
|
||||
type: 'string')
|
||||
+option('pipewire_confdata_dir',
|
||||
+ type: 'string',
|
||||
+ description: 'Directory for pipewire default configuration (defaults to /usr/share/pipewire)')
|
||||
option('spa-plugins',
|
||||
description: 'Enable spa plugins integration',
|
||||
type: 'feature',
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
diff --git a/src/daemon/minimal.conf.in b/src/daemon/minimal.conf.in
|
||||
index 6464839a0..05546201f 100644
|
||||
--- a/src/daemon/minimal.conf.in
|
||||
+++ b/src/daemon/minimal.conf.in
|
||||
@@ -110,7 +110,7 @@ context.modules = [
|
||||
# access.allowed to list an array of paths of allowed
|
||||
# apps.
|
||||
#access.allowed = [
|
||||
- # @session_manager_path@
|
||||
+ # <session_manager_path>
|
||||
#]
|
||||
|
||||
# An array of rejected paths.
|
||||
@@ -298,5 +298,5 @@ context.exec = [
|
||||
# It can be interesting to start another daemon here that listens
|
||||
# on another address with the -a option (eg. -a tcp:4713).
|
||||
#
|
||||
- #@pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
|
||||
+ #@pulse_comment@{ path = "<pipewire_path>" args = "-c pipewire-pulse.conf" }
|
||||
]
|
||||
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
|
||||
index a948a1b9b..4ece43c6f 100644
|
||||
--- a/src/daemon/pipewire.conf.in
|
||||
+++ b/src/daemon/pipewire.conf.in
|
||||
@@ -132,7 +132,7 @@ context.modules = [
|
||||
# access.allowed to list an array of paths of allowed
|
||||
# apps.
|
||||
#access.allowed = [
|
||||
- # @session_manager_path@
|
||||
+ # <session_manager_path>
|
||||
#]
|
||||
|
||||
# An array of rejected paths.
|
||||
@@ -246,12 +246,12 @@ context.exec = [
|
||||
# but it is better to start it as a systemd service.
|
||||
# Run the session manager with -h for options.
|
||||
#
|
||||
- @sm_comment@{ path = "@session_manager_path@" args = "@session_manager_args@" }
|
||||
+ @sm_comment@{ path = "<session_manager_path>" args = "@session_manager_args@" }
|
||||
#
|
||||
# You can optionally start the pulseaudio-server here as well
|
||||
# but it is better to start it as a systemd service.
|
||||
# It can be interesting to start another daemon here that listens
|
||||
# on another address with the -a option (eg. -a tcp:4713).
|
||||
#
|
||||
- @pulse_comment@{ path = "@pipewire_path@" args = "-c pipewire-pulse.conf" }
|
||||
+ @pulse_comment@{ path = "<pipewire_path>" args = "-c pipewire-pulse.conf" }
|
||||
]
|
||||
12
pkgs/development/libraries/pipewire/0095-spa-data-dir.patch
Normal file
12
pkgs/development/libraries/pipewire/0095-spa-data-dir.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 56599ebd1..3bed2d3e3 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -54,7 +54,7 @@ else
|
||||
endif
|
||||
|
||||
spa_plugindir = pipewire_libdir / spa_name
|
||||
-spa_datadir = pipewire_datadir / spa_name
|
||||
+spa_datadir = pipewire_libdir / spa_name
|
||||
|
||||
alsadatadir = pipewire_datadir / 'alsa-card-profile' / 'mixer'
|
||||
237
pkgs/development/libraries/pipewire/default.nix
Normal file
237
pkgs/development/libraries/pipewire/default.nix
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, buildPackages
|
||||
, fetchFromGitLab
|
||||
, removeReferencesTo
|
||||
, python3
|
||||
, meson
|
||||
, ninja
|
||||
, systemd
|
||||
, pkg-config
|
||||
, docutils
|
||||
, doxygen
|
||||
, graphviz
|
||||
, glib
|
||||
, dbus
|
||||
, alsa-lib
|
||||
, libjack2
|
||||
, libusb1
|
||||
, udev
|
||||
, libva
|
||||
, libsndfile
|
||||
, vulkan-headers
|
||||
, vulkan-loader
|
||||
, webrtc-audio-processing
|
||||
, ncurses
|
||||
, readline81 # meson can't find <7 as those versions don't have a .pc file
|
||||
, lilv
|
||||
, makeFontsConf
|
||||
, callPackage
|
||||
, nixosTests
|
||||
, withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind
|
||||
, valgrind
|
||||
, withMediaSession ? true
|
||||
, libcameraSupport ? true
|
||||
, libcamera
|
||||
, libdrm
|
||||
, gstreamerSupport ? true
|
||||
, gst_all_1
|
||||
, ffmpegSupport ? true
|
||||
, ffmpeg
|
||||
, bluezSupport ? true
|
||||
, bluez
|
||||
, sbc
|
||||
, libfreeaptx
|
||||
, ldacbt
|
||||
, fdk_aac
|
||||
, nativeHspSupport ? true
|
||||
, nativeHfpSupport ? true
|
||||
, ofonoSupport ? true
|
||||
, hsphfpdSupport ? true
|
||||
, pulseTunnelSupport ? true
|
||||
, libpulseaudio
|
||||
, zeroconfSupport ? true
|
||||
, avahi
|
||||
, raopSupport ? true
|
||||
, openssl
|
||||
, rocSupport ? true
|
||||
, roc-toolkit
|
||||
, x11Support ? true
|
||||
, libcanberra
|
||||
, xorg
|
||||
}:
|
||||
|
||||
let
|
||||
mesonEnableFeature = b: if b then "enabled" else "disabled";
|
||||
mesonList = l: "[" + lib.concatStringsSep "," l + "]";
|
||||
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "pipewire";
|
||||
version = "0.3.51";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"lib"
|
||||
"pulse"
|
||||
"jack"
|
||||
"dev"
|
||||
"doc"
|
||||
"man"
|
||||
"installedTests"
|
||||
];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "pipewire";
|
||||
repo = "pipewire";
|
||||
rev = version;
|
||||
sha256 = "sha256-k5OdKgkQUaelvrGS4KtO0MtSJg6cF2Nf8RrsR8Kf+C8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Break up a dependency cycle between outputs.
|
||||
./0040-alsa-profiles-use-libdir.patch
|
||||
# Change the path of the pipewire-pulse binary in the service definition.
|
||||
./0050-pipewire-pulse-path.patch
|
||||
# Move installed tests into their own output.
|
||||
./0070-installed-tests-path.patch
|
||||
# Add option for changing the config install directory
|
||||
./0080-pipewire-config-dir.patch
|
||||
# Remove output paths from the comments in the config templates to break dependency cycles
|
||||
./0090-pipewire-config-template-paths.patch
|
||||
# Place SPA data files in lib output to avoid dependency cycles
|
||||
./0095-spa-data-dir.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
docutils
|
||||
doxygen
|
||||
graphviz
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
dbus
|
||||
glib
|
||||
libjack2
|
||||
libusb1
|
||||
libsndfile
|
||||
lilv
|
||||
ncurses
|
||||
readline81
|
||||
udev
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
webrtc-audio-processing
|
||||
systemd
|
||||
] ++ lib.optionals gstreamerSupport [ gst_all_1.gst-plugins-base gst_all_1.gstreamer ]
|
||||
++ lib.optionals libcameraSupport [ libcamera libdrm ]
|
||||
++ lib.optional ffmpegSupport ffmpeg
|
||||
++ lib.optionals bluezSupport [ bluez libfreeaptx ldacbt sbc fdk_aac ]
|
||||
++ lib.optional pulseTunnelSupport libpulseaudio
|
||||
++ lib.optional zeroconfSupport avahi
|
||||
++ lib.optional raopSupport openssl
|
||||
++ lib.optional rocSupport roc-toolkit
|
||||
++ lib.optionals x11Support [ libcanberra xorg.libX11 xorg.libXfixes ];
|
||||
|
||||
# Valgrind binary is required for running one optional test.
|
||||
checkInputs = lib.optional withValgrind valgrind;
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=enabled"
|
||||
"-Dudevrulesdir=lib/udev/rules.d"
|
||||
"-Dinstalled_tests=enabled"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
"-Dpipewire_pulse_prefix=${placeholder "pulse"}"
|
||||
"-Dlibjack-path=${placeholder "jack"}/lib"
|
||||
"-Dlibcamera=${mesonEnableFeature libcameraSupport}"
|
||||
"-Droc=${mesonEnableFeature rocSupport}"
|
||||
"-Dlibpulse=${mesonEnableFeature pulseTunnelSupport}"
|
||||
"-Davahi=${mesonEnableFeature zeroconfSupport}"
|
||||
"-Dgstreamer=${mesonEnableFeature gstreamerSupport}"
|
||||
"-Dsystemd-system-service=enabled"
|
||||
"-Dffmpeg=${mesonEnableFeature ffmpegSupport}"
|
||||
"-Dbluez5=${mesonEnableFeature bluezSupport}"
|
||||
"-Dbluez5-backend-hsp-native=${mesonEnableFeature nativeHspSupport}"
|
||||
"-Dbluez5-backend-hfp-native=${mesonEnableFeature nativeHfpSupport}"
|
||||
"-Dbluez5-backend-ofono=${mesonEnableFeature ofonoSupport}"
|
||||
"-Dbluez5-backend-hsphfpd=${mesonEnableFeature hsphfpdSupport}"
|
||||
"-Dsysconfdir=/etc"
|
||||
"-Dpipewire_confdata_dir=${placeholder "lib"}/share/pipewire"
|
||||
"-Draop=${mesonEnableFeature raopSupport}"
|
||||
"-Dsession-managers="
|
||||
"-Dvulkan=enabled"
|
||||
"-Dx11=${mesonEnableFeature x11Support}"
|
||||
"-Dsdl2=disabled" # required only to build examples, causes dependency loop
|
||||
];
|
||||
|
||||
# Fontconfig error: Cannot load default config file
|
||||
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postUnpack = ''
|
||||
patchShebangs source/doc/input-filter.sh
|
||||
patchShebangs source/doc/input-filter-h.sh
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/nix-support
|
||||
${if (stdenv.hostPlatform == stdenv.buildPlatform) then ''
|
||||
pushd $lib/share/pipewire
|
||||
for f in *.conf; do
|
||||
echo "Generating JSON from $f"
|
||||
|
||||
$out/bin/spa-json-dump "$f" > "$out/nix-support/$f.json"
|
||||
done
|
||||
popd
|
||||
'' else ''
|
||||
cp ${buildPackages.pipewire}/nix-support/*.json "$out/nix-support"
|
||||
''}
|
||||
|
||||
moveToOutput "share/systemd/user/pipewire-pulse.*" "$pulse"
|
||||
moveToOutput "lib/systemd/user/pipewire-pulse.*" "$pulse"
|
||||
moveToOutput "bin/pipewire-pulse" "$pulse"
|
||||
|
||||
moveToOutput "bin/pw-jack" "$jack"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update-pipewire.sh;
|
||||
tests = {
|
||||
installedTests = nixosTests.installed-tests.pipewire;
|
||||
|
||||
# This ensures that all the paths used by the NixOS module are found.
|
||||
test-paths = callPackage ./test-paths.nix { package = self; } {
|
||||
paths-out = [
|
||||
"share/alsa/alsa.conf.d/50-pipewire.conf"
|
||||
"nix-support/client-rt.conf.json"
|
||||
"nix-support/client.conf.json"
|
||||
"nix-support/jack.conf.json"
|
||||
"nix-support/minimal.conf.json"
|
||||
"nix-support/pipewire.conf.json"
|
||||
"nix-support/pipewire-pulse.conf.json"
|
||||
];
|
||||
paths-lib = [
|
||||
"lib/alsa-lib/libasound_module_pcm_pipewire.so"
|
||||
"share/alsa-card-profile/mixer"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Server and user space API to deal with multimedia pipelines";
|
||||
homepage = "https://pipewire.org/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ jtojnar kranzes ];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
self
|
||||
109
pkgs/development/libraries/pipewire/media-session.nix
Normal file
109
pkgs/development/libraries/pipewire/media-session.nix
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, doxygen
|
||||
, graphviz
|
||||
, systemd
|
||||
, pipewire
|
||||
, glib
|
||||
, dbus
|
||||
, alsa-lib
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
let
|
||||
mesonEnable = b: if b then "enabled" else "disabled";
|
||||
mesonList = l: "[" + lib.concatStringsSep "," l + "]";
|
||||
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "pipewire-media-session";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "pipewire";
|
||||
repo = "media-session";
|
||||
rev = version;
|
||||
sha256 = "sha256-e537gTkiNYMz2YJrOff/MXYWVDgHZDkqkSn8Qh+7Wr4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix `ERROR: Tried to access unknown option "session-managers".`
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/pipewire/media-session/-/commit/dfa740175c83e1cd0d815ad423f90872de566437.diff";
|
||||
sha256 = "01rfwq8ipm8wyv98rxal1s5zrkf0pn9hgrngiq2wdbwj6vjdnr1h";
|
||||
})
|
||||
# Fix attempt to put system service units into pkgs.systemd.
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/pipewire/media-session/-/commit/2ff6b0baec7325dde229013b9d37c93f8bc7edee.diff";
|
||||
sha256 = "18gg7ca04ihl4ylnw78wdyrbvg66m8w43gg0wp258x4nv95gpps2";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
doxygen
|
||||
graphviz
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
dbus
|
||||
glib
|
||||
pipewire
|
||||
systemd
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=enabled"
|
||||
"-Dsystemd-system-service=enabled"
|
||||
# We generate these empty files from the nixos module, don't bother installing them
|
||||
"-Dwith-module-sets=[]"
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
patchShebangs source/doc/input-filter-h.sh
|
||||
patchShebangs source/doc/input-filter.sh
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/nix-support
|
||||
cd $out/share/pipewire/media-session.d
|
||||
for f in *.conf; do
|
||||
echo "Generating JSON from $f"
|
||||
${pipewire}/bin/spa-json-dump "$f" > "$out/nix-support/$f.json"
|
||||
done
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update-media-session.sh;
|
||||
tests = {
|
||||
test-paths = callPackage ./test-paths.nix { package = self; } {
|
||||
paths-out = [
|
||||
"nix-support/alsa-monitor.conf.json"
|
||||
"nix-support/bluez-monitor.conf.json"
|
||||
"nix-support/media-session.conf.json"
|
||||
"nix-support/v4l2-monitor.conf.json"
|
||||
];
|
||||
paths-lib = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Example session manager for PipeWire";
|
||||
homepage = "https://pipewire.org";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ jtojnar kranzes ];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
self
|
||||
23
pkgs/development/libraries/pipewire/test-paths.nix
Normal file
23
pkgs/development/libraries/pipewire/test-paths.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, runCommand, package, paths-out, paths-lib }:
|
||||
|
||||
let
|
||||
check-path = output: path: ''
|
||||
if [[ ! -f "${output}/${path}" && ! -d "${output}/${path}" ]]; then
|
||||
printf "Missing: %s\n" "${output}/${path}" | tee -a $out
|
||||
error=error
|
||||
else
|
||||
printf "Found: %s\n" "${output}/${path}" | tee -a $out
|
||||
fi
|
||||
'';
|
||||
|
||||
check-output = output: lib.concatMapStringsSep "\n" (check-path output);
|
||||
in runCommand "pipewire-test-paths" { } ''
|
||||
touch $out
|
||||
|
||||
${check-output package.lib paths-lib}
|
||||
${check-output package paths-out}
|
||||
|
||||
if [[ -n "$error" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
''
|
||||
24
pkgs/development/libraries/pipewire/update-media-session.sh
Executable file
24
pkgs/development/libraries/pipewire/update-media-session.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p nix-update -i bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
set -o errexit -o pipefail -o nounset -o errtrace
|
||||
shopt -s inherit_errexit
|
||||
shopt -s nullglob
|
||||
IFS=$'\n'
|
||||
|
||||
NIXPKGS_ROOT="$(git rev-parse --show-toplevel)"
|
||||
|
||||
cd "$NIXPKGS_ROOT"
|
||||
nix-update pipewire-media-session
|
||||
outputs=$(nix-build . -A pipewire-media-session)
|
||||
for p in $outputs; do
|
||||
conf_files=$(find "$p/nix-support/" -name '*.conf.json')
|
||||
for c in $conf_files; do
|
||||
file_name=$(basename "$c")
|
||||
if [[ ! -e "nixos/modules/services/desktops/pipewire/media-session/$file_name" ]]; then
|
||||
echo "New file $file_name found! Add it to the module config and passthru tests!"
|
||||
fi
|
||||
install -m 0644 "$c" "nixos/modules/services/desktops/pipewire/media-session/"
|
||||
done
|
||||
done
|
||||
25
pkgs/development/libraries/pipewire/update-pipewire.sh
Executable file
25
pkgs/development/libraries/pipewire/update-pipewire.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p nix-update -i bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
set -o errexit -o pipefail -o nounset -o errtrace
|
||||
shopt -s inherit_errexit
|
||||
shopt -s nullglob
|
||||
IFS=$'\n'
|
||||
|
||||
NIXPKGS_ROOT="$(git rev-parse --show-toplevel)"
|
||||
|
||||
cd "$NIXPKGS_ROOT"
|
||||
nix-update pipewire
|
||||
outputs=$(nix-build . -A pipewire)
|
||||
for p in $outputs; do
|
||||
conf_files=$(find "$p/nix-support/" -name '*.conf.json')
|
||||
for c in $conf_files; do
|
||||
file_name=$(basename "$c")
|
||||
if [[ ! -e "nixos/modules/services/desktops/pipewire/daemon/$file_name" ]]; then
|
||||
echo "New file $file_name found! Add it to the module config and passthru tests!"
|
||||
fi
|
||||
install -m 0644 "$c" "nixos/modules/services/desktops/pipewire/daemon/"
|
||||
done
|
||||
done
|
||||
|
||||
85
pkgs/development/libraries/pipewire/wireplumber.nix
Normal file
85
pkgs/development/libraries/pipewire/wireplumber.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, nix-update-script
|
||||
, # base build deps
|
||||
meson
|
||||
, pkg-config
|
||||
, ninja
|
||||
, # docs build deps
|
||||
python3
|
||||
, doxygen
|
||||
, graphviz
|
||||
, # GI build deps
|
||||
gobject-introspection
|
||||
, # runtime deps
|
||||
glib
|
||||
, systemd
|
||||
, lua5_4
|
||||
, pipewire
|
||||
, # options
|
||||
enableDocs ? true
|
||||
, enableGI ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
}:
|
||||
let
|
||||
mesonEnableFeature = b: if b then "enabled" else "disabled";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wireplumber";
|
||||
version = "0.4.10";
|
||||
|
||||
outputs = [ "out" "dev" ] ++ lib.optional enableDocs "doc";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "pipewire";
|
||||
repo = "wireplumber";
|
||||
rev = version;
|
||||
sha256 = "sha256-Z5Uqjw05SdEU9bGLuhdS+hDv7Fgqx4oW92k4AG1p3Ug=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
pkg-config
|
||||
ninja
|
||||
] ++ lib.optionals enableDocs [
|
||||
graphviz
|
||||
] ++ lib.optionals enableGI [
|
||||
gobject-introspection
|
||||
] ++ lib.optionals (enableDocs || enableGI) [
|
||||
doxygen
|
||||
(python3.withPackages (ps: with ps;
|
||||
lib.optionals enableDocs [ sphinx sphinx_rtd_theme breathe ] ++
|
||||
lib.optionals enableGI [ lxml ]
|
||||
))
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
systemd
|
||||
lua5_4
|
||||
pipewire
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dsystem-lua=true"
|
||||
"-Delogind=disabled"
|
||||
"-Ddoc=${mesonEnableFeature enableDocs}"
|
||||
"-Dintrospection=${mesonEnableFeature enableGI}"
|
||||
"-Dsystemd-system-service=true"
|
||||
"-Dsystemd-system-unit-dir=${placeholder "out"}/lib/systemd/system"
|
||||
"-Dsysconfdir=/etc"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A modular session / policy manager for PipeWire";
|
||||
homepage = "https://pipewire.org";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ k900 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue