nixpkgs/pkgs/build-support/writers
DavHau 3e3ae4ecf5 writers: add support for wrapping
Add a makeWrapperArgs argument to all script writers under pkgs.writers.

This can be used to set, prefix, or suffix the PATH or other environment variables which improves the ability to generate scripts with reproducible behavior.

Some of the writers (writeBash, writeDash, writeFish, writeNu) previously did not support passing an argument set, for example
```
writeBash "example" "echo hello"

```

In order to add the new capability to these writers as well, their call signature is now overloaded in order to allow the following:
(The old call style from the example above remains intact)
```
writeBash "example"
  { makeWrapperArgs = [ "--prefix" "PATH" ":" "${pkgs.hello}/bin" ]; }
  ''
    hello
  ''
```

Done as well:
- add tests
- add more docs
- fix some misleading docs
- extend existing docs with more examples
2024-02-29 17:31:58 +07:00
..
aliases.nix writers.writePython2: remove 2021-12-15 09:56:14 +01:00
data.nix writers.makeDataWriter: Deprecate 2023-10-24 11:17:38 +02:00
default.nix pkgs.writers: remove tests that dont work anymore and add comments tracking issues 2024-01-30 06:48:35 +01:00
scripts.nix writers: add support for wrapping 2024-02-29 17:31:58 +07:00
test.nix writers: add support for wrapping 2024-02-29 17:31:58 +07:00