Compare commits

..

No commits in common. "57e99e8f27cdf4550c2166968da364277789ede0" and "0624d944727872c8fc01fc62b4a35a092e4a2d7d" have entirely different histories.

5 changed files with 18 additions and 21 deletions

View file

@ -6,3 +6,5 @@ task build, "build oizys":
when withDir(thisDir(), system.fileExists("nimble.paths")): when withDir(thisDir(), system.fileExists("nimble.paths")):
include "nimble.paths" include "nimble.paths"
# end Nimble config # end Nimble config
#
--path:"../../../dev/github/daylinmorgan/hwylterm/src"

View file

@ -8,5 +8,5 @@ buildNimblePackage {
verions = "unstable"; verions = "unstable";
src = lib.cleanSource ./.; src = lib.cleanSource ./.;
nativeBuildInputs = [ openssl ]; nativeBuildInputs = [ openssl ];
nimbleDepsHash = "sha256-A2sQy4x+QyqltV7B1rRh7uRPvv7pDtVNOXZZl5LrHCY="; nimbleDepsHash = "sha256-o+CN0LlVOcgjLpDfjItW/5GCXTWcPSx9GfwQn+u2ST4=";
} }

View file

@ -13,12 +13,12 @@
}, },
"hwylterm": { "hwylterm": {
"version": "0.1.0", "version": "0.1.0",
"vcsRevision": "c2bcfd1f73dda97bd3e209c89e2abfe588f0977c", "vcsRevision": "9afc339a9791f25010ea89a4f52204ad8eeda858",
"url": "https://github.com/daylinmorgan/hwylterm", "url": "https://github.com/daylinmorgan/hwylterm",
"downloadMethod": "git", "downloadMethod": "git",
"dependencies": [], "dependencies": [],
"checksums": { "checksums": {
"sha1": "1932229840c893c39acca0b50def19913678f5f0" "sha1": "853c67ee7f789d825ec6f46c9fbae68e03e43cdb"
} }
}, },
"jsony": { "jsony": {

View file

@ -14,5 +14,5 @@ requires "nim >= 2.0.8"
requires "cligen" requires "cligen"
requires "jsony" requires "jsony"
requires "zippy" requires "zippy"
requires "https://github.com/daylinmorgan/hwylterm#HEAD" requires "https://github.com/daylinmorgan/hwylterm#9afc339"

View file

@ -86,15 +86,10 @@ proc checkExes() =
if findExe("nix") == "": if findExe("nix") == "":
fatalQuit "oizys requires nix" fatalQuit "oizys requires nix"
func `//`[A, B](pairs: openArray[(A, B)]): Table[A, B] = proc `//`(t1: Table[string, string], t2: Table[string, string]): Table[string, string] =
pairs.toTable() # nix style shallow table merge
func `//`[A, B](t1: var Table[A,B], t2: Table[A,B]) = for k, v in t1.pairs(): result[k] = v
for k, v in t2.pairs(): t1[k] = v for k, v in t2.pairs(): result[k] = v
func `//`[A, B](t1: Table[A, B], t2: Table[A, B]): Table[A, B] =
result // t1; result // t2
func `//`[A, B](pairs: openArray[(A,B)], t2: Table[A,B]): Table[A,B] =
// pairs // t2
when isMainModule: when isMainModule:
@ -103,21 +98,21 @@ when isMainModule:
hwylCli(clCfg) hwylCli(clCfg)
const const
sharedHelp = //{ sharedHelp = {
"flake" : "path/to/flake", "flake" : "path/to/flake",
"host" : "host(s) to build", "host" : "host(s) to build",
"debug" : "enable debug mode", "debug" : "enable debug mode",
"resetCache" : "set cache timeout to 0" "resetCache" : "set cache timeout to 0"
} }.toTable()
updateHelp = //{ updateHelp = {
"yes" : "skip all confirmation prompts" "yes" : "skip all confirmation prompts"
} // sharedHelp }.toTable() // sharedHelp
ciHelp = //{ ciHelp = {
"ref" : "git ref/branch/tag to trigger workflow on" "ref" : "git ref/branch/tag to trigger workflow on"
} }.toTable()
cacheHelp = //{ cacheHelp = {
"name" : "name of cachix binary cache" "name" : "name of cachix binary cache"
} // sharedHelp }.toTable() // sharedHelp
let let
# clUse must be set here using clCfg doesn't seem to work with dispatchMutli ... # clUse must be set here using clCfg doesn't seem to work with dispatchMutli ...
clUse* = $bb("$command $args\n${doc}[bold]Options[/]:\n$options") clUse* = $bb("$command $args\n${doc}[bold]Options[/]:\n$options")