about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/pipewire/update.sh
blob: 6d0088c206cb880fcfdc8b3b9a363aca33df4030 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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