mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-01-22 07:07:32 -06:00
make build result more readable
This commit is contained in:
parent
75856bb424
commit
6d5c9b8c19
1 changed files with 5 additions and 1 deletions
|
@ -324,6 +324,8 @@ type
|
||||||
duration*: Duration
|
duration*: Duration
|
||||||
successful*: bool
|
successful*: bool
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
proc build(drv: OizysDerivation, rest: seq[string]): BuildResult =
|
proc build(drv: OizysDerivation, rest: seq[string]): BuildResult =
|
||||||
let startTime = now()
|
let startTime = now()
|
||||||
var cmd = "nix build"
|
var cmd = "nix build"
|
||||||
|
@ -333,7 +335,9 @@ proc build(drv: OizysDerivation, rest: seq[string]): BuildResult =
|
||||||
let buildCode = runCmd(cmd)
|
let buildCode = runCmd(cmd)
|
||||||
result.successful = buildCode == 0
|
result.successful = buildCode == 0
|
||||||
result.duration = now() - startTime
|
result.duration = now() - startTime
|
||||||
debug "build duration: " & $result.duration
|
# TODO: make splitDrv more ergonmic?
|
||||||
|
info "succesfully built: " & splitDrv(drv.name).name
|
||||||
|
info "-> duration: " & $result.duration
|
||||||
|
|
||||||
func outputsPaths(o: OizysDerivation): seq[string] =
|
func outputsPaths(o: OizysDerivation): seq[string] =
|
||||||
for _, output in o.drv.outputs:
|
for _, output in o.drv.outputs:
|
||||||
|
|
Loading…
Reference in a new issue