depot/third_party/nixpkgs/pkgs/applications/video/frigate/web.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

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
'';
}