summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2021-10-20 08:58:17 +0300
committerDoron Behar <doron.behar@gmail.com>2021-10-20 08:59:29 +0300
commiteb048d8fe26e029d662ee9300ff87c616baf2076 (patch)
treeffe2d6833624028484ead0f6c345baaf18fd398e /doc
parenta95a7a22be0c0768df613c4c74981374259665d6 (diff)
downloadnixpkgs-eb048d8fe26e029d662ee9300ff87c616baf2076.tar
nixpkgs-eb048d8fe26e029d662ee9300ff87c616baf2076.tar.gz
nixpkgs-eb048d8fe26e029d662ee9300ff87c616baf2076.tar.bz2
nixpkgs-eb048d8fe26e029d662ee9300ff87c616baf2076.tar.lz
nixpkgs-eb048d8fe26e029d662ee9300ff87c616baf2076.tar.xz
nixpkgs-eb048d8fe26e029d662ee9300ff87c616baf2076.tar.zst
nixpkgs-eb048d8fe26e029d662ee9300ff87c616baf2076.zip
Rephrase makeWrapper setup-hook
Diffstat (limited to 'doc')
-rw-r--r--doc/stdenv/stdenv.chapter.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md
index 031880fbc68..71caddd8aa4 100644
--- a/doc/stdenv/stdenv.chapter.md
+++ b/doc/stdenv/stdenv.chapter.md
@@ -774,7 +774,7 @@ The standard environment provides a number of useful functions.
 
 ### `makeWrapper` \<executable\> \<wrapperfile\> \<args\> {#fun-makeWrapper}
 
-A setup-hook that can be added to a derivation's inputs. It adds a `makeWrapper` bash function that constructs a wrapper for a program with various possible arguments. For example:
+Constructs a wrapper for a program with various possible arguments. It is defined as part of a setup-hook by the same name, so to use it you have to add `makeWrapper` to your `nativeBuildInputs`. Here's a usage example:
 
 ```bash
 # adds `FOOBAR=baz` to `$out/bin/foo`’s environment
@@ -792,7 +792,7 @@ There’s many more kinds of arguments, they are documented in `nixpkgs/pkgs/bui
 
 ### `makeBinaryWrapper` \<executable\> \<wrapperfile\> \<args\> {#fun-makeBinaryWrapper}
 
-A setup-hook very similar to `makeWrapper`, only it creates a tiny compiled wrapper executable, that can be used as a shebang interpreter. This is needed mostly on Darwin, where shebangs cannot point to scripts, [due to a limitation with the `execve`-syscall](https://stackoverflow.com/questions/67100831/macos-shebang-with-absolute-path-not-working). The arguments it accepts are <!-- TODO: make them identical? --> similar to those of `makeWrapper` and they are documented in `nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper.sh`.
+A setup-hook very similar to `makeWrapper`, only it creates a tiny _compiled_ wrapper executable, that can be used as a shebang interpreter. This is needed mostly on Darwin, where shebangs cannot point to scripts, [due to a limitation with the `execve`-syscall](https://stackoverflow.com/questions/67100831/macos-shebang-with-absolute-path-not-working). The arguments it accepts are <!-- TODO: make them identical? --> similar to those of `makeWrapper` and they are documented in `nixpkgs/pkgs/build-support/setup-hooks/make-binary-wrapper.sh`.
 
 Compiled wrappers generated by `makeBinaryWrapper` can be inspected with `less <path-to-wrapper>` - by scrolling past the binary data you should be able to see the C code that generated the executable and there see the environment variables that were injected into the wrapper.