{ pkgs, lib, fetchFromGitHub, buildNpmPackage, python3, nodejs, nixosTests }: buildNpmPackage rec { pname = "uptime-kuma"; version = "1.19.6"; src = fetchFromGitHub { owner = "louislam"; repo = "uptime-kuma"; rev = version; sha256 = "sha256-Hk0me4VPP8vKp4IhzQKjjhM2BWLGSHnN7JiDJu2WlE8="; }; npmDepsHash = "sha256-lVMPxUe+W/FlFQS2L+/UfpC21pIKJE89clmJywSv7w4="; patches = [ ./fix-database-permissions.patch ]; nativeBuildInputs = [ python3 ]; CYPRESS_INSTALL_BINARY = 0; postInstall = '' cp -r dist $out/lib/node_modules/uptime-kuma/ ''; 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 = "A fancy self-hosted monitoring tool"; homepage = "https://github.com/louislam/uptime-kuma"; license = licenses.mit; maintainers = with maintainers; [ julienmalka ]; }; }