This commit is contained in:
Daylin Morgan 2024-09-05 10:01:12 -05:00
parent 2614aeb181
commit 46912c29af
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 5 additions and 6 deletions

View file

@ -46,9 +46,6 @@ jobs:
- name: Pre-build oizys
run: nix build .
- run: >
nix build --dry-run $(nix run . -- output --host othalan --flake . )
- name: Build
run: >
nix run .

View file

@ -28,13 +28,16 @@ proc runCmdCapt*(cmd: string): tuple[stdout, stderr: string, exitCode: int] =
let errstrm = errorStream p
result.exitCode = -1
var line: string
var cnt: int
while true:
echo cnt
if ostrm.readLine(line):
result.stdout.add line & '\n'
if errstrm.readLine(line):
result.stderr.add line & '\n'
result.exitCode = peekExitCode(p)
if result.exitCode != -1: break
inc cnt
# result = (
# readAll p.outputStream,

View file

@ -110,9 +110,8 @@ proc toBuildNixosConfiguration(): seq[string] =
var cmd = nixCommand("build")
cmd.addArg "--dry-run"
cmd.addArgs nixosConfigAttrs()
debug "trying with ouptut"
discard execCmd(cmd)
let (_, err) = runCmdCaptWithSpinner(cmd, "running dry run build for: " & getHosts().join(" "))
# let (_, err) = runCmdCaptWithSpinner(cmd, "running dry run build for: " & getHosts().join(" "))
let (_, err, _) = runCmdCapt(cmd)
let output = parseDryRunOutput err
return output.toBuild.mapIt(it.storePath)