nixpkgs/pkgs/servers/misc/navidrome/update.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
541 B
Nix
Raw Normal View History

2022-07-09 15:51:23 +00:00
{ writeScript
, lib
, coreutils
, runtimeShell
, git
, nix-update
, node2nix
, nix
}:
writeScript "update-navidrome" ''
#!${runtimeShell}
PATH=${lib.makeBinPath [ coreutils nix-update git node2nix nix ]}
set -euo pipefail
nix-update navidrome
src=$(nix-build . -A navidrome.src)
uiDir=$(realpath pkgs/servers/misc/navidrome/ui)
tempDir=$(mktemp -d)
cp $src/ui/package.json $src/ui/package-lock.json $tempDir
cd $tempDir
2023-02-09 23:10:19 +00:00
node2nix -d -l package-lock.json -c node-composition.nix
2022-07-09 15:51:23 +00:00
cp *.nix $uiDir
rm -rf $tempDir
''