mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
27 lines
515 B
Nix
27 lines
515 B
Nix
{ buildNpmPackage
|
|
, src
|
|
, version
|
|
}:
|
|
|
|
buildNpmPackage {
|
|
pname = "frigate-web";
|
|
inherit version src;
|
|
|
|
sourceRoot = "${src.name}/web";
|
|
|
|
postPatch = ''
|
|
substituteInPlace package.json \
|
|
--replace "--base=/BASE_PATH/" ""
|
|
|
|
substituteInPlace src/routes/Storage.jsx \
|
|
--replace "/media/frigate" "/var/lib/frigate" \
|
|
--replace "/tmp/cache" "/var/cache/frigate"
|
|
'';
|
|
|
|
npmDepsHash = "sha256-fvRxpQjSEzd2CnoEOVgQcB6MJJ4dcjN8bOaacHjCdwU=";
|
|
|
|
installPhase = ''
|
|
cp -rv dist/ $out
|
|
'';
|
|
}
|