mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-05 13:14:17 -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")
|
||||
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) =
|
||||
## build individual derivations not cached and push to cache
|
||||
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"
|
||||
quit "exiting...", QuitSuccess
|
||||
|
||||
info fmt("building {drvs.len} derivations:\n") & drvs.mapIt(prettyDerivation(it.drv.outputs["out"].path)).join("\n")
|
||||
|
||||
let results =
|
||||
collect:
|
||||
for drv in drvs:
|
||||
|
|
|
@ -56,11 +56,6 @@ proc hasNarinfo*(cache: string, path: string): Opt[string] =
|
|||
finally:
|
||||
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 =
|
||||
let maxWidth = terminalWidth()
|
||||
result.add "narinfo:"
|
||||
|
|
Loading…
Reference in a new issue