funkytions/nightmare/writeNuShellScriptBin.nix

15 lines
309 B
Nix
Raw Normal View History

2024-01-13 11:03:47 +01:00
{ nushell, writeTextFile, ... }:
name: text:
let writeNuShellScriptBin =
writeTextFile {
inherit name;
executable = true;
destination = "/bin/${name}";
text = ''
#!${nushell}/bin/nu
${text}
'';
meta.mainProgram = name;
};
in writeNuShellScriptBin