depot/third_party/nixpkgs/pkgs/applications/video/frigate/web.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

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