diff options
Diffstat (limited to 'pkgs/writeBashScript.nix')
-rw-r--r-- | pkgs/writeBashScript.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/writeBashScript.nix b/pkgs/writeBashScript.nix new file mode 100644 index 0000000..15e81c5 --- /dev/null +++ b/pkgs/writeBashScript.nix @@ -0,0 +1,13 @@ +{ bash, writeScript, haskellPackages, runCommand }: + +name: text: +let + f = writeScript name '' + #!${bash}/bin/bash + ${text} + ''; +in +runCommand name { } '' + ${haskellPackages.ShellCheck}/bin/shellcheck ${f} + cp -a ${f} $out +'' |