Last active
June 22, 2019 05:51
-
-
Save CMCDragonkai/a962f47501ab581a5925a44d192f1c78 to your computer and use it in GitHub Desktop.
Nix Store Queries #nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# show the output paths of a derivation | |
nix-store --query --outputs $(nix-instantiate) | |
# show the immediate dependencies of a derivation | |
nix-store --query --references $(nix-instantiate) | |
# show the transitive dependencies of a derivation | |
nix-store --query --requisites $(nix-instantiate) | |
# show the dependers of a store-path | |
nix-store --query --referrers $(nix-instantiate) | |
# show the transitive dependers of store-path (includes itself) | |
nix-store --query --referrers-closure $(nix-instantiate) | |
# show the derivation of the non-derivation store-path | |
nix-store --query --deriver $(nix-build) | |
# note this bidirectional relationship: | |
# this is probably made possible via the nix database | |
# DRV -> OUTPUT | |
nix-store --query --outputs $(nix-instantiate) | |
# OUTPUT -> DRV | |
nix-store --query --deriver $(nix-build) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment