Thanks for the kind words!
So I hear two questions:
- How do I see the transitive dependencies for a given package?
- How do I see the files provided by a given package?
These aren’t directly exposed as part of Flox at the moment, but there’s still a way to get that information in the mean time if you’re ok with using some Nix tools.
Say you have ripgrep
installed in your environment and you’ve activated it:
$ flox init
$ flox install ripgrep
$ flox activate
You can get the Nix store path of the package like this:
$ realpath $(which rg)
/nix/store/md9kfvsz7axcb5b1z2yw2mybi3lhxyha-ripgrep-14.1.1/bin/rg
Once you have that you can inspect the directory via ls
, tree
, etc to see the files provided by the package (notice that I’ve stripped off the /bin/rg
from the store path above):
$ tre /nix/store/md9kfvsz7axcb5b1z2yw2mybi3lhxyha-ripgrep-14.1.1
/nix/store/md9kfvsz7axcb5b1z2yw2mybi3lhxyha-ripgrep-14.1.1
├── bin
│ └── rg
└── share
├── man
│ └── man1
│ └── rg.1
├── zsh
│ └── site-functions
│ └── _rg
├── fish
│ └── vendor_completions.d
│ └── rg.fish
└── bash-completion
└── completions
└── rg.bash
You can also use the nix-tree
tool to inspect the dependency tree as a TUI:
or you can use the following Nix command:
$ nix path-info --recursive --size --closure-size --human-readable /nix/store/md9kfvsz7axcb5b1z2yw2mybi3lhxyha-ripgrep-14.1.1
/nix/store/lcpbdhaw5yrw96kghpq9d5z0cfq4ljq5-libiconv-109 43.7 MiB 43.7 MiB
/nix/store/nvw88hi4c7v75xmxjkzis9gz2pk125px-pcre2-10.44 2.0 MiB 2.0 MiB
/nix/store/md9kfvsz7axcb5b1z2yw2mybi3lhxyha-ripgrep-14.1.1 5.4 MiB 51.1 MiB
I’ll create some tickets for surfacing the dependency tree and package files and we can talk about how or when to implement that with the team.
As for the last part about the line between Flox and Nix, we consider flakes kind of a “if you know exactly what you want, go ahead” part of the CLI. We don’t really choose to leave things out of Flox because they’re already handled by Nix. In the case of flakes, there are just some things that you can’t do with Flox at the moment, so we provide the ability to use flakes to fill in the gaps if you’re comfortable doing so. For instance, if you want to do embedded stuff with Rust you need a nightly compiler, but Nixpkgs doesn’t even contain nightly Rust compilers. In that case it’s not that there’s a gap in Flox so much as there’s a gap in Nixpkgs, but we still want you to be able to use Flox and get your work done, and there are flakes out there that allow you to bring in nightly Rust compilers.