aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/writeBashScript.nix
blob: 15e81c57155cd44bedb273ad58d51e9d15a06695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
''