From 3489fd6d8349a5833264c77f94ba50829361fa85 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 10 Jan 2025 10:26:41 -0600 Subject: [PATCH] deduplicate build results by using a hash --- pkgs/oizys/src/oizys/nix.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/oizys/src/oizys/nix.nim b/pkgs/oizys/src/oizys/nix.nim index d671f42..a76a5c0 100644 --- a/pkgs/oizys/src/oizys/nix.nim +++ b/pkgs/oizys/src/oizys/nix.nim @@ -1,6 +1,6 @@ import std/[ algorithm, json, - enumerate, os, sequtils, strformat, + enumerate, os, sequtils, sets, strformat, strutils, sugar, logging, tables, times ] import hwylterm, hwylterm/logging, jsony @@ -230,13 +230,13 @@ proc getSystemPathDrvs*(): seq[string] = inputDrv -proc getOizysDerivations(): seq[OizysDerivation] = +proc getOizysDerivations(): HashSet[OizysDerivation] = let toBuildDrvs = toBuildNixosConfiguration() systemPathDrvs = getSystemPathDrvs() toActullyBuildDrvs = systemPathDrvs.filterIt(it in toBuildDrvs and not isIgnored(it)) for name, drv in nixDerivationShow(toActullyBuildDrvs): - result.add OizysDerivation( + result.incl OizysDerivation( name: name, drv: drv, )