From 1ef12cb81861007fe1aead58deb802f4a3da70e4 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 5 Jun 2023 23:35:14 +0200 Subject: [PATCH] packages/uptime-kuma: drop --- .../dream2nix-overrides/nodejs/default.nix | 42 ------------------- .../nodejs/uptime-kuma/chmod-database.patch | 12 ------ packages/projects.nix | 9 ---- packages/sources/sources.json | 14 ------- packages/system-filter.nix | 1 - 5 files changed, 78 deletions(-) delete mode 100644 packages/dream2nix-overrides/nodejs/uptime-kuma/chmod-database.patch diff --git a/packages/dream2nix-overrides/nodejs/default.nix b/packages/dream2nix-overrides/nodejs/default.nix index f17d7d6..13dae6c 100644 --- a/packages/dream2nix-overrides/nodejs/default.nix +++ b/packages/dream2nix-overrides/nodejs/default.nix @@ -48,46 +48,4 @@ in # HACK: doesn't build, but we don't need it anywhere configurePhase = "exit 0"; }; - - uptime-kuma.runtime-bugfixes = { - patches = [ - ./uptime-kuma/chmod-database.patch - ]; - }; - - uptime-kuma.build = { - # HACK: rollup.js is garbage and expects the contents of node_modules to not be symlinks - # obey its wishes by copying dependencies into place - preBuild = '' - cp -r node_modules $NIX_BUILD_TOP/node_modules_saved - find node_modules node_modules/@* -maxdepth 1 -type l -exec \ - bash -c 'LOC=$(readlink -f {}); echo unsymlinking: {}; rm {}; cp -r $LOC {}' \; - - chmod +w -R node_modules - find node_modules -mindepth 2 -name node_modules | xargs rm -rf - ''; - - preInstall = '' - echo restoring original node_modules directory - rm -rf node_modules - mv $NIX_BUILD_TOP/node_modules_saved node_modules - ''; - - # unfortunately, upstream's installMethod = copy results in bloat, so we can't use it - installMethod = "symlink"; - - postInstall = '' - makeWrapper $(command -v node) $out/bin/uptime-kuma \ - --add-flags "server/server.js" \ - --run "cd $out/lib/node_modules/uptime-kuma" \ - --set NODE_PATH "$out/lib/node_modules/uptime-kuma/node_modules" - ''; - }; - - "@louislam/sqlite3".closure-bloat = { - postFixup = '' - rm -rf build-*/ - find $out -type d -name '*-node-addon-api-*' -print0 | xargs -0 rm -rf - ''; - }; } diff --git a/packages/dream2nix-overrides/nodejs/uptime-kuma/chmod-database.patch b/packages/dream2nix-overrides/nodejs/uptime-kuma/chmod-database.patch deleted file mode 100644 index 9c3f39c..0000000 --- a/packages/dream2nix-overrides/nodejs/uptime-kuma/chmod-database.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/server/server.js b/server/server.js -index 73ea3f5..31b8028 100644 ---- a/server/server.js -+++ b/server/server.js -@@ -1541,6 +1541,7 @@ async function initDatabase(testMode = false) { - if (! fs.existsSync(Database.path)) { - log.info("server", "Copying Database"); - fs.copyFileSync(Database.templatePath, Database.path); -+ fs.chmodSync(Database.path, 0o600); - } - - log.info("server", "Connecting to the Database"); diff --git a/packages/projects.nix b/packages/projects.nix index e837cf9..4bb92d7 100644 --- a/packages/projects.nix +++ b/packages/projects.nix @@ -25,13 +25,6 @@ { dream2nix = { inputs = filters.doFilter filters.packages { - uptime-kuma = { - source = pins.uptime-kuma; - projects.uptime-kuma = { - subsystem = "nodejs"; - translator = "package-lock"; - }; - }; excalidraw = { source = pins.excalidraw; projects.excalidraw = { @@ -73,8 +66,6 @@ searxng = pkgs.callPackage ./web-apps/searxng { inherit pins; }; stevenblack-hosts = pkgs.callPackage ./data/stevenblack { inherit pins; }; - - inherit (config.dream2nix.outputs.uptime-kuma.packages) uptime-kuma; }; projectShells = { diff --git a/packages/sources/sources.json b/packages/sources/sources.json index af07c74..959c00d 100644 --- a/packages/sources/sources.json +++ b/packages/sources/sources.json @@ -65,20 +65,6 @@ "revision": "41aa497c72b64bb236771ff0cac0d92c7bf9c119", "url": "https://api.github.com/repos/grafana/tempo/tarball/v2.1.1", "hash": "1hxziwaj9cr14v3f5xxm99v66w4025zx6j6yw8zs2kgk1v14d9rw" - }, - "uptime-kuma": { - "type": "GitRelease", - "repository": { - "type": "GitHub", - "owner": "louislam", - "repo": "uptime-kuma" - }, - "pre_releases": false, - "version_upper_bound": null, - "version": "1.21.0", - "revision": "72317633d982a111f74c23c6b675bdba93e8f6aa", - "url": "https://api.github.com/repos/louislam/uptime-kuma/tarball/1.21.0", - "hash": "0hghh8h4zcxaxlb42cbj84d3m0nwg40k5v3sba05px1iz4y7637k" } }, "version": 2 diff --git a/packages/system-filter.nix b/packages/system-filter.nix index 1c5948c..225c25b 100644 --- a/packages/system-filter.nix +++ b/packages/system-filter.nix @@ -9,7 +9,6 @@ prometheus-jitsi-exporter = [ "aarch64-linux" ]; searxng = [ "x86_64-linux" ]; tempo = [ "x86_64-linux" ]; - uptime-kuma = [ "x86_64-linux" ]; }; checks = { keycloak = [ "x86_64-linux" ];