mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 18:09:06 +02:00
feat: update uptime-kuma to 2.0, declarative config
This commit is contained in:
parent
bff13e5ba9
commit
e5937ee297
4 changed files with 66 additions and 5 deletions
53
packages/uptime-kuma-beta/default.nix
Normal file
53
packages/uptime-kuma-beta/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
buildNpmPackage,
|
||||
python3,
|
||||
nodejs,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "uptime-kuma";
|
||||
version = "2.0.0-beta.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "louislam";
|
||||
repo = "uptime-kuma";
|
||||
rev = version;
|
||||
hash = "sha256-QWGrwysPS5BxhtjluI30pKWCUo7O3kpL4K8uEb5J3Ik=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-DuXBu536Ro6NA3pPnP1mL+hBdgKCSudV0rxD2vZwX3o=";
|
||||
|
||||
nativeBuildInputs = [ python3 ];
|
||||
|
||||
CYPRESS_INSTALL_BINARY = 0; # Stops Cypress from trying to download binaries
|
||||
|
||||
postInstall = ''
|
||||
cp -r dist $out/lib/node_modules/uptime-kuma/
|
||||
|
||||
# remove references to nodejs source
|
||||
rm -r $out/lib/node_modules/uptime-kuma/node_modules/@louislam/sqlite3/build-tmp-napi-v6
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
makeWrapper ${nodejs}/bin/node $out/bin/uptime-kuma-server \
|
||||
--add-flags $out/lib/node_modules/uptime-kuma/server/server.js \
|
||||
--chdir $out/lib/node_modules/uptime-kuma
|
||||
'';
|
||||
|
||||
passthru.tests.uptime-kuma = nixosTests.uptime-kuma;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fancy self-hosted monitoring tool";
|
||||
mainProgram = "uptime-kuma-server";
|
||||
homepage = "https://github.com/louislam/uptime-kuma";
|
||||
changelog = "https://github.com/louislam/uptime-kuma/releases/tag/${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ julienmalka ];
|
||||
# FileNotFoundError: [Errno 2] No such file or directory: 'xcrun'
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue