From bdd67bd00b3b83c23b1df7c4b3007a60476c8f42 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 10 Feb 2025 13:47:50 -0600 Subject: [PATCH] fix report results --- pkgs/oizys/oizys/utils.nim | 0 pkgs/oizys/src/oizys/nix.nim | 15 +++++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 pkgs/oizys/oizys/utils.nim diff --git a/pkgs/oizys/oizys/utils.nim b/pkgs/oizys/oizys/utils.nim deleted file mode 100644 index e69de29..0000000 diff --git a/pkgs/oizys/src/oizys/nix.nim b/pkgs/oizys/src/oizys/nix.nim index d398f21..a15076f 100644 --- a/pkgs/oizys/src/oizys/nix.nim +++ b/pkgs/oizys/src/oizys/nix.nim @@ -344,10 +344,10 @@ func outputsPaths(drv: NixDerivation): seq[string] = for _, output in drv.outputs: result.add output.path -proc reportResults(results: seq[(NixDerivation, BuildResult)]) = +proc reportResults(results: seq[(string, NixDerivation, BuildResult)]) = let rows = collect( - for (drv, res) in results: - let (name, hash) = splitDrv(drv.name) + for (path, drv, res) in results: + let (name, hash) = splitDrv(path) fmt"| {name} | `{hash}` | " & ( if res.successful: ":white_check_mark:" else: ":x:" @@ -393,16 +393,15 @@ proc nixBuildWithCache*(name: string, rest: seq[string], service: string, jobs: let results = collect: for path, drv in drvs: - (drv, build(path, drv, rest)) + (path, drv, build(path, drv, rest)) var outs: seq[string] - for (drv, res) in results: + for (path, drv, res) in results: if res.successful: outs &= drv.outputsPaths - # TODO: fix refactor above interfaces to make this more seemless - # if isCi(): - # reportResults(results) + if isCi(): + reportResults(results) if outs.len > 0: # TODO: push after build not at once?