nixpkgs/pkgs/applications/video/frigate/web.nix
Martin Weinelt 76f9a4b617
frigate: init at 0.12.0
Frigate is a NVR with realtime local object detection for IP cameras.
2023-05-22 16:29:54 +02:00

27 lines
510 B
Nix

{ buildNpmPackage
, src
, version
}:
buildNpmPackage {
pname = "frigate-web";
inherit version src;
sourceRoot = "source/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
'';
}