depot/third_party/nixpkgs/pkgs/applications/video/frigate/web.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

26 lines
530 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/routes/Storage.jsx \
--replace-fail "/media/frigate" "/var/lib/frigate" \
--replace-fail "/tmp/cache" "/var/cache/frigate"
'';
npmDepsHash = "sha256-+36quezGArqIM9dM+UihwcIgmE3EVmJQThuicLgDW4A=";
installPhase = ''
cp -rv dist/ $out
'';
}