pipewire: Add update script
This commit is contained in:
parent
6edd102013
commit
fb86d324d1
|
@ -1,6 +0,0 @@
|
||||||
# Updating
|
|
||||||
|
|
||||||
1. Update the version & hash in pkgs/development/libraries/pipewire/default.nix
|
|
||||||
2. run `nix build -f /path/to/nixpkgs/checkout pipewire pipewire.mediaSession`
|
|
||||||
3. copy all JSON files from result/etc/pipewire and result-mediaSession/etc/pipewire/media-session.d to this directory
|
|
||||||
4. add new files to the module config and passthru tests
|
|
|
@ -60,7 +60,7 @@ let
|
||||||
owner = "pipewire";
|
owner = "pipewire";
|
||||||
repo = "pipewire";
|
repo = "pipewire";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256:1rqi1sa937lp89ai79b5n7m0p66pigpj4w1mr2vq4dycfp8vppxk";
|
sha256 = "sha256-s9+70XXMN4K3yDVwIu+L15gL6rFlpRNVQpeekZQOEec=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -146,29 +146,31 @@ let
|
||||||
moveToOutput "bin/pipewire-pulse" "$pulse"
|
moveToOutput "bin/pipewire-pulse" "$pulse"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = {
|
passthru = {
|
||||||
installedTests = nixosTests.installed-tests.pipewire;
|
updateScript = ./update.sh;
|
||||||
|
tests = {
|
||||||
|
installedTests = nixosTests.installed-tests.pipewire;
|
||||||
|
|
||||||
# This ensures that all the paths used by the NixOS module are found.
|
# This ensures that all the paths used by the NixOS module are found.
|
||||||
test-paths = callPackage ./test-paths.nix {
|
test-paths = callPackage ./test-paths.nix {
|
||||||
paths-out = [
|
paths-out = [
|
||||||
"share/alsa/alsa.conf.d/50-pipewire.conf"
|
"share/alsa/alsa.conf.d/50-pipewire.conf"
|
||||||
"nix-support/etc/pipewire/client.conf.json"
|
"nix-support/etc/pipewire/client.conf.json"
|
||||||
"nix-support/etc/pipewire/client-rt.conf.json"
|
"nix-support/etc/pipewire/jack.conf.json"
|
||||||
"nix-support/etc/pipewire/jack.conf.json"
|
"nix-support/etc/pipewire/pipewire.conf.json"
|
||||||
"nix-support/etc/pipewire/pipewire.conf.json"
|
"nix-support/etc/pipewire/pipewire-pulse.conf.json"
|
||||||
"nix-support/etc/pipewire/pipewire-pulse.conf.json"
|
];
|
||||||
];
|
paths-out-media-session = [
|
||||||
paths-out-media-session = [
|
"nix-support/etc/pipewire/media-session.d/alsa-monitor.conf.json"
|
||||||
"nix-support/etc/pipewire/media-session.d/alsa-monitor.conf.json"
|
"nix-support/etc/pipewire/media-session.d/bluez-monitor.conf.json"
|
||||||
"nix-support/etc/pipewire/media-session.d/bluez-monitor.conf.json"
|
"nix-support/etc/pipewire/media-session.d/media-session.conf.json"
|
||||||
"nix-support/etc/pipewire/media-session.d/media-session.conf.json"
|
"nix-support/etc/pipewire/media-session.d/v4l2-monitor.conf.json"
|
||||||
"nix-support/etc/pipewire/media-session.d/v4l2-monitor.conf.json"
|
];
|
||||||
];
|
paths-lib = [
|
||||||
paths-lib = [
|
"lib/alsa-lib/libasound_module_pcm_pipewire.so"
|
||||||
"lib/alsa-lib/libasound_module_pcm_pipewire.so"
|
"share/alsa-card-profile/mixer"
|
||||||
"share/alsa-card-profile/mixer"
|
];
|
||||||
];
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
outputs=$(nix-build . -A pipewire -A pipewire.mediaSession)
|
||||||
|
for p in $outputs; do
|
||||||
|
conf_files=$(find "$p/nix-support/etc/pipewire/" -name '*.conf.json')
|
||||||
|
for c in $conf_files; do
|
||||||
|
file_name=$(basename "$c")
|
||||||
|
if [[ ! -e "nixos/modules/services/desktops/pipewire/$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/"
|
||||||
|
done
|
||||||
|
done
|
Loading…
Reference in New Issue