query
On this page

writeDashBin

pkgs.writers.writeDashBin

Functor
Docs pulled from | This Revision | 10 minutes ago


Like writeScriptBin but the first line is a shebang to dash

Can be called with or without extra arguments.

Examples

pkgs.writers.writeDashBin without arguments

writeDashBin "example" ''
  echo hello world
''

pkgs.writers.writeDashBin with arguments

writeDashBin "example"
{
  makeWrapperArgs = [
    "--prefix" "PATH" ":" "${lib.makeBinPath [ pkgs.hello ]}"
  ];
}
''
  hello
''

Noogle detected

This is a Functor

Learn about functors

Implementation

The following is the current implementation of this function.

writeDashBin = name: writeDash "/bin/${name}";