Compare commits

..

2 commits

Author SHA1 Message Date
442efbe2a4
flake.lock: Update
Flake lock file updates:

• Updated input 'hyprland':
    'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=d7ea1b7785f31e9fd6477490309721a19a835592' (2024-06-30)
  → 'git+https://github.com/hyprwm/Hyprland/?ref=refs/heads/main&rev=2fa57f2dc4909be697d003a22ce6870039e4db9b' (2024-07-02)
• Updated input 'lix':
    '010ff57ebb.tar.gz?narHash=sha256-u5ppUxkqx9fj4uLo131D93RA1Al1pyi6BcHprevgwkQ%3D' (2024-06-30)
  → '24852355d8.tar.gz?narHash=sha256-xQVoaW3fMehnfaHEA%2BPvfsUEioTWs8NSkDv%2B7sSeHZI%3D' (2024-07-02)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/12a9c0004bc987afb1ff511ebb97b67497a68e22' (2024-06-30)
  → 'github:nixos/nixpkgs/b9014df496d5b68bf7c0145d0e9b0f529ce4f2a8' (2024-07-01)
• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/39007212220f3eb8aa439ac0d7e3a8940f3f227f' (2024-07-01)
  → 'github:nix-community/nixpkgs-wayland/64553807b64c630f57d6a3a09afc1e9fbc33995e' (2024-07-02)
• Updated input 'nixpkgs-wayland/nixpkgs':
    'github:nixos/nixpkgs/2741b4b489b55df32afac57bc4bfd220e8bf617e' (2024-06-29)
  → 'github:nixos/nixpkgs/00d80d13810dbfea8ab4ed1009b09100cca86ba8' (2024-07-01)
• Updated input 'roc':
    'github:roc-lang/roc/05ab0183805907c3042e9f946a08b793ea75c038' (2024-07-01)
  → 'github:roc-lang/roc/97639cca7dd31ef2818b8f074792398294196952' (2024-07-02)
• Updated input 'zig2nix':
    'github:Cloudef/zig2nix/40dde9856de971543b41e5f680a59df5a6be540f' (2024-07-01)
  → 'github:Cloudef/zig2nix/3655ededc2f6b3286c5018953664fc02db56158d' (2024-07-02)
• Updated input 'zls':
    'github:zigtools/zls/43995ddea2dc566b8341280b1fe378634f97897e' (2024-06-28)
  → 'github:zigtools/zls/f98b3ca18780f75de7bc22cfb3c8e731e5ccb75e' (2024-07-01)
2024-07-02 10:22:24 -05:00
a5d5d7d325
add debug flag 2024-07-02 10:21:40 -05:00
3 changed files with 37 additions and 30 deletions

View file

@ -305,11 +305,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1719786368, "lastModified": 1719915468,
"narHash": "sha256-fpVk3CajFQ4hcTuoU9njw/btPrAV92f8+WawVy8XvcE=", "narHash": "sha256-vSutSKzLH63dCwvyrLg1wJmbgjH351/++9RQY3S3TYo=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "d7ea1b7785f31e9fd6477490309721a19a835592", "rev": "2fa57f2dc4909be697d003a22ce6870039e4db9b",
"revCount": 4900, "revCount": 4902,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland/" "url": "https://github.com/hyprwm/Hyprland/"
@ -498,11 +498,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1719783043, "lastModified": 1719929527,
"narHash": "sha256-u5ppUxkqx9fj4uLo131D93RA1Al1pyi6BcHprevgwkQ=", "narHash": "sha256-xQVoaW3fMehnfaHEA+PvfsUEioTWs8NSkDv+7sSeHZI=",
"rev": "010ff57ebb40f1a9aaff99867d2886f0e59f774a", "rev": "24852355d8975dcc786ddc4d5853043a52e4c78c",
"type": "tarball", "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": { "original": {
"type": "tarball", "type": "tarball",
@ -679,11 +679,11 @@
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1719847124, "lastModified": 1719918908,
"narHash": "sha256-7aAzoZpyoMofUHwCOCwmgwSYxj4gqvnRkJJ0/B14ltQ=", "narHash": "sha256-GJHzx9LUG2P6hnNvQ+nqWXrQMZDttYaH7RA66ad3mhU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "39007212220f3eb8aa439ac0d7e3a8940f3f227f", "rev": "64553807b64c630f57d6a3a09afc1e9fbc33995e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -742,11 +742,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1719760900, "lastModified": 1719826879,
"narHash": "sha256-NkvFphHXKtQQ8F0XrqGlqkOhjHbE3671F8oLxwtTHhk=", "narHash": "sha256-xs7PlULe8O1SAcs/9e/HOjeUjBrU5FNtkAF/bSEcFto=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "12a9c0004bc987afb1ff511ebb97b67497a68e22", "rev": "b9014df496d5b68bf7c0145d0e9b0f529ce4f2a8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -774,11 +774,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1719690277, "lastModified": 1719848872,
"narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=", "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e", "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -851,11 +851,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1719834518, "lastModified": 1719885190,
"narHash": "sha256-5gkZjzHe5exZHq9VNzVAyJ1uOx7WPSVvWAuo8r5mmg0=", "narHash": "sha256-T0kI9FuR0kAj6vqKNI8JODTEnKtImPfl/pihEtv6ND0=",
"owner": "roc-lang", "owner": "roc-lang",
"repo": "roc", "repo": "roc",
"rev": "05ab0183805907c3042e9f946a08b793ea75c038", "rev": "97639cca7dd31ef2818b8f074792398294196952",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1150,11 +1150,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719822050, "lastModified": 1719882878,
"narHash": "sha256-b+nuXFemxeTTCUa4/zcMnFJqsQz/VhYJwIsomAABjfc=", "narHash": "sha256-2cmKpkEPzoEJkTP9V1fTqpPYI0oAFIH/NFB0bMzrToo=",
"owner": "Cloudef", "owner": "Cloudef",
"repo": "zig2nix", "repo": "zig2nix",
"rev": "40dde9856de971543b41e5f680a59df5a6be540f", "rev": "3655ededc2f6b3286c5018953664fc02db56158d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1174,11 +1174,11 @@
"zig-overlay": "zig-overlay" "zig-overlay": "zig-overlay"
}, },
"locked": { "locked": {
"lastModified": 1719603372, "lastModified": 1719858314,
"narHash": "sha256-iRwHXSYoKhgFih5ZN7f87CB4WpXH+4roZ8s3zn1s43M=", "narHash": "sha256-Hv6bTm/qxlvHrh8nYMu0kG6lG01CSWqqKxuqrojUtPU=",
"owner": "zigtools", "owner": "zigtools",
"repo": "zls", "repo": "zls",
"rev": "43995ddea2dc566b8341280b1fe378634f97897e", "rev": "f98b3ca18780f75de7bc22cfb3c8e731e5ccb75e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -31,6 +31,7 @@ func Execute() {
var ( var (
flake string flake string
host string host string
debug bool
verbose bool verbose bool
nom bool nom bool
systemPath bool systemPath bool
@ -42,7 +43,7 @@ var rootCmd = &cobra.Command{
Use: "oizys", Use: "oizys",
Short: "nix begat oizys", Short: "nix begat oizys",
PersistentPreRun: func(cmd *cobra.Command, args []string) { PersistentPreRun: func(cmd *cobra.Command, args []string) {
if verbose { if debug {
log.Info("running with verbose mode") log.Info("running with verbose mode")
log.SetLevel(log.DebugLevel) log.SetLevel(log.DebugLevel)
} }
@ -50,6 +51,7 @@ var rootCmd = &cobra.Command{
oizys.SetHost(host) oizys.SetHost(host)
oizys.SetVerbose(verbose) oizys.SetVerbose(verbose)
oizys.SetResetCache(resetCache) 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(&flake, "flake", "", "path to flake ($OIZYS_DIR or $HOME/oizys)")
rootCmd.PersistentFlags().StringVar(&host, "host", "", "host to build (current host)") rootCmd.PersistentFlags().StringVar(&host, "host", "", "host to build (current host)")
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "show verbose output") 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") rootCmd.PersistentFlags().BoolVar(&resetCache, "reset-cache", false, "set narinfo-cache-negative-ttl to 0")
} }

View file

@ -30,6 +30,7 @@ type Oizys struct {
verbose bool verbose bool
systemPath bool systemPath bool
resetCache bool resetCache bool
debug bool
} }
func New() *Oizys { func New() *Oizys {
@ -69,6 +70,8 @@ func SetFlake(path string) {
} }
} }
func SetDebug(debug bool) { o.debug = debug }
func SetCache(name string) { func SetCache(name string) {
if name != "" { if name != "" {
o.cache = name o.cache = name
@ -215,10 +218,11 @@ func parseDryRun2(buf string) ([]string, []string) {
return parts[0], parts[1] return parts[0], parts[1]
} }
// TODO: refactor to account for --debug and not --verbose?
func showDryRunResult(nixOutput string, verbose bool) { func showDryRunResult(nixOutput string, verbose bool) {
toBuild, toFetch := parseDryRun(nixOutput) toBuild, toFetch := parseDryRun(nixOutput)
toBuild.show(verbose) toFetch.show(o.debug)
toFetch.show(verbose) toBuild.show(true)
} }
func Dry(verbose bool, minimal bool, rest ...string) { func Dry(verbose bool, minimal bool, rest ...string) {