3
0
Fork 0
forked from mirrors/nixpkgs

wrapProgramBinary -> binaryWrapProgram

This commit is contained in:
Doron Behar 2021-12-08 18:59:38 +02:00
parent 7cf1aa102a
commit 32d566e1b9
2 changed files with 4 additions and 4 deletions

View file

@ -796,7 +796,7 @@ A setup-hook very similar to `makeWrapper`, only it creates a tiny _compiled_ wr
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.
Similarly to `wrapProgram`, the `makeBinaryWrapper` setup-hook provides a `wrapProgramBinary` with similar command line arguments.
Similarly to `wrapProgram`, the `makeBinaryWrapper` setup-hook provides a `binaryWrapProgram` with similar command line arguments.
### `substitute` \<infile\> \<outfile\> \<subs\> {#fun-substitute}
@ -875,7 +875,7 @@ Convenience function for `makeWrapper` that replaces `<\executable\>` with a wra
If you will apply it multiple times, it will overwrite the wrapper file and you will end up with double wrapping, which should be avoided.
### `wrapProgramBinary` \<executable\> \<makeBinaryWrapperArgs\> {#fun-wrapProgramBinary}
### `binaryWrapProgram` \<executable\> \<makeBinaryWrapperArgs\> {#fun-binaryWrapProgram}
Convenience function for `makeBinaryWrapper` that replaces `<\executable\>` with a wrapper that executes the original program. It takes all the same arguments as `makeBinaryWrapper`, except for `--argv0`.

View file

@ -34,8 +34,8 @@ makeBinaryWrapper() {
makeDocumentedCWrapper "$1" "${@:3}" | cc -Os -x c -o "$2" -
}
# Syntax: wrapProgramBinary <PROGRAM> <MAKE-WRAPPER FLAGS...>
wrapProgramBinary() {
# Syntax: binaryWrapProgram <PROGRAM> <MAKE-WRAPPER FLAGS...>
binaryWrapProgram() {
local prog="$1"
local hidden