deduplicate build results by using a hash

This commit is contained in:
Daylin Morgan 2025-01-10 10:26:41 -06:00
parent f6c3a7872d
commit 3489fd6d83
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -1,6 +1,6 @@
import std/[ import std/[
algorithm, json, algorithm, json,
enumerate, os, sequtils, strformat, enumerate, os, sequtils, sets, strformat,
strutils, sugar, logging, tables, times strutils, sugar, logging, tables, times
] ]
import hwylterm, hwylterm/logging, jsony import hwylterm, hwylterm/logging, jsony
@ -230,13 +230,13 @@ proc getSystemPathDrvs*(): seq[string] =
inputDrv inputDrv
proc getOizysDerivations(): seq[OizysDerivation] = proc getOizysDerivations(): HashSet[OizysDerivation] =
let let
toBuildDrvs = toBuildNixosConfiguration() toBuildDrvs = toBuildNixosConfiguration()
systemPathDrvs = getSystemPathDrvs() systemPathDrvs = getSystemPathDrvs()
toActullyBuildDrvs = systemPathDrvs.filterIt(it in toBuildDrvs and not isIgnored(it)) toActullyBuildDrvs = systemPathDrvs.filterIt(it in toBuildDrvs and not isIgnored(it))
for name, drv in nixDerivationShow(toActullyBuildDrvs): for name, drv in nixDerivationShow(toActullyBuildDrvs):
result.add OizysDerivation( result.incl OizysDerivation(
name: name, name: name,
drv: drv, drv: drv,
) )