From 5c380c25e045ceca3ccd8e2eb546773bead59e26 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 30 Jan 2025 14:51:53 -0600 Subject: [PATCH] update hwylterm --- pkgs/oizys/default.nix | 2 +- pkgs/oizys/nimble.lock | 4 +- pkgs/oizys/oizys.nimble | 2 +- pkgs/oizys/src/oizys.nim | 72 +++++++++++++++++----------------- pkgs/oizys/src/oizys/utils.nim | 2 +- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/pkgs/oizys/default.nix b/pkgs/oizys/default.nix index b82a4e8..022008e 100644 --- a/pkgs/oizys/default.nix +++ b/pkgs/oizys/default.nix @@ -8,7 +8,7 @@ buildNimblePackage { version = "unstable"; src = lib.cleanSource ./.; nativeBuildInputs = [ openssl ]; - nimbleDepsHash = "sha256-wuTGoswuAxAOOPDDI6Ma8Xzq1CApCfT+fAQmJg+VeYM="; + nimbleDepsHash = "sha256-DE5PAgcntxMwmgd7NnabYhOBH5szSvwPM9sNdnF/Iyc="; meta = { description = "nix begat oizys"; }; diff --git a/pkgs/oizys/nimble.lock b/pkgs/oizys/nimble.lock index 89a3206..0d0f2d1 100644 --- a/pkgs/oizys/nimble.lock +++ b/pkgs/oizys/nimble.lock @@ -3,12 +3,12 @@ "packages": { "hwylterm": { "version": "0.1.0", - "vcsRevision": "73d58a23598ccd1c4c9c3335599c4e0a9b2ebeb9", + "vcsRevision": "6a6bd269f2dc385b5711b1a29246883144bccb4f", "url": "https://github.com/daylinmorgan/hwylterm", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "2ce648bd381834cf865e75f8326e7445d332b9c3" + "sha1": "e484311567eca66268ebe2ffd9dbb768025277ae" } }, "jsony": { diff --git a/pkgs/oizys/oizys.nimble b/pkgs/oizys/oizys.nimble index 504c9f6..56cf783 100644 --- a/pkgs/oizys/oizys.nimble +++ b/pkgs/oizys/oizys.nimble @@ -13,5 +13,5 @@ bin = @["oizys"] requires "nim >= 2.0.8" requires "jsony" requires "zippy" -requires "https://github.com/daylinmorgan/hwylterm#73d58a23" +requires "https://github.com/daylinmorgan/hwylterm#6a6bd269" diff --git a/pkgs/oizys/src/oizys.nim b/pkgs/oizys/src/oizys.nim index da9e96e..a5e8542 100644 --- a/pkgs/oizys/src/oizys.nim +++ b/pkgs/oizys/src/oizys.nim @@ -28,6 +28,7 @@ hwylCli: `reset-cache`: ? "set cache timeout to 0" ident resetCache + [misc] yes: - y @@ -157,45 +158,44 @@ hwylCli: updateRepo() nixosRebuild(NixosRebuildSubcmd.switch) - [utils] + # [utils] + # ... """ + # less common utils operations + # + # some snippets I've reimplemented in nim so that nix isn't as annoying + # """ + [hash] + ... "collect build hash from failure" + positionals: + installable string + run: + stdout.write getBuildHash(installable) + + [narinfo] ... """ - less common utils operations + check active caches for nix derivation - some snippets I've reimplemented in nim so that nix isn't as annoying + by default will use [yellow]nix config show[/] to determine + the binary cache urls """ - subcommands: - [hash] - ... "collect build hash from failure" - positionals: - installable string - run: - stdout.write getBuildHash(installable) + positionals: + installables seq[string] + flags: + cache: + ? "url of nix binary cache, can be repeated" + T seq[string] + run: + if installables.len == 0: + fatalQuit "expected at least one positional argument" + checkForCache(installables, cache) - [narinfo] - ... """ - check active caches for nix derivation + [lock] + ... """ + check lock status for duplicates - by default will use [yellow]nix config show[/] to determine - the binary cache urls - """ - positionals: - installables seq[string] - flags: - cache: - ? "url of nix binary cache, can be repeated" - T seq[string] - run: - if installables.len == 0: - fatalQuit "expected at least one positional argument" - checkForCache(installables, cache) - - [lock] - ... """ - check lock status for duplicates - - currently just runs `jq < flake.lock '.nodes | keys[] | select(contains("_"))' -r` - """ - run: - # use absolute value for flake.lock? - quitWithCmd("""jq '.nodes | keys[] | select(contains("_"))' -r flake.lock""") + currently just runs `jq < flake.lock '.nodes | keys[] | select(contains("_"))' -r` + """ + run: + # use absolute value for flake.lock? + quitWithCmd("""jq '.nodes | keys[] | select(contains("_"))' -r flake.lock""") diff --git a/pkgs/oizys/src/oizys/utils.nim b/pkgs/oizys/src/oizys/utils.nim index 028cda7..87d13c0 100644 --- a/pkgs/oizys/src/oizys/utils.nim +++ b/pkgs/oizys/src/oizys/utils.nim @@ -1,6 +1,6 @@ import std/[strformat, strutils, osproc, sugar, httpclient, terminal, wordwrap] import hwylterm -import ./[nix, exec, logging, context] +import ./[nix, exec, logging] # TODO: refactor runCmdCaptWithSpinner so it works in getBuildHash