1 { lib, stdenv, fetchFromGitHub, buildNpmPackage, python3, nodejs, nixosTests }:
7 src = fetchFromGitHub {
11 hash = "sha256-PhIe2aDz6hr8001LL8N5L8jcUyzuamU0yYIVKcwmTlw=";
14 npmDepsHash = "sha256-Jyp/xY9K3sfqVnR7NQhgly8B54FmvnrStFO2GO2Kszs=";
17 # Fixes the permissions of the database being not set correctly
18 # See https://github.com/louislam/uptime-kuma/pull/2119
19 ./fix-database-permissions.patch
22 nativeBuildInputs = [ python3 ];
24 CYPRESS_INSTALL_BINARY = 0; # Stops Cypress from trying to download binaries
27 cp -r dist $out/lib/node_modules/uptime-kuma/
29 # remove references to nodejs source
30 rm -r $out/lib/node_modules/uptime-kuma/node_modules/@louislam/sqlite3/build-tmp-napi-v6
34 makeWrapper ${nodejs}/bin/node $out/bin/uptime-kuma-server \
35 --add-flags $out/lib/node_modules/uptime-kuma/server/server.js \
36 --chdir $out/lib/node_modules/uptime-kuma
39 passthru.tests.uptime-kuma = nixosTests.uptime-kuma;
42 description = "A fancy self-hosted monitoring tool";
43 mainProgram = "uptime-kuma-server";
44 homepage = "https://github.com/louislam/uptime-kuma";
45 changelog = "https://github.com/louislam/uptime-kuma/releases/tag/${version}";
46 license = licenses.mit;
47 maintainers = with maintainers; [ julienmalka ];
48 # FileNotFoundError: [Errno 2] No such file or directory: 'xcrun'
49 broken = stdenv.isDarwin;