-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dedicate repo/job specific workspace. Then, clone the git repo in that dedicated directory. And run `nix build` in it. Display output of all these steps in the build log.
- Loading branch information
Showing
7 changed files
with
98 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
-- | `System.Process` utilities | ||
module Vira.Lib.Process ( | ||
alwaysUnderPath, | ||
redirectOutputTo, | ||
) where | ||
|
||
import Effectful.Process ( | ||
CreateProcess (cwd, std_err, std_out), | ||
StdStream (UseHandle), | ||
) | ||
import System.FilePath ((</>)) | ||
|
||
-- | Make sure that this process will always use the given path, or its subdirectory, as CWD. If the current CWD is relative, it will be made relative to the given path. | ||
alwaysUnderPath :: FilePath -> CreateProcess -> CreateProcess | ||
alwaysUnderPath path p = | ||
p | ||
{ cwd = Just $ maybe path (path </>) (cwd p) | ||
} | ||
|
||
-- | With stdout and stderr redirected to given handle | ||
redirectOutputTo :: Handle -> CreateProcess -> CreateProcess | ||
redirectOutputTo h p = | ||
p | ||
{ std_out = UseHandle h | ||
, std_err = UseHandle h | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters