159e378cbb
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
33 lines
814 B
Nix
33 lines
814 B
Nix
{ buildNpmPackage
|
|
, src
|
|
, version
|
|
}:
|
|
|
|
buildNpmPackage {
|
|
pname = "frigate-web";
|
|
inherit version src;
|
|
|
|
sourceRoot = "${src.name}/web";
|
|
|
|
postPatch = ''
|
|
substituteInPlace package.json \
|
|
--replace-fail "--base=/BASE_PATH/" ""
|
|
|
|
substituteInPlace \
|
|
src/views/system/StorageMetrics.tsx \
|
|
src/components/card/{AnimatedEvent,Export,Review}Card.tsx \
|
|
src/components/timeline/EventSegment.tsx \
|
|
src/pages/Exports.tsx \
|
|
src/components/player/PreviewThumbnailPlayer.tsx \
|
|
--replace-fail "/media/frigate" "/var/lib/frigate" \
|
|
|
|
substituteInPlace src/views/system/StorageMetrics.tsx \
|
|
--replace-fail "/tmp/cache" "/var/cache/frigate"
|
|
'';
|
|
|
|
npmDepsHash = "sha256-PLs3oCWQjK38eHgdQt2Qkj7YqkfanC8JnLMpzMjNfxU=";
|
|
|
|
installPhase = ''
|
|
cp -rv dist/ $out
|
|
'';
|
|
}
|