Dominik Honnef

Nix

Last modified:
by

To compute the store derivation path of an installable:

nix eval flake#output.drvPath

To actually make sure the store derivation is instantiated (and also return it):

nix path-info –derivation <installable>

The NixOS system flake output:

.#nixosConfigurations.chulak.config.system.build.toplevel

Getting the dependency tree of a derivation:

nix-store –query –tree <drv>

To get all the outputs of a derivation:'

nix path-info <installable>^*

To get the deriver that realised a store path:

nix-store –query –deriver <store path>

Finding why one derivation depends on another at runtime:

nix why-depends <dependant> <dependency>

Use –derivation for build-time dependencies of a derivation instead.

Unfortunately, nix why-depends seems to expect outputs as arguments, even when using –derivation.

nix-store –realise

Glossary