node-gyp-build: migrate from nodePackages

This commit is contained in:
dish
2025-11-27 11:34:04 -05:00
parent 9daa6b5853
commit 7cb019f1ad
4 changed files with 50 additions and 19 deletions
@@ -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";