nix(refactor): Add withPath to checkedShellScript

This commit is contained in:
Wolfgang Walther
2021-08-15 12:35:52 +02:00
committed by Remo
parent 4e4548d702
commit 0511e99dd4
4 changed files with 9 additions and 6 deletions
@@ -18,6 +18,7 @@
, inRootDir ? false
, redirectTixFiles ? true
, withEnv ? null
, withPath ? [ ]
, withTmpDir ? false
}: text:
let
@@ -114,6 +115,10 @@ let
export PATH="$env/bin:$PATH"
''
+ lib.optionalString (lib.length withPath > 0) ''
export PATH="${lib.concatMapStrings (p: p + "/bin:") withPath}$PATH"
''
+ "(${text})"
+ lib.optionalString withTmpDir ''