packages/uptime-kuma: drop

This commit is contained in:
Max Headroom 2023-06-05 23:35:14 +02:00
parent d93f24b53e
commit 1ef12cb818
5 changed files with 0 additions and 78 deletions

View file

@ -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
'';
};
}

View file

@ -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");

View file

@ -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 = {

View file

@ -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

View file

@ -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" ];