2023-02-03 21:09:48 +00:00
|
|
|
{ buildNpmPackage
|
|
|
|
, src
|
|
|
|
, version
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildNpmPackage {
|
|
|
|
pname = "frigate-web";
|
|
|
|
inherit version src;
|
|
|
|
|
2023-07-25 13:27:31 +00:00
|
|
|
sourceRoot = "${src.name}/web";
|
2023-02-03 21:09:48 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace package.json \
|
2024-02-01 22:09:56 +00:00
|
|
|
--replace-fail "--base=/BASE_PATH/" ""
|
2023-02-03 21:09:48 +00:00
|
|
|
|
|
|
|
substituteInPlace src/routes/Storage.jsx \
|
2024-02-01 22:09:56 +00:00
|
|
|
--replace-fail "/media/frigate" "/var/lib/frigate" \
|
|
|
|
--replace-fail "/tmp/cache" "/var/cache/frigate"
|
2023-02-03 21:09:48 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-01 22:09:56 +00:00
|
|
|
npmDepsHash = "sha256-+36quezGArqIM9dM+UihwcIgmE3EVmJQThuicLgDW4A=";
|
2023-02-03 21:09:48 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -rv dist/ $out
|
|
|
|
'';
|
|
|
|
}
|