nix-olde
nix-olde copied to clipboard
Add more info to show progress to let me know it's not crash.
$ nix run github:trofi/nix-olde -- -f /etc/nix-darwin#jason-MacBook-Pro
Fetching 'repology'
Fetching 'available'
Fetching 'installed'
'installed' done, took 54.62 s.
It tooks a long time.
With -v, still looks bad:
$ nix run github:trofi/nix-olde -- -f /etc/nix-darwin#jason-MacBook-Pro -v
Fetching 'repology'
Fetching 'available'
DEBUG: Fetching from repology: ""
Fetching 'installed'
DEBUG: Running ["nix", "--extra-experimental-features", "nix-command", "--extra-experimental-features", "flakes", "flake", "archive", "/Users/jason/nix-config", "--json"]: ExitStatus(unix_wait_status(0))
DEBUG: Running ["nix", "--extra-experimental-features", "nix-command", "--extra-experimental-features", "flakes", "eval", "--impure", "--raw", "/Users/jason/nix-config#darwinConfigurations.jason-MacBook-Pro.config.system.build.toplevel.drvPath"]: ExitStatus(unix_wait_status(0))
DEBUG: Running ["nix", "--extra-experimental-features", "nix-command", "show-derivation", "-r", "/nix/store/kr98nbgn34y6cfdx2chizi7m7aam946l-darwin-system-25.11.c3211fc.drv"]: ExitStatus(unix_wait_status(0))
'installed' done, took 36.01 s.
DEBUG: Running ["nix-env", "-qa", "--json", "--arg", "config", "import <nixpkgs/pkgs/top-level/packages-config.nix>", "--option", "build-users-group", "\"\"", "-I", "nixpkgs=/nix/store/6h0sni7pw7gglk3cdml8zmbms1d5k3fq-source", "-f", "/nix/store/6h0sni7pw7gglk3cdml8zmbms1d5k3fq-source"]: ExitStatus(unix_wait_status(0))
'available' done, took 71.47 s.
I think it's better to have a progress show like official nix or nom.
Yeah, I have been thinking of adding a fancier progress meter like https://docs.rs/indicatif/latest/indicatif/. SOme commands are harder to track progress, like nix eval ones. BUt the slowest repology one should not be too hard as we always know the prefix we are fetching.