diff --git a/nightmare.nix b/nightmare.nix index 36c5929..6508993 100644 --- a/nightmare.nix +++ b/nightmare.nix @@ -1,4 +1,5 @@ { pkgs, ... }: { getKittyColorscheme = pkgs.callPackage ./nightmare/getKittyColorscheme.nix {}; writeNuShellScript = pkgs.callPackage ./nightmare/writeNuShellScript.nix {}; + writeNuShellScriptBin = pkgs.callPackage ./nightmare/writeNuShellScriptBin.nix {}; } diff --git a/nightmare/writeNuShellScriptBin.nix b/nightmare/writeNuShellScriptBin.nix new file mode 100644 index 0000000..3083d66 --- /dev/null +++ b/nightmare/writeNuShellScriptBin.nix @@ -0,0 +1,14 @@ +{ nushell, writeTextFile, ... }: +name: text: +let writeNuShellScriptBin = + writeTextFile { + inherit name; + executable = true; + destination = "/bin/${name}"; + text = '' + #!${nushell}/bin/nu + ${text} + ''; + meta.mainProgram = name; + }; +in writeNuShellScriptBin