From 5a2a45aaa9832c7650996d61b6820c23cb7b8a26 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sat, 10 Oct 2026 17:12:21 -0400 Subject: [PATCH 1/7] Refresh Nix flake inputs for October 2026 maintenance Keep the existing release-25.11 input and refresh its pin alongside the PureScript overlay, mkSpagoDerivation, and transitive registry snapshots. Validated with all x86_64-linux flake checks and local Colmena evaluation. No server deployment performed. --- flake.lock | 49 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 2c8de5af..661979c4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,22 @@ { "nodes": { "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1765121682, @@ -36,6 +52,7 @@ }, "mkSpagoDerivation": { "inputs": { + "flake-compat": "flake-compat", "nixpkgs": [ "nixpkgs" ], @@ -46,11 +63,11 @@ "registry-index": "registry-index" }, "locked": { - "lastModified": 1773544941, - "narHash": "sha256-wsFwg1qVG05l3uKgUTYgaUVWN2WQo6YqNV9CN5apXd0=", + "lastModified": 1791092040, + "narHash": "sha256-xz/p6GF6sMBUiDG6mf1SX0iykS5YLRMcEKyJ0GFjpsM=", "owner": "jeslie0", "repo": "mkSpagoDerivation", - "rev": "ca79425e30161f76c361ec28a1f36da420978bbc", + "rev": "215877ffc52e3d5cd8caae3fb58a53181804111e", "type": "github" }, "original": { @@ -61,11 +78,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1773668560, - "narHash": "sha256-BT5ddsnYq1Rz9vcKJ10Z8SJM02MNG16bj3xh36GxIuQ=", + "lastModified": 1783375776, + "narHash": "sha256-pg6hLjDeAWaUOzh2JM2Cw0BwYpGtOyNr6A4FBwP9Ymo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0fe845bad97e290c5fec285440dea820814cb5d9", + "rev": "cd648d6ea62bc0ffba91e61fcfe5e33c1e2004b1", "type": "github" }, "original": { @@ -77,17 +94,17 @@ }, "purescript-overlay": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1774895468, - "narHash": "sha256-WCLAhAsqx0+MnsUWWi7CPwWAbcgk8I6D/YzjGEWp97w=", + "lastModified": 1780972251, + "narHash": "sha256-PwHYPpfLP+WjSwj765zJ1N0Xp4ET3+8vRqxJ031ua3M=", "owner": "thomashoneyman", "repo": "purescript-overlay", - "rev": "8efaeddf5b43d87756c9f1c86fae753b2f3bc30d", + "rev": "1cf88ab9d83596db0e0c0d304a16809c410e2917", "type": "github" }, "original": { @@ -99,11 +116,11 @@ "registry": { "flake": false, "locked": { - "lastModified": 1773502693, - "narHash": "sha256-ozYvo2yvd3PvvSmWXHyk0gIuY38dmdppH24o6apicMI=", + "lastModified": 1790949792, + "narHash": "sha256-L4etSm9pmReunpoPY9AhnhdsnjvNEzNWklaLF3z0Qmg=", "owner": "purescript", "repo": "registry", - "rev": "92c10b4ff699426d4e884af137d4d72e1cdd7809", + "rev": "2c1c273e1826e57589aafd35a455b8c53caed9d1", "type": "github" }, "original": { @@ -115,11 +132,11 @@ "registry-index": { "flake": false, "locked": { - "lastModified": 1773502179, - "narHash": "sha256-ZkpBwOy0hZYrtvtBU8xwiGQBVHvzURd1UTKvcGFGfyM=", + "lastModified": 1790869254, + "narHash": "sha256-aDV3ZcgO/w85ClNmfXRO0tFM3nGAMepfn8sIy+Ww0gw=", "owner": "purescript", "repo": "registry-index", - "rev": "002b33b64384a662cb57e087dfddce13c01330d0", + "rev": "6c01dc3a82e8abae2ec1c581976e7d42ac941e47", "type": "github" }, "original": { From 26a56ce9f2f9c44fc0403e9247b68f55a4900c3d Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sat, 10 Oct 2026 18:18:35 -0400 Subject: [PATCH 2/7] Upgrade to NixOS 26.05 with patched Node 24 and safe D-Bus staging Backport the upstream Node cleanup-hook fixes so better-sqlite3 remains stable on Node 24. Use the supported NixOS channel and updated node-gyp package attribute. Stage the dbus-daemon to dbus-broker transition for the next boot instead of live activation. Resume normal switching after an approved reboot, and document deployment and rollback behavior. --- .github/workflows/deploy.yml | 31 ++++++++++++++++++++++++++++++- CONTRIBUTING.md | 10 +++++++--- flake.lock | 8 ++++---- flake.nix | 2 +- nix/overlay.nix | 20 +++++++++++++++++++- 5 files changed, 61 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8d137a4..0803d2b3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,10 @@ on: push: branches: [master] +concurrency: + group: registry-deploy + cancel-in-progress: false + jobs: deploy: # Deploys should only occur from the master branch @@ -29,8 +33,33 @@ jobs: with: use-flakehub: false + - name: Select safe activation for the D-Bus transition + id: activation + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + set -euo pipefail + dbus=$(ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new root@registry.purescript.org \ + 'set -eu; pid=$(systemctl show --value --property=MainPID dbus.service); test "$pid" -gt 0; readlink -f "/proc/$pid/exe"') + case "$dbus" in + */dbus-daemon) goal=boot ;; + */dbus-broker-launch|*/dbus-broker) goal=switch ;; + *) + echo "::error::Unknown running D-Bus implementation; refusing deployment." + exit 1 + ;; + esac + echo "goal=$goal" >> "$GITHUB_OUTPUT" + - name: Deploy with Colmena env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - nix develop --command colmena apply + nix develop --command colmena apply "${{ steps.activation.outputs.goal }}" --on registry + + - name: Report staged transition + if: steps.activation.outputs.goal == 'boot' + run: | + echo "::notice::Configuration staged for next boot, not live-activated. An operator-approved reboot is required to switch to dbus-broker." + echo "### Awaiting approved reboot" >> "$GITHUB_STEP_SUMMARY" + echo "The new configuration is staged for the next boot. Production still runs the previous generation. After an approved reboot, verify the running generation, D-Bus, and registry API; subsequent deployments will use normal live activation." >> "$GITHUB_STEP_SUMMARY" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1214a486..0da43f31 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -293,13 +293,17 @@ The dashboard is deployed automatically by the `.github/workflows/dashboard.yml` ## Deployment -The registry is continuously deployed. The [deploy.yml](./.github/workflows/deploy.yml) file defines a GitHub Actions workflow to auto-deploy the server when a new commit is pushed to `master` and test workflows have passed. +The registry is continuously deployed. The [deploy.yml](./.github/workflows/deploy.yml) file defines a GitHub Actions workflow to deploy the server when a new commit is pushed to `master`. -However, you can manually deploy a new version of the registry server in one step: +The NixOS 26.05 upgrade changes D-Bus from `dbus-daemon` to `dbus-broker`. Restarting D-Bus in a running system is unsafe, so this transition requires a reboot. While production still runs `dbus-daemon`, the workflow uses `colmena apply boot --on registry`: it installs the new generation for the next boot without live activation or rebooting, and reports that the transition is staged. Further deployments also stage until an operator performs an approved reboot. Staging changes the next-boot configuration; any subsequent reboot will activate it. + +Before that reboot, confirm backup coverage and retain the previous generation for rollback. After the reboot, verify `/run/current-system`, `systemctl is-active dbus.service server.service nginx.service`, and `https://registry.purescript.org/api/v1/jobs`. Once production runs `dbus-broker`, the workflow returns to normal live activation. Unknown D-Bus implementations or failed SSH inspection stop deployment rather than attempting a switch. Do not bypass the NixOS switch checks: older generations may lack the inhibitor metadata needed to reject this transition. + +For routine updates after the transition, you can manually deploy a new version of the registry server in one step: ```sh # Will deploy the server to registry.purescript.org colmena apply ``` -If the deployment fails it will automatically be rolled back. If you have provisioned a new machine or need to update a secret, then you will first need to copy a valid `.env` file to `/var/lib/registry-server/.env` before the server will run. You can test that the server has come up appropriately by SSHing into the server and running `journalctl -u server.service`. +A failed Colmena deployment is not automatically rolled back. In particular, activation checks can fail after the persistent system profile has changed but before live activation or bootloader installation. Inspect the running generation and persistent profile before choosing recovery or rollback. If you have provisioned a new machine or need to update a secret, then you will first need to copy a valid `.env` file to `/var/lib/registry-server/.env` before the server will run. You can test that the server has come up appropriately by SSHing into the server and running `journalctl -u server.service`. diff --git a/flake.lock b/flake.lock index 661979c4..5f8013e5 100644 --- a/flake.lock +++ b/flake.lock @@ -78,16 +78,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1783375776, - "narHash": "sha256-pg6hLjDeAWaUOzh2JM2Cw0BwYpGtOyNr6A4FBwP9Ymo=", + "lastModified": 1791426274, + "narHash": "sha256-MWhktfFtFE8Jl7bf9Pkp7TR5MSdYCjCswSo0Gkb4ywc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cd648d6ea62bc0ffba91e61fcfe5e33c1e2004b1", + "rev": "7c8764b7c7b09b34f632464276218ef9090eaa11", "type": "github" }, "original": { "owner": "nixos", - "ref": "release-25.11", + "ref": "nixos-26.05", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 05213461..2f7842c0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "The PureScript Registry"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-25.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; flake-utils.url = "github:numtide/flake-utils"; purescript-overlay.url = "github:thomashoneyman/purescript-overlay"; diff --git a/nix/overlay.nix b/nix/overlay.nix index ccc913db..7c5447f1 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -137,6 +137,24 @@ let }; in { + # Node.js 24.21.0 can abort when better-sqlite3 statements are garbage-collected. + # Backport the upstream cleanup-hook registry fix and its teardown UAF fix. + nodejs-slim_24 = prev.nodejs-slim_24.overrideAttrs (old: { + patches = prev.lib.unique ( + old.patches + ++ [ + (prev.fetchurl { + url = "https://github.com/nodejs/node/commit/abe1b673e9b12588abcb6d74b0facedf6a3136dd.patch"; + hash = "sha256-LQHgWopP3P3JW8iX9tkvsHV1OH4WY7I5lbevnVjsqOk="; + }) + (prev.fetchurl { + url = "https://github.com/nodejs/node/commit/03e2b9bc42ae9c7ed4fbab5509d70fa934863c44.patch"; + hash = "sha256-dA5jols9WyGJKlL4XMoII9TClpkat7h79wlYlRgGSYM="; + }) + ] + ); + }); + # Spago lock: compiled PureScript dependencies for the entire workspace registry-spago-lock = prev.mkSpagoDerivation { name = "registry"; @@ -171,7 +189,7 @@ in [ # needed for better-sqlite python3 - nodePackages.node-gyp + node-gyp ] ++ prev.lib.optionals prev.stdenv.isDarwin [ prev.darwin.cctools ]; From 58c0aa15fe2f253a4cba6b494c9295a4f63cdc1c Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sat, 10 Oct 2026 18:28:33 -0400 Subject: [PATCH 3/7] Document Node patches and the D-Bus reboot without changing deployment --- .github/workflows/deploy.yml | 31 +------------------------------ CONTRIBUTING.md | 10 +++------- flake.nix | 2 ++ nix/overlay.nix | 8 +++++++- 4 files changed, 13 insertions(+), 38 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0803d2b3..f8d137a4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,10 +4,6 @@ on: push: branches: [master] -concurrency: - group: registry-deploy - cancel-in-progress: false - jobs: deploy: # Deploys should only occur from the master branch @@ -33,33 +29,8 @@ jobs: with: use-flakehub: false - - name: Select safe activation for the D-Bus transition - id: activation - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - run: | - set -euo pipefail - dbus=$(ssh -o BatchMode=yes -o StrictHostKeyChecking=accept-new root@registry.purescript.org \ - 'set -eu; pid=$(systemctl show --value --property=MainPID dbus.service); test "$pid" -gt 0; readlink -f "/proc/$pid/exe"') - case "$dbus" in - */dbus-daemon) goal=boot ;; - */dbus-broker-launch|*/dbus-broker) goal=switch ;; - *) - echo "::error::Unknown running D-Bus implementation; refusing deployment." - exit 1 - ;; - esac - echo "goal=$goal" >> "$GITHUB_OUTPUT" - - name: Deploy with Colmena env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | - nix develop --command colmena apply "${{ steps.activation.outputs.goal }}" --on registry - - - name: Report staged transition - if: steps.activation.outputs.goal == 'boot' - run: | - echo "::notice::Configuration staged for next boot, not live-activated. An operator-approved reboot is required to switch to dbus-broker." - echo "### Awaiting approved reboot" >> "$GITHUB_STEP_SUMMARY" - echo "The new configuration is staged for the next boot. Production still runs the previous generation. After an approved reboot, verify the running generation, D-Bus, and registry API; subsequent deployments will use normal live activation." >> "$GITHUB_STEP_SUMMARY" + nix develop --command colmena apply diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0da43f31..1214a486 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -293,17 +293,13 @@ The dashboard is deployed automatically by the `.github/workflows/dashboard.yml` ## Deployment -The registry is continuously deployed. The [deploy.yml](./.github/workflows/deploy.yml) file defines a GitHub Actions workflow to deploy the server when a new commit is pushed to `master`. +The registry is continuously deployed. The [deploy.yml](./.github/workflows/deploy.yml) file defines a GitHub Actions workflow to auto-deploy the server when a new commit is pushed to `master` and test workflows have passed. -The NixOS 26.05 upgrade changes D-Bus from `dbus-daemon` to `dbus-broker`. Restarting D-Bus in a running system is unsafe, so this transition requires a reboot. While production still runs `dbus-daemon`, the workflow uses `colmena apply boot --on registry`: it installs the new generation for the next boot without live activation or rebooting, and reports that the transition is staged. Further deployments also stage until an operator performs an approved reboot. Staging changes the next-boot configuration; any subsequent reboot will activate it. - -Before that reboot, confirm backup coverage and retain the previous generation for rollback. After the reboot, verify `/run/current-system`, `systemctl is-active dbus.service server.service nginx.service`, and `https://registry.purescript.org/api/v1/jobs`. Once production runs `dbus-broker`, the workflow returns to normal live activation. Unknown D-Bus implementations or failed SSH inspection stop deployment rather than attempting a switch. Do not bypass the NixOS switch checks: older generations may lack the inhibitor metadata needed to reject this transition. - -For routine updates after the transition, you can manually deploy a new version of the registry server in one step: +However, you can manually deploy a new version of the registry server in one step: ```sh # Will deploy the server to registry.purescript.org colmena apply ``` -A failed Colmena deployment is not automatically rolled back. In particular, activation checks can fail after the persistent system profile has changed but before live activation or bootloader installation. Inspect the running generation and persistent profile before choosing recovery or rollback. If you have provisioned a new machine or need to update a secret, then you will first need to copy a valid `.env` file to `/var/lib/registry-server/.env` before the server will run. You can test that the server has come up appropriately by SSHing into the server and running `journalctl -u server.service`. +If the deployment fails it will automatically be rolled back. If you have provisioned a new machine or need to update a secret, then you will first need to copy a valid `.env` file to `/var/lib/registry-server/.env` before the server will run. You can test that the server has come up appropriately by SSHing into the server and running `journalctl -u server.service`. diff --git a/flake.nix b/flake.nix index 2f7842c0..40a0bd72 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,8 @@ description = "The PureScript Registry"; inputs = { + # NixOS 26.05 defaults to dbus-broker; live deployment keeps dbus-daemon running. + # After a successful deployment, manually reboot to activate dbus-broker. nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; flake-utils.url = "github:numtide/flake-utils"; diff --git a/nix/overlay.nix b/nix/overlay.nix index 7c5447f1..e273e2fc 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -138,15 +138,21 @@ let in { # Node.js 24.21.0 can abort when better-sqlite3 statements are garbage-collected. - # Backport the upstream cleanup-hook registry fix and its teardown UAF fix. + # Their destructors remove Node cleanup hooks without a current JS environment, + # triggering Node's assertion that the environment is non-null. Patch Node rather + # than changing better-sqlite3; remove these backports once Node includes both fixes. nodejs-slim_24 = prev.nodejs-slim_24.overrideAttrs (old: { patches = prev.lib.unique ( old.patches ++ [ + # Allow cleanup-hook removal without a current JS environment: + # https://github.com/nodejs/node/commit/abe1b673e9b12588abcb6d74b0facedf6a3136dd (prev.fetchurl { url = "https://github.com/nodejs/node/commit/abe1b673e9b12588abcb6d74b0facedf6a3136dd.patch"; hash = "sha256-LQHgWopP3P3JW8iX9tkvsHV1OH4WY7I5lbevnVjsqOk="; }) + # Fix a use-after-free during environment teardown introduced by that fix: + # https://github.com/nodejs/node/commit/03e2b9bc42ae9c7ed4fbab5509d70fa934863c44 (prev.fetchurl { url = "https://github.com/nodejs/node/commit/03e2b9bc42ae9c7ed4fbab5509d70fa934863c44.patch"; hash = "sha256-dA5jols9WyGJKlL4XMoII9TClpkat7h79wlYlRgGSYM="; From 6fdbe2290bf0de252114890f4e897d08ebc96ea1 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sat, 10 Oct 2026 18:32:24 -0400 Subject: [PATCH 4/7] Keep the D-Bus reboot note in the pull request only --- flake.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/flake.nix b/flake.nix index 40a0bd72..2f7842c0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,8 +2,6 @@ description = "The PureScript Registry"; inputs = { - # NixOS 26.05 defaults to dbus-broker; live deployment keeps dbus-daemon running. - # After a successful deployment, manually reboot to activate dbus-broker. nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; flake-utils.url = "github:numtide/flake-utils"; From 52760f68e1bf03373cf10bdf1c6e1d92522f9f93 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sat, 10 Oct 2026 20:02:20 -0400 Subject: [PATCH 5/7] Upgrade better-sqlite3 to 13.0.3 and remove Node backports --- app/package.json | 2 +- foreign/package.json | 2 +- nix/overlay.nix | 34 +--- package-lock.json | 443 ++----------------------------------------- 4 files changed, 23 insertions(+), 458 deletions(-) diff --git a/app/package.json b/app/package.json index 643b167d..aae2ea25 100644 --- a/app/package.json +++ b/app/package.json @@ -4,7 +4,7 @@ "type": "module", "license": "BSD-3-Clause", "dependencies": { - "better-sqlite3": "^12.8.0", + "better-sqlite3": "^13.0.3", "registry-foreign": "file:../foreign", "registry-lib": "file:../lib", "yaml": "^2.8.2" diff --git a/foreign/package.json b/foreign/package.json index b177204f..c6e7eba4 100644 --- a/foreign/package.json +++ b/foreign/package.json @@ -8,7 +8,7 @@ "@octokit/plugin-retry": "^8.1.0", "@octokit/plugin-throttling": "^11.0.3", "@octokit/rest": "^22.0.1", - "better-sqlite3": "^12.8.0", + "better-sqlite3": "^13.0.3", "fast-glob": "^3.3.3", "fs-extra": "^11.3.4", "fuse.js": "^7.1.0", diff --git a/nix/overlay.nix b/nix/overlay.nix index e273e2fc..e3d720b3 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -137,30 +137,6 @@ let }; in { - # Node.js 24.21.0 can abort when better-sqlite3 statements are garbage-collected. - # Their destructors remove Node cleanup hooks without a current JS environment, - # triggering Node's assertion that the environment is non-null. Patch Node rather - # than changing better-sqlite3; remove these backports once Node includes both fixes. - nodejs-slim_24 = prev.nodejs-slim_24.overrideAttrs (old: { - patches = prev.lib.unique ( - old.patches - ++ [ - # Allow cleanup-hook removal without a current JS environment: - # https://github.com/nodejs/node/commit/abe1b673e9b12588abcb6d74b0facedf6a3136dd - (prev.fetchurl { - url = "https://github.com/nodejs/node/commit/abe1b673e9b12588abcb6d74b0facedf6a3136dd.patch"; - hash = "sha256-LQHgWopP3P3JW8iX9tkvsHV1OH4WY7I5lbevnVjsqOk="; - }) - # Fix a use-after-free during environment teardown introduced by that fix: - # https://github.com/nodejs/node/commit/03e2b9bc42ae9c7ed4fbab5509d70fa934863c44 - (prev.fetchurl { - url = "https://github.com/nodejs/node/commit/03e2b9bc42ae9c7ed4fbab5509d70fa934863c44.patch"; - hash = "sha256-dA5jols9WyGJKlL4XMoII9TClpkat7h79wlYlRgGSYM="; - }) - ] - ); - }); - # Spago lock: compiled PureScript dependencies for the entire workspace registry-spago-lock = prev.mkSpagoDerivation { name = "registry"; @@ -190,6 +166,14 @@ in dontNpmBuild = true; npmFlags = [ "--omit=optional" ]; + # better-sqlite3 v13 ships prebuilds and prefers them over a local build. + # Remove them and explicitly build against the Nix toolchain; gypfile = false + # prevents npm rebuild from doing this automatically. + postConfigure = '' + rm -rf node_modules/better-sqlite3/prebuilds + npm run build-release --prefix node_modules/better-sqlite3 + ''; + nativeBuildInputs = with prev; [ @@ -200,7 +184,7 @@ in ++ prev.lib.optionals prev.stdenv.isDarwin [ prev.darwin.cctools ]; # To update: run `nix build .#server` and copy the hash from the error - npmDepsHash = "sha256-qlHO3I/kb5/PDQA2aoVbSpvSnjS0CcJoEdGuCkAd+hA="; + npmDepsHash = "sha256-uj1LQ+Q9Zz8zguehJp9tQrEAMLoUm7BZEraCGQVGByQ="; installPhase = '' mkdir -p $out diff --git a/package-lock.json b/package-lock.json index 2ca82956..1131fac1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "name": "registry-app", "license": "BSD-3-Clause", "dependencies": { - "better-sqlite3": "^12.8.0", + "better-sqlite3": "^13.0.3", "registry-foreign": "file:../foreign", "registry-lib": "file:../lib", "yaml": "^2.8.2" @@ -30,7 +30,7 @@ "@octokit/plugin-retry": "^8.1.0", "@octokit/plugin-throttling": "^11.0.3", "@octokit/rest": "^22.0.1", - "better-sqlite3": "^12.8.0", + "better-sqlite3": "^13.0.3", "fast-glob": "^3.3.3", "fs-extra": "^11.3.4", "fuse.js": "^7.1.0", @@ -1878,26 +1878,6 @@ "safer-buffer": "~2.1.0" } }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -1914,37 +1894,15 @@ "license": "Apache-2.0" }, "node_modules/better-sqlite3": { - "version": "12.8.0", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.8.0.tgz", - "integrity": "sha512-RxD2Vd96sQDjQr20kdP+F+dK/1OUNiVOl200vKBZY8u0vTwysfolF6Hq+3ZK2+h8My9YvZhHsF+RSGZW2VYrPQ==", - "hasInstallScript": true, + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-13.0.3.tgz", + "integrity": "sha512-RbOBxmLBG8uvFUc15X9+9SFemKcQ0WBuISBVkpuiaUB2qblC8UWlHEjdWVoZ8AdhSwmoEgsiXKfopX0CQxaACQ==", "license": "MIT", "dependencies": { - "bindings": "^1.5.0", - "prebuild-install": "^7.1.1" + "node-addon-api": "^8.0.0" }, "engines": { - "node": "20.x || 22.x || 23.x || 24.x || 25.x" - } - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" + "node": ">=22" } }, "node_modules/bottleneck": { @@ -1971,30 +1929,6 @@ "node": ">=8" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/buildcheck": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.7.tgz", @@ -2027,57 +1961,6 @@ "node": ">=10.0.0" } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", - "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, "node_modules/fast-content-type-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-3.0.0.tgz", @@ -2153,12 +2036,6 @@ "reusify": "^1.0.4" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "license": "MIT" - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -2171,12 +2048,6 @@ "node": ">=8" } }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "license": "MIT" - }, "node_modules/fs-extra": { "version": "11.3.4", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz", @@ -2200,12 +2071,6 @@ "node": ">=10" } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "license": "MIT" - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2224,38 +2089,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2335,27 +2168,6 @@ "node": ">=8.6" } }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/minipass": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", @@ -2377,12 +2189,6 @@ "node": ">= 18" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "license": "MIT" - }, "node_modules/nan": { "version": "2.25.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.25.0.tgz", @@ -2390,31 +2196,13 @@ "license": "MIT", "optional": true }, - "node_modules/napi-build-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", - "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", - "license": "MIT" - }, - "node_modules/node-abi": { - "version": "3.89.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.89.0.tgz", - "integrity": "sha512-6u9UwL0HlAl21+agMN3YAMXcKByMqwGx+pq+P76vii5f7hTPtKDp08/H9py6DY+cfDw7kQNTGEj/rly3IgbNQA==", + "node_modules/node-addon-api": { + "version": "8.9.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.9.2.tgz", + "integrity": "sha512-VijLXbi3UACN69I0JVXJsX4tjACjNoQDgv2gTF6sx2wWEi8tkSg2eX8p5gSIFi8z2+DL3oHmY6OyKce38SDolg==", "license": "MIT", - "dependencies": { - "semver": "^7.3.5" - }, "engines": { - "node": ">=10" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" + "node": "^18 || ^20 || >= 21" } }, "node_modules/path-expression-matcher": { @@ -2444,43 +2232,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/prebuild-install": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", - "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", - "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", - "license": "MIT", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^2.0.0", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/pump": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", - "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -2501,35 +2252,6 @@ ], "license": "MIT" }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/registry-app": { "resolved": "app", "link": true @@ -2575,26 +2297,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -2613,51 +2315,6 @@ "node": ">=10" } }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, "node_modules/spdx-exceptions": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", @@ -2697,24 +2354,6 @@ "nan": "^2.23.0" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strnum": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.0.tgz", @@ -2743,40 +2382,6 @@ "node": ">=18" } }, - "node_modules/tar-fs": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", - "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "license": "ISC" - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tmp": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz", @@ -2804,18 +2409,6 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", @@ -2837,18 +2430,6 @@ "node": ">= 10.0.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, "node_modules/yallist": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", From d658ec0c390162e95fb3a89a43481243cfd1af9b Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sun, 11 Oct 2026 07:04:04 -0400 Subject: [PATCH 6/7] Clarify the better-sqlite3 source build comment --- nix/overlay.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nix/overlay.nix b/nix/overlay.nix index e3d720b3..11a21b6b 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -166,9 +166,8 @@ in dontNpmBuild = true; npmFlags = [ "--omit=optional" ]; - # better-sqlite3 v13 ships prebuilds and prefers them over a local build. - # Remove them and explicitly build against the Nix toolchain; gypfile = false - # prevents npm rebuild from doing this automatically. + # Build better-sqlite3 with the Nix toolchain. Its loader prefers bundled + # binaries, so remove those before explicitly building from source. postConfigure = '' rm -rf node_modules/better-sqlite3/prebuilds npm run build-release --prefix node_modules/better-sqlite3 From 0b93b371cd3a6dbedf21a0fdd3a3ebe59bdfb248 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Sun, 11 Oct 2026 07:17:38 -0400 Subject: [PATCH 7/7] Use the bundled better-sqlite3 addon without custom build steps --- nix/overlay.nix | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/nix/overlay.nix b/nix/overlay.nix index 11a21b6b..4dad587c 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -158,7 +158,7 @@ in installPhase = "mkdir $out; cp -r * $out"; }; - # NPM lock: JavaScript dependencies (esbuild, node-gyp, etc.) + # NPM lock: JavaScript dependencies registry-package-lock = prev.buildNpmPackage { pname = "purescript-registry"; version = "0.0.1"; @@ -166,22 +166,6 @@ in dontNpmBuild = true; npmFlags = [ "--omit=optional" ]; - # Build better-sqlite3 with the Nix toolchain. Its loader prefers bundled - # binaries, so remove those before explicitly building from source. - postConfigure = '' - rm -rf node_modules/better-sqlite3/prebuilds - npm run build-release --prefix node_modules/better-sqlite3 - ''; - - nativeBuildInputs = - with prev; - [ - # needed for better-sqlite - python3 - node-gyp - ] - ++ prev.lib.optionals prev.stdenv.isDarwin [ prev.darwin.cctools ]; - # To update: run `nix build .#server` and copy the hash from the error npmDepsHash = "sha256-uj1LQ+Q9Zz8zguehJp9tQrEAMLoUm7BZEraCGQVGByQ=";