mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-05 21:24:19 -06:00
show the outs with oizys cache
before building
This commit is contained in:
parent
e0e393b16e
commit
33007059ce
2 changed files with 8 additions and 5 deletions
|
@ -367,6 +367,12 @@ proc reportResults(results: seq[(OizysDerivation, BuildResult)]) =
|
||||||
output.writeLine rows.join("\n")
|
output.writeLine rows.join("\n")
|
||||||
close output
|
close output
|
||||||
|
|
||||||
|
proc prettyDerivation*(path: string): BbString =
|
||||||
|
const maxLen = 40
|
||||||
|
let drv = path.toDerivation()
|
||||||
|
drv.name.trunc(maxLen) & " " & drv.hash.bb("faint")
|
||||||
|
|
||||||
|
|
||||||
proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: int) =
|
proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: int) =
|
||||||
## build individual derivations not cached and push to cache
|
## build individual derivations not cached and push to cache
|
||||||
if findExe(service) == "": fatalQuit fmt"is {service} installed?"
|
if findExe(service) == "": fatalQuit fmt"is {service} installed?"
|
||||||
|
@ -377,6 +383,8 @@ proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: i
|
||||||
info "nothing to build"
|
info "nothing to build"
|
||||||
quit "exiting...", QuitSuccess
|
quit "exiting...", QuitSuccess
|
||||||
|
|
||||||
|
info fmt("building {drvs.len} derivations:\n") & drvs.mapIt(prettyDerivation(it.drv.outputs["out"].path)).join("\n")
|
||||||
|
|
||||||
let results =
|
let results =
|
||||||
collect:
|
collect:
|
||||||
for drv in drvs:
|
for drv in drvs:
|
||||||
|
|
|
@ -56,11 +56,6 @@ proc hasNarinfo*(cache: string, path: string): Opt[string] =
|
||||||
finally:
|
finally:
|
||||||
client.close()
|
client.close()
|
||||||
|
|
||||||
proc prettyDerivation(path: string): BbString =
|
|
||||||
const maxLen = 40
|
|
||||||
let drv = path.toDerivation()
|
|
||||||
drv.name.trunc(maxLen) & " " & drv.hash.bb("faint")
|
|
||||||
|
|
||||||
proc showNarInfo(s: string): BbString =
|
proc showNarInfo(s: string): BbString =
|
||||||
let maxWidth = terminalWidth()
|
let maxWidth = terminalWidth()
|
||||||
result.add "narinfo:"
|
result.add "narinfo:"
|
||||||
|
|
Loading…
Reference in a new issue