funkytions/nightmare/writeNuShellScriptBin.nix

15 lines
309 B
Nix

{ nushell, writeTextFile, ... }:
name: text:
let writeNuShellScriptBin =
writeTextFile {
inherit name;
executable = true;
destination = "/bin/${name}";
text = ''
#!${nushell}/bin/nu
${text}
'';
meta.mainProgram = name;
};
in writeNuShellScriptBin