mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-25 08:30:45 -06:00
Compare commits
2 commits
6930508add
...
442efbe2a4
Author | SHA1 | Date | |
---|---|---|---|
442efbe2a4 | |||
a5d5d7d325 |
3 changed files with 37 additions and 30 deletions
52
flake.lock
52
flake.lock
|
@ -305,11 +305,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719786368,
|
||||
"narHash": "sha256-fpVk3CajFQ4hcTuoU9njw/btPrAV92f8+WawVy8XvcE=",
|
||||
"lastModified": 1719915468,
|
||||
"narHash": "sha256-vSutSKzLH63dCwvyrLg1wJmbgjH351/++9RQY3S3TYo=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "d7ea1b7785f31e9fd6477490309721a19a835592",
|
||||
"revCount": 4900,
|
||||
"rev": "2fa57f2dc4909be697d003a22ce6870039e4db9b",
|
||||
"revCount": 4902,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland/"
|
||||
|
@ -498,11 +498,11 @@
|
|||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1719783043,
|
||||
"narHash": "sha256-u5ppUxkqx9fj4uLo131D93RA1Al1pyi6BcHprevgwkQ=",
|
||||
"rev": "010ff57ebb40f1a9aaff99867d2886f0e59f774a",
|
||||
"lastModified": 1719929527,
|
||||
"narHash": "sha256-xQVoaW3fMehnfaHEA+PvfsUEioTWs8NSkDv+7sSeHZI=",
|
||||
"rev": "24852355d8975dcc786ddc4d5853043a52e4c78c",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/010ff57ebb40f1a9aaff99867d2886f0e59f774a.tar.gz"
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/24852355d8975dcc786ddc4d5853043a52e4c78c.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
|
@ -679,11 +679,11 @@
|
|||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719847124,
|
||||
"narHash": "sha256-7aAzoZpyoMofUHwCOCwmgwSYxj4gqvnRkJJ0/B14ltQ=",
|
||||
"lastModified": 1719918908,
|
||||
"narHash": "sha256-GJHzx9LUG2P6hnNvQ+nqWXrQMZDttYaH7RA66ad3mhU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "39007212220f3eb8aa439ac0d7e3a8940f3f227f",
|
||||
"rev": "64553807b64c630f57d6a3a09afc1e9fbc33995e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -742,11 +742,11 @@
|
|||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1719760900,
|
||||
"narHash": "sha256-NkvFphHXKtQQ8F0XrqGlqkOhjHbE3671F8oLxwtTHhk=",
|
||||
"lastModified": 1719826879,
|
||||
"narHash": "sha256-xs7PlULe8O1SAcs/9e/HOjeUjBrU5FNtkAF/bSEcFto=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "12a9c0004bc987afb1ff511ebb97b67497a68e22",
|
||||
"rev": "b9014df496d5b68bf7c0145d0e9b0f529ce4f2a8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -774,11 +774,11 @@
|
|||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1719690277,
|
||||
"narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=",
|
||||
"lastModified": 1719848872,
|
||||
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e",
|
||||
"rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -851,11 +851,11 @@
|
|||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719834518,
|
||||
"narHash": "sha256-5gkZjzHe5exZHq9VNzVAyJ1uOx7WPSVvWAuo8r5mmg0=",
|
||||
"lastModified": 1719885190,
|
||||
"narHash": "sha256-T0kI9FuR0kAj6vqKNI8JODTEnKtImPfl/pihEtv6ND0=",
|
||||
"owner": "roc-lang",
|
||||
"repo": "roc",
|
||||
"rev": "05ab0183805907c3042e9f946a08b793ea75c038",
|
||||
"rev": "97639cca7dd31ef2818b8f074792398294196952",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1150,11 +1150,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719822050,
|
||||
"narHash": "sha256-b+nuXFemxeTTCUa4/zcMnFJqsQz/VhYJwIsomAABjfc=",
|
||||
"lastModified": 1719882878,
|
||||
"narHash": "sha256-2cmKpkEPzoEJkTP9V1fTqpPYI0oAFIH/NFB0bMzrToo=",
|
||||
"owner": "Cloudef",
|
||||
"repo": "zig2nix",
|
||||
"rev": "40dde9856de971543b41e5f680a59df5a6be540f",
|
||||
"rev": "3655ededc2f6b3286c5018953664fc02db56158d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1174,11 +1174,11 @@
|
|||
"zig-overlay": "zig-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719603372,
|
||||
"narHash": "sha256-iRwHXSYoKhgFih5ZN7f87CB4WpXH+4roZ8s3zn1s43M=",
|
||||
"lastModified": 1719858314,
|
||||
"narHash": "sha256-Hv6bTm/qxlvHrh8nYMu0kG6lG01CSWqqKxuqrojUtPU=",
|
||||
"owner": "zigtools",
|
||||
"repo": "zls",
|
||||
"rev": "43995ddea2dc566b8341280b1fe378634f97897e",
|
||||
"rev": "f98b3ca18780f75de7bc22cfb3c8e731e5ccb75e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -31,6 +31,7 @@ func Execute() {
|
|||
var (
|
||||
flake string
|
||||
host string
|
||||
debug bool
|
||||
verbose bool
|
||||
nom bool
|
||||
systemPath bool
|
||||
|
@ -42,7 +43,7 @@ var rootCmd = &cobra.Command{
|
|||
Use: "oizys",
|
||||
Short: "nix begat oizys",
|
||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||
if verbose {
|
||||
if debug {
|
||||
log.Info("running with verbose mode")
|
||||
log.SetLevel(log.DebugLevel)
|
||||
}
|
||||
|
@ -50,6 +51,7 @@ var rootCmd = &cobra.Command{
|
|||
oizys.SetHost(host)
|
||||
oizys.SetVerbose(verbose)
|
||||
oizys.SetResetCache(resetCache)
|
||||
oizys.SetDebug(debug)
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -76,5 +78,6 @@ func init() {
|
|||
rootCmd.PersistentFlags().StringVar(&flake, "flake", "", "path to flake ($OIZYS_DIR or $HOME/oizys)")
|
||||
rootCmd.PersistentFlags().StringVar(&host, "host", "", "host to build (current host)")
|
||||
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "show verbose output")
|
||||
rootCmd.PersistentFlags().BoolVar(&debug, "debug", false, "show debug output")
|
||||
rootCmd.PersistentFlags().BoolVar(&resetCache, "reset-cache", false, "set narinfo-cache-negative-ttl to 0")
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ type Oizys struct {
|
|||
verbose bool
|
||||
systemPath bool
|
||||
resetCache bool
|
||||
debug bool
|
||||
}
|
||||
|
||||
func New() *Oizys {
|
||||
|
@ -69,6 +70,8 @@ func SetFlake(path string) {
|
|||
}
|
||||
}
|
||||
|
||||
func SetDebug(debug bool) { o.debug = debug }
|
||||
|
||||
func SetCache(name string) {
|
||||
if name != "" {
|
||||
o.cache = name
|
||||
|
@ -215,10 +218,11 @@ func parseDryRun2(buf string) ([]string, []string) {
|
|||
return parts[0], parts[1]
|
||||
}
|
||||
|
||||
// TODO: refactor to account for --debug and not --verbose?
|
||||
func showDryRunResult(nixOutput string, verbose bool) {
|
||||
toBuild, toFetch := parseDryRun(nixOutput)
|
||||
toBuild.show(verbose)
|
||||
toFetch.show(verbose)
|
||||
toFetch.show(o.debug)
|
||||
toBuild.show(true)
|
||||
}
|
||||
|
||||
func Dry(verbose bool, minimal bool, rest ...string) {
|
||||
|
|
Loading…
Reference in a new issue