Files
nixpkgs/pkgs/by-name/up/uptime-kuma/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.6 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
buildNpmPackage,
python3,
nodejs,
nixosTests,
}:
buildNpmPackage rec {
pname = "uptime-kuma";
version = "1.23.16";
src = fetchFromGitHub {
owner = "louislam";
repo = "uptime-kuma";
rev = version;
hash = "sha256-+bhKnyZnGd+tNlsxvP96I9LXOca8FmOPhIFHp7ijmyA=";
};
npmDepsHash = "sha256-5i1NxwHqOahkioyM4wSu2X5KeMu7CdC4BqoUooAshn4=";
patches = [
# Fixes the permissions of the database being not set correctly
# See https://github.com/louislam/uptime-kuma/pull/2119
./fix-database-permissions.patch
];
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 = {
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 = lib.licenses.mit;
maintainers = with lib.maintainers; [ julienmalka ];
# FileNotFoundError: [Errno 2] No such file or directory: 'xcrun'
broken = stdenv.hostPlatform.isDarwin;
};
}