diff options
Diffstat (limited to 'pkgs/writeBashScript.nix')
-rw-r--r-- | pkgs/writeBashScript.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/writeBashScript.nix b/pkgs/writeBashScript.nix new file mode 100644 index 0000000..b193122 --- /dev/null +++ b/pkgs/writeBashScript.nix @@ -0,0 +1,21 @@ +{ bash, writeTextFile, haskellPackages }: + +let + + shellcheck = haskellPackages.ShellCheck; + +in + +name: text: + writeTextFile + { + inherit name; + executable = true; + text = '' + #!${bash}/bin/bash + ${text} + ''; + checkPhase = '' + ${shellcheck}/bin/shellcheck "$out" + ''; + } |