diff options
Diffstat (limited to 'pkgs/applications/video/frigate/web.nix')
-rw-r--r-- | pkgs/applications/video/frigate/web.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/applications/video/frigate/web.nix b/pkgs/applications/video/frigate/web.nix new file mode 100644 index 000000000000..08b9cef19ee7 --- /dev/null +++ b/pkgs/applications/video/frigate/web.nix @@ -0,0 +1,26 @@ +{ 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 + ''; +} |