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