query
On this page

writeNuBin

pkgs.writers.writeNuBin

Functor
Docs pulled from | This Revision | about 2 hours ago


Like writeScriptBin but the first line is a shebang to nu

Can be called with or without extra arguments.

Examples

pkgs.writers.writeNuBin without arguments

writeNuBin "example" ''
  echo hello world
''

pkgs.writers.writeNuBin with arguments

writeNuBin "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.

writeNuBin = name: writeNu "/bin/${name}";