Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.3 KiB
Nix

{
lib,
srcOnly,
stdenv,
makeSetupHook,
makeWrapper,
nodejs,
jq,
prefetch-npm-deps,
diffutils,
installShellFiles,
nodejsInstallManuals,
nodejsInstallExecutables,
}:
{
npmConfigHook = makeSetupHook {
name = "npm-config-hook";
substitutions = {
nodeSrc = srcOnly nodejs;
nodeGyp = "${nodejs}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js";
npmArch = stdenv.targetPlatform.node.arch;
npmPlatform = stdenv.targetPlatform.node.platform;
# Specify `diff`, `jq`, and `prefetch-npm-deps` by abspath to ensure that the user's build
# inputs do not cause us to find the wrong binaries.
diff = "${diffutils}/bin/diff";
jq = "${jq}/bin/jq";
prefetchNpmDeps = "${prefetch-npm-deps}/bin/prefetch-npm-deps";
nodeVersion = nodejs.version;
nodeVersionMajor = lib.versions.major nodejs.version;
};
} ./npm-config-hook.sh;
npmBuildHook = makeSetupHook {
name = "npm-build-hook";
} ./npm-build-hook.sh;
npmInstallHook = makeSetupHook {
name = "npm-install-hook";
propagatedBuildInputs = [
installShellFiles
makeWrapper
nodejsInstallManuals
(nodejsInstallExecutables.override {
inherit nodejs;
})
];
substitutions = {
jq = "${jq}/bin/jq";
};
} ./npm-install-hook.sh;
}