Name

nix provenance show - show the provenance chain of store paths

Synopsis

nix provenance show [option...] installables...

Examples

  • Show the provenance of a store path:

    # nix provenance show /run/current-system
    /nix/store/k145bdxhdb89i4fkvgdisdz1yh2wiymm-nixos-system-machine-25.05.20251210.d2b1213
    ← copied from cache.flakehub.com
    ← built from derivation /nix/store/w3p3xkminq61hs00kihd34w1dglpj5s9-nixos-system-machine-25.05.20251210.d2b1213.drv (output out) on build-machine for x86_64-linux
    ← instantiated from flake output github:my-org/my-repo/6b03eb949597fe96d536e956a2c14da9901dbd21?dir=machine#nixosConfigurations.machine.config.system.build.toplevel
    

Description

Show the provenance chain of one or more store paths. For each store path, this displays where it came from: what binary cache it was copied from, what flake it was built from, and so on.

The provenance chain shows the history of how the store path came to exist, including:

  • Copied: The path was copied from another Nix store, typically a binary cache.
  • Built: The path was built from a derivation.
  • Flake evaluation: The derivation was instantiated during the evaluation of a flake output.
  • Fetched: The path was obtained by fetching a source tree.
  • Meta: Metadata associated with the derivation.

Note: if you want provenance in JSON format, use the provenance field returned by nix path-info --json.

Options

  • --stdin

    Read installables from the standard input. No default installable applied.

Common evaluation options

  • --arg name expr

    Pass the value expr as the argument name to Nix functions.

  • --arg-from-file name path

    Pass the contents of file path as the argument name to Nix functions.

  • --arg-from-stdin name

    Pass the contents of stdin as the argument name to Nix functions.

  • --argstr name string

    Pass the string string as the argument name to Nix functions.

  • --debugger

    Start an interactive environment if evaluation fails.

  • --eval-store store-url

    The URL of the Nix store to use for evaluation, i.e. to store derivations (.drv files) and inputs referenced by them.

  • --impure

    Allow access to mutable paths and repositories.

  • --include / -I path

    Add path to search path entries used to resolve lookup paths

    This option may be given multiple times.

    Paths added through -I take precedence over the nix-path configuration setting and the NIX_PATH environment variable.

  • --override-flake original-ref resolved-ref

    Override the flake registries, redirecting original-ref to resolved-ref.

  • --debug

    Set the logging verbosity level to 'debug'.

  • --log-format format

    Set the format of log output; one of raw, internal-json, bar or bar-with-logs.

  • --print-build-logs / -L

    Print full build logs on standard error.

  • --quiet

    Decrease the logging verbosity level.

  • --verbose / -v

    Increase the logging verbosity level.

Miscellaneous global options

  • --help

    Show usage information.

  • --offline

    Disable substituters and consider all previously downloaded files up-to-date.

  • --option name value

    Set the Nix configuration setting name to value (overriding nix.conf).

  • --refresh

    Consider all previously downloaded files out-of-date.

  • --repair

    During evaluation, rewrite missing or corrupted files in the Nix store. During building, rebuild missing or corrupted store paths.

  • --version

    Show version information.

Options that change the interpretation of installables

  • --all

    Apply the operation to every store path.

  • --derivation

    Operate on the store derivation rather than its outputs.

  • --expr expr

    Interpret installables as attribute paths relative to the Nix expression expr.

  • --file / -f file

    Interpret installables as attribute paths relative to the Nix expression stored in file. If file is the character -, then a Nix expression is read from standard input. Implies --impure.

  • --recursive / -r

    Apply operation to closure of the specified paths.

Note

See man nix.conf for overriding configuration settings with command line flags.