Compare commits

..

2 commits

Author SHA1 Message Date
57e99e8f27
add more convience combiner procs 2024-09-28 18:02:04 -05:00
b3d07dcc84
update hwylterm 2024-09-26 16:50:43 -05:00
5 changed files with 21 additions and 18 deletions

View file

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

View file

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

View file

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

View file

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

View file

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