mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
doc: Add documentation on nodejsInstallExecutables
This commit is contained in:
@@ -27,6 +27,7 @@ libxml2.section.md
|
||||
meson.section.md
|
||||
mpi-check-hook.section.md
|
||||
ninja.section.md
|
||||
nodejs-install-executables.section.md
|
||||
npm-build-hook.section.md
|
||||
npm-config-hook.section.md
|
||||
npm-install-hook.section.md
|
||||
|
||||
29
doc/hooks/nodejs-install-executables.section.md
Normal file
29
doc/hooks/nodejs-install-executables.section.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# nodejsInstallExecutables {#nodejs-install-executables}
|
||||
|
||||
Hook for wrapping Node.js executables.
|
||||
Primarily created for a multi-language environment.
|
||||
|
||||
## Examples {#nodejs-install-executables-example}
|
||||
|
||||
[](#npm-build-hook-example-snippet)
|
||||
|
||||
## Variables controlling `nodejsInstallExecutables` {#nodejs-install-executables-variables}
|
||||
|
||||
### `nodejsInstallExecutables` Exclusive Variables {#nodejs-install-executables-exclusive-variables}
|
||||
|
||||
#### `makeWrapperArgs` {#nodejs-install-executables-wrapper-args}
|
||||
|
||||
Flags to pass to the call to [`makeWrapper`](#fun-makeWrapper).
|
||||
To avoid double-wrapping, this flag can also be accessed in Bash.
|
||||
|
||||
```nix
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
#...
|
||||
dontWrapGApps = true;
|
||||
|
||||
postInstall = ''
|
||||
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
'';
|
||||
#...
|
||||
})
|
||||
```
|
||||
@@ -14,6 +14,7 @@ Hook for building packages that use npm. Can be used in multi-language environme
|
||||
fetchFromGitHub,
|
||||
fetchNpmDeps,
|
||||
npmHooks,
|
||||
nodejsInstallExecutables,
|
||||
nodejs,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -31,6 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
nodejsInstallExecutables
|
||||
npmHooks.npmConfigHook
|
||||
npmHooks.npmBuildHook
|
||||
npmHooks.npmInstallHook
|
||||
@@ -51,11 +53,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "...";
|
||||
};
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--set"
|
||||
"NODE_ENV"
|
||||
"production"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "npm project";
|
||||
};
|
||||
})
|
||||
|
||||
```
|
||||
:::
|
||||
|
||||
|
||||
@@ -203,6 +203,21 @@
|
||||
"no-broken-symlinks.sh": [
|
||||
"index.html#no-broken-symlinks.sh"
|
||||
],
|
||||
"nodejs-install-executables": [
|
||||
"index.html#nodejs-install-executables"
|
||||
],
|
||||
"nodejs-install-executables-example": [
|
||||
"index.html#nodejs-install-executables-example"
|
||||
],
|
||||
"nodejs-install-executables-exclusive-variables": [
|
||||
"index.html#nodejs-install-executables-exclusive-variables"
|
||||
],
|
||||
"nodejs-install-executables-variables": [
|
||||
"index.html#nodejs-install-executables-variables"
|
||||
],
|
||||
"nodejs-install-executables-wrapper-args": [
|
||||
"index.html#nodejs-install-executables-wrapper-args"
|
||||
],
|
||||
"nostrictaliasing": [
|
||||
"index.html#nostrictaliasing"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user