Fix node-gyp builds: add PYTHON env var, expat, relax sandboxing
Some checks failed
nix-bitcoin tests / build_test_drivers (push) Has been cancelled
nix-bitcoin tests / check_flake (push) Has been cancelled
nix-bitcoin tests / test_scenario (default) (push) Has been cancelled
nix-bitcoin tests / test_scenario (joinmarket-bitcoind-29) (push) Has been cancelled
nix-bitcoin tests / test_scenario (netns) (push) Has been cancelled
nix-bitcoin tests / test_scenario (netnsRegtest) (push) Has been cancelled

This commit is contained in:
Patrick Mulligan 2026-01-09 22:44:18 +01:00
parent 6cc376e24e
commit 05f5971eed

View file

@ -310,8 +310,17 @@ in
# Common native dependencies for Node.js modules # Common native dependencies for Node.js modules
libuv libuv
openssl openssl
# Additional dependencies for some npm packages
expat # for node-expat
]; ];
environment = {
# Tell node-gyp where to find Python
PYTHON = "${pkgs.python3}/bin/python3";
# Ensure HOME is set for npm/pnpm cache
HOME = cfg.dataDir;
};
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
@ -320,7 +329,10 @@ in
# Build can take a while, especially on first run # Build can take a while, especially on first run
TimeoutStartSec = "30min"; TimeoutStartSec = "30min";
# Allow write access to data directory for cloning and building # Allow write access to data directory for cloning and building
ReadWritePaths = [ cfg.dataDir ]; ReadWritePaths = [ cfg.dataDir "/tmp" ];
# Relax sandboxing for build scripts
PrivateTmp = false;
NoNewPrivileges = false;
}; };
script = '' script = ''