Compare commits

...

2 commits

Author SHA1 Message Date
0446dacc1a
use more flag groups 2024-11-10 16:27:31 -06:00
3cab71f282
update hwylcli 2024-11-10 16:21:45 -06:00
4 changed files with 23 additions and 24 deletions

View file

@ -8,7 +8,7 @@ buildNimblePackage {
verions = "unstable"; verions = "unstable";
src = lib.cleanSource ./.; src = lib.cleanSource ./.;
nativeBuildInputs = [ openssl ]; nativeBuildInputs = [ openssl ];
nimbleDepsHash = "sha256-YCHyMyy6cvNZgsmxPgskbAMETHs4/bP2Cp6XbjfWm1k="; nimbleDepsHash = "sha256-/H/HvnJqpDJcyVJ2rbn7PDSSoJB/TMr9yiIKxtB1O+E=";
meta = { meta = {
description = "nix begat oizys"; description = "nix begat oizys";

View file

@ -3,12 +3,12 @@
"packages": { "packages": {
"hwylterm": { "hwylterm": {
"version": "0.1.0", "version": "0.1.0",
"vcsRevision": "a4e0f3fc7b34bac8e448dd35f58012d07dd4a0d0", "vcsRevision": "e8e090c5b76bc555231bda536193df6f92a54db2",
"url": "https://github.com/daylinmorgan/hwylterm", "url": "https://github.com/daylinmorgan/hwylterm",
"downloadMethod": "git", "downloadMethod": "git",
"dependencies": [], "dependencies": [],
"checksums": { "checksums": {
"sha1": "848f75dc1bc910560e5e0038bf0a9ebf8d096385" "sha1": "925aad3ce660979de7cdb2f58a31dc7ac693e34d"
} }
}, },
"jsony": { "jsony": {

View file

@ -13,5 +13,5 @@ bin = @["oizys"]
requires "nim >= 2.0.8" requires "nim >= 2.0.8"
requires "jsony" requires "jsony"
requires "zippy" requires "zippy"
requires "https://github.com/daylinmorgan/hwylterm#a4e0f3f" requires "https://github.com/daylinmorgan/hwylterm#e8e090c"

View file

@ -8,14 +8,15 @@ proc checkExes() =
fatalQuit "oizys requires nix" fatalQuit "oizys requires nix"
checkexes() checkexes()
hwylCli: hwylCli:
name "oizys" name "oizys"
globalFlags: flags:
[global]
flake "path/to/flake" flake "path/to/flake"
host: host:
T seq[string] T seq[string]
? "host(s) to build" ? "host(s) to build"
# - h conflicts with autoadded help short flag
debug: debug:
T bool T bool
? "enable debug mode" ? "enable debug mode"
@ -24,6 +25,16 @@ hwylCli:
T bool T bool
? "set cache timeout to 0" ? "set cache timeout to 0"
- r - r
[yes]
yes:
T bool
? "skip all confirmation prompts"
[minimal]
minimal:
T bool
? "set minimal"
- m
preSub: preSub:
setupLoggers(debug) setupLoggers(debug)
updateContext(host, flake, debug, resetCache) updateContext(host, flake, debug, resetCache)
@ -32,10 +43,7 @@ hwylCli:
--- build --- build
... "nix build" ... "nix build"
flags: flags:
minimal: ^[minimal]
T bool
? "set minimal"
- m
run: run:
nixBuild(minimal, args) nixBuild(minimal, args)
@ -43,15 +51,15 @@ hwylCli:
... "build and push store paths" ... "build and push store paths"
flags: flags:
name: name:
* "oizys"
? "name of binary cache" ? "name of binary cache"
* "oizys"
service: service:
? "name of cache service" ? "name of cache service"
* "attic" * "attic"
jobs: jobs:
* countProcessors()
? "jobs when pushing paths"
T int T int
? "jobs when pushing paths"
* countProcessors()
- j - j
run: run:
nixBuildWithCache(name, args, service, jobs) nixBuildWithCache(name, args, service, jobs)
@ -69,10 +77,7 @@ hwylCli:
--- dry --- dry
... "dry run build" ... "dry run build"
flags: flags:
minimal: ^[minimal]
T bool
? "set minimal"
- m
run: run:
nixBuildHostDry(minimal, args) nixBuildHostDry(minimal, args)
@ -91,19 +96,13 @@ hwylCli:
--- output --- output
... "nixos config attr" ... "nixos config attr"
flags:
yes:
T bool
? "skip all confirmation prompts"
run: run:
echo nixosConfigAttrs().join(" ") echo nixosConfigAttrs().join(" ")
--- update --- update
... "update and run nixos-rebuild" ... "update and run nixos-rebuild"
flags: flags:
yes: ^[yes]
T bool
? "skip all confirmation prompts"
preview: preview:
T bool T bool
? "show preview and exit" ? "show preview and exit"