node-gyp-build: migrate from nodePackages (#465670)

This commit is contained in:
Tomodachi94
2025-11-28 05:36:09 +00:00
committed by GitHub
7 changed files with 56 additions and 25 deletions
@@ -1,6 +1,6 @@
{
fetchFromGitHub,
nodePackages,
node-gyp-build,
makeBinaryWrapper,
nodejs,
pnpm_10,
@@ -56,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ];
buildInputs = [
nodePackages.node-gyp-build
node-gyp-build
];
env.PYTHON = "${python3}/bin/python";
+2 -2
View File
@@ -10,7 +10,7 @@
python3,
xorg,
fontconfig,
nodePackages,
node-gyp-build,
ripgrep,
pkg-config,
libsecret,
@@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
(python3.withPackages (ps: with ps; [ packaging ]))
pkg-config
nodejs
nodePackages.node-gyp-build
node-gyp-build
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
xcbuild
@@ -4,7 +4,7 @@
fetchFromGitHub,
fetchYarnDeps,
fixup-yarn-lock,
nodejs,
node-gyp-build,
nodejs-slim,
matrix-sdk-crypto-nodejs,
nixosTests,
@@ -44,7 +44,7 @@ stdenv.mkDerivation {
fixup-yarn-lock
nodejs-slim
yarn
nodejs.pkgs.node-gyp-build
node-gyp-build
];
configurePhase = ''
@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
nodejs,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "node-gyp-build";
version = "4.8.4";
src = fetchFromGitHub {
owner = "prebuild";
repo = "node-gyp-build";
tag = "v${finalAttrs.version}";
hash = "sha256-65EQGGpwL0C8AOhFyf62nVEt4e2pCS0lAv+20kt3Zdk=";
};
dontBuild = true;
buildInputs = [
nodejs
];
installPhase = ''
runHook preInstall
mkdir -p $out/lib/node_modules/node-gyp-build
mkdir -p $out/bin
chmod +x ./{bin,build-test,optional}.js
mv *.js package.json $out/lib/node_modules/node-gyp-build
ln -s $out/lib/node_modules/node-gyp-build/bin.js $out/bin/node-gyp-build
ln -s $out/lib/node_modules/node-gyp-build/optional.js $out/bin/node-gyp-build-optional
ln -s $out/lib/node_modules/node-gyp-build/build-test.js $out/bin/node-gyp-build-test
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Build tool and bindings loader for node-gyp that supports prebuilds";
homepage = "https://github.com/prebuild/node-gyp-build";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
mainProgram = "node-gyp-build";
};
})
@@ -252,6 +252,7 @@ mapAliases {
near-cli = throw "'near-cli' has been removed as upstream has deprecated it and archived the source code repo"; # Added 2025-11-10
neovim = pkgs.neovim-node-client; # added 2024-11-13
nijs = throw "'nijs' has been removed as it was unmaintained upstream"; # Added 2025-11-14
inherit (pkgs) node-gyp-build; # Added 2025-11-27
node-inspector = throw "node-inspector was removed because it was broken"; # added 2023-08-21
inherit (pkgs) node-gyp; # added 2024-08-13
inherit (pkgs) node-pre-gyp; # added 2024-08-05
@@ -21,7 +21,6 @@
, "jsdoc"
, "lcov-result-merger"
, "mathjax"
, "node-gyp-build"
, "node2nix"
, "postcss"
, "prebuild-install"
-18
View File
@@ -23635,24 +23635,6 @@ in
bypassCache = true;
reconstructLock = true;
};
node-gyp-build = nodeEnv.buildNodePackage {
name = "node-gyp-build";
packageName = "node-gyp-build";
version = "4.8.4";
src = fetchurl {
url = "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz";
sha512 = "LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==";
};
buildInputs = globalBuildInputs;
meta = {
description = "Build tool and bindings loader for node-gyp that supports prebuilds";
homepage = "https://github.com/prebuild/node-gyp-build";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
node2nix = nodeEnv.buildNodePackage {
name = "node2nix";
packageName = "node2nix";