From 8b0968b2054d3bb8d90b5ac056727f7c2ebeaed3 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 11 Dec 2018 18:10:48 +0300 Subject: (* HUGE *) Use nixpkgs overlays --- pkgs/writeBashScript.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pkgs/writeBashScript.nix (limited to 'pkgs/writeBashScript.nix') 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" + ''; + } -- cgit v1.2.3