From 351af9045f16659496ef13b8b063d2c689a11941 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 20 Nov 2024 23:29:41 -0600 Subject: [PATCH] swap system with minimal --- pkgs/oizys/src/oizys.nim | 7 +++--- pkgs/oizys/src/oizys/nix.nim | 47 ++++-------------------------------- 2 files changed, 8 insertions(+), 46 deletions(-) diff --git a/pkgs/oizys/src/oizys.nim b/pkgs/oizys/src/oizys.nim index 8af6be9..ab38178 100644 --- a/pkgs/oizys/src/oizys.nim +++ b/pkgs/oizys/src/oizys.nim @@ -122,13 +122,12 @@ hwylCli: [output] ... "nixos config attr" flags: - system: - ? "get system path installables" + ^minimal run: - if not system: + if not minimal: echo nixosConfigAttrs().join(" ") else: - echo getSystemPathDrvs().mapIt(it & "^*").join("\n") + showOizysDerivations() [update] ... "update and run nixos-rebuild" diff --git a/pkgs/oizys/src/oizys/nix.nim b/pkgs/oizys/src/oizys/nix.nim index d6c6923..d32a833 100644 --- a/pkgs/oizys/src/oizys/nix.nim +++ b/pkgs/oizys/src/oizys/nix.nim @@ -211,6 +211,11 @@ proc getOizysDerivations(): seq[OizysDerivation] = drv: drv, ) +proc showOizysDerivations*() = + let drvs = getOizysDerivations() + echo drvs.mapIt(it.name & "^*").join("\n") + + # TODO: remove this proc proc systemPathDrvsToBuild*(): seq[string] = var inputDrvs, dropped: seq[string] @@ -355,48 +360,6 @@ proc nixBuildWithCache*(name: string, rest:seq[string], service: string, jobs: i if pushErr != 0: errorQuit "failed to push build to cache" -#[ - - name: Build - run: > - nix run . - -- - build - "$(nix run . -- output --host,=othalan,algiz,mannaz,naudiz --flake .)" - --flake . - --debug - -- - --keep-going - --no-link - - - run: git show origin/flake-lock:flake.lock > updated.lock - - - name: Pre-build oizys - run: nix build . --reference-lock-file updated.lock - - - name: Build Updated - run: > - nix run . - -- - build - "$(nix run . -- output --host,=othalan,algiz,mannaz,naudiz --flake .)" - --flake . - --debug - -- - --keep-going - --no-link - --reference-lock-file updated.lock - - - run: | - for host in othalan algiz mannaz naudiz; do - for rev in current updated; do - args="\"$(nix run . -- output --host $host)\" --out-link \"${host}-${rev}\"" - [[ "$rev" == "updated" ]] && args="$args --reference-lock-file updated.lock" - nix build $args - done - done -]# - - proc getUpdatedLockFile() = info "getting updated flake.lock as updated.lock" let res = runCmdCapt("git --no-pager show origin/flake-lock:flake.lock")