diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2018-12-11 18:10:48 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2018-12-11 18:10:48 +0300 |
commit | 8b0968b2054d3bb8d90b5ac056727f7c2ebeaed3 (patch) | |
tree | d03b70f693463fc836a8dbe4240424d2547530c8 /pkgs/writeBashScript.nix | |
parent | c4273035cf5876e3ba8ed2c6b492d31c2de290ee (diff) | |
download | nixsap-8b0968b2054d3bb8d90b5ac056727f7c2ebeaed3.tar.gz |
(* HUGE *) Use nixpkgs overlays
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" + ''; + } |