depot/third_party/nixpkgs/pkgs/servers/misc/navidrome/ui/default.nix

28 lines
466 B
Nix
Raw Normal View History

{ buildPackages, nodejs, stdenv, src, version }:
let
nodeComposition = import ./node-composition.nix {
inherit (buildPackages) nodejs;
inherit (stdenv.hostPlatform) system;
pkgs = buildPackages;
};
in
nodeComposition.package.override {
pname = "navidrome";
inherit version;
src = "${src}/ui";
dontNpmInstall = true;
postInstall = ''
npm run build
cd $out
mv lib/node_modules/navidrome-ui/build/* .
rm -rf lib
'';
}