mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-14 16:07:52 -06:00
update hwylcli yet again
This commit is contained in:
parent
b634a2fca6
commit
02e668f2b2
4 changed files with 18 additions and 17 deletions
|
@ -8,7 +8,7 @@ buildNimblePackage {
|
|||
verions = "unstable";
|
||||
src = lib.cleanSource ./.;
|
||||
nativeBuildInputs = [ openssl ];
|
||||
nimbleDepsHash = "sha256-/H/HvnJqpDJcyVJ2rbn7PDSSoJB/TMr9yiIKxtB1O+E=";
|
||||
nimbleDepsHash = "sha256-ZEPzosRwokkvPKbv5nqzATv6IqUhqM2prOU0vUUC80Q=";
|
||||
|
||||
meta = {
|
||||
description = "nix begat oizys";
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
"packages": {
|
||||
"hwylterm": {
|
||||
"version": "0.1.0",
|
||||
"vcsRevision": "e8e090c5b76bc555231bda536193df6f92a54db2",
|
||||
"vcsRevision": "65a952e9f0d75659d39f8a3b146753e291ee0a66",
|
||||
"url": "https://github.com/daylinmorgan/hwylterm",
|
||||
"downloadMethod": "git",
|
||||
"dependencies": [],
|
||||
"checksums": {
|
||||
"sha1": "925aad3ce660979de7cdb2f58a31dc7ac693e34d"
|
||||
"sha1": "10894d492bbe1d0ea32ee9bb0686abfcd3b0b0fe"
|
||||
}
|
||||
},
|
||||
"jsony": {
|
||||
|
|
|
@ -13,5 +13,5 @@ bin = @["oizys"]
|
|||
requires "nim >= 2.0.8"
|
||||
requires "jsony"
|
||||
requires "zippy"
|
||||
requires "https://github.com/daylinmorgan/hwylterm#e8e090c"
|
||||
requires "https://github.com/daylinmorgan/hwylterm#65a952e"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## nix begat oizys
|
||||
import std/[os, osproc, sequtils, strformat, strutils]
|
||||
import hwylterm, hwylterm/[hwylcli, logging]
|
||||
import hwylterm, hwylterm/[hwylcli]
|
||||
import oizys/[context, github, nix, logging]
|
||||
|
||||
proc checkExes() =
|
||||
|
@ -13,26 +13,24 @@ hwylCli:
|
|||
name "oizys"
|
||||
flags:
|
||||
[global]
|
||||
flake "path/to/flake"
|
||||
flake:
|
||||
T string
|
||||
? "path/to/flake"
|
||||
host:
|
||||
T seq[string]
|
||||
? "host(s) to build"
|
||||
debug:
|
||||
T bool
|
||||
? "enable debug mode"
|
||||
- d
|
||||
resetCache:
|
||||
T bool
|
||||
? "set cache timeout to 0"
|
||||
- r
|
||||
[yes]
|
||||
yes:
|
||||
- y
|
||||
T bool
|
||||
? "skip all confirmation prompts"
|
||||
[minimal]
|
||||
minimal:
|
||||
T bool
|
||||
? "set minimal"
|
||||
- m
|
||||
|
||||
|
@ -42,20 +40,22 @@ hwylCli:
|
|||
|
||||
subcommands:
|
||||
|
||||
--- build
|
||||
[build]
|
||||
... "nix build"
|
||||
flags:
|
||||
^[minimal]
|
||||
run:
|
||||
nixBuild(minimal, args)
|
||||
|
||||
--- cache
|
||||
[cache]
|
||||
... "build and push store paths"
|
||||
flags:
|
||||
name:
|
||||
T string
|
||||
? "name of binary cache"
|
||||
* "oizys"
|
||||
service:
|
||||
T string
|
||||
? "name of cache service"
|
||||
* "attic"
|
||||
jobs:
|
||||
|
@ -66,24 +66,25 @@ hwylCli:
|
|||
run:
|
||||
nixBuildWithCache(name, args, service, jobs)
|
||||
|
||||
--- ci
|
||||
[ci]
|
||||
... "trigger GHA"
|
||||
flags:
|
||||
`ref`:
|
||||
T string
|
||||
? "git ref/branch/tag to trigger workflow on"
|
||||
* "main"
|
||||
run:
|
||||
if args.len == 0: fatalQuit "expected workflow file name"
|
||||
createDispatch(args[0], `ref`)
|
||||
|
||||
--- dry
|
||||
[dry]
|
||||
... "dry run build"
|
||||
flags:
|
||||
^[minimal]
|
||||
run:
|
||||
nixBuildHostDry(minimal, args)
|
||||
|
||||
--- os
|
||||
[os]
|
||||
? "[b]oizys os[/] [i]subcmd[/] [[[faint]flags[/]]"
|
||||
... "nixos-rebuild [italic]subcmd[/]"
|
||||
run:
|
||||
|
@ -96,12 +97,12 @@ hwylCli:
|
|||
)
|
||||
nixosRebuild(subcmd, args[1..^1])
|
||||
|
||||
--- output
|
||||
[output]
|
||||
... "nixos config attr"
|
||||
run:
|
||||
echo nixosConfigAttrs().join(" ")
|
||||
|
||||
--- update
|
||||
[update]
|
||||
... "update and run nixos-rebuild"
|
||||
flags:
|
||||
^[yes]
|
||||
|
|
Loading…
Reference in a new issue