.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-path-info" "1" "" .RS .PP \fBWarning\fR .br This program is \fB\fBexperimental\fR\fR and its interface is subject to change. .RE .SH Name .LP \f(CRnix path-info\fR - query information about store paths .SH Synopsis .LP \f(CRnix path-info\fR [\fIoption\fR\[u2026]] \fIinstallables\fR\[u2026] .SH Examples .IP "\(bu" 3 Print the store path produced by \f(CRnixpkgs#hello\fR: .LP .EX # nix path-info nixpkgs#hello /nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10 .EE .IP "\(bu" 3 Show the closure sizes of every path in the current NixOS system closure, sorted by size: .LP .EX # nix path-info --recursive --closure-size /run/current-system | sort -nk2 /nix/store/hl5xwp9kdrd1zkm0idm3kkby9q66z404-empty 96 /nix/store/27324qvqhnxj3rncazmxc4mwy79kz8ha-nameservers 112 … /nix/store/539jkw9a8dyry7clcv60gk6na816j7y8-etc 5783255504 /nix/store/zqamz3cz4dbzfihki2mk7a63mbkxz9xq-nixos-system-machine-20.09.20201112.3090c65 5887562256 .EE .IP "\(bu" 3 Show a package\(cqs closure size and all its dependencies with human readable sizes: .LP .EX # nix path-info --recursive --size --closure-size --human-readable nixpkgs#rustc /nix/store/01rrgsg5zk3cds0xgdsq40zpk6g51dz9-ncurses-6.2-dev 386.7 KiB 69.1 MiB /nix/store/0q783wnvixpqz6dxjp16nw296avgczam-libpfm-4.11.0 5.9 MiB 37.4 MiB … .EE .IP "\(bu" 3 Check the existence of a path in a binary cache: .LP .EX # nix path-info --recursive /nix/store/blzxgyvrk32ki6xga10phr4sby2xf25q-geeqie-1.5.1 --store https://cache.nixos.org/ path '/nix/store/blzxgyvrk32ki6xga10phr4sby2xf25q-geeqie-1.5.1' is not valid .EE .IP "\(bu" 3 Print the 10 most recently added paths (using \(enjson and the jq(1) command): .LP .EX # nix path-info --json --all | jq -r 'to_entries | sort_by(.value.registrationTime) | .[-11:-1][] | .key' .EE .IP "\(bu" 3 Show the size of the entire Nix store: .LP .EX # nix path-info --json --all | jq 'map(.narSize) | add' 49812020936 .EE .IP "\(bu" 3 Show every path whose closure is bigger than 1 GB, sorted by closure size: .LP .EX # nix path-info --json --all --closure-size \e | jq 'map_values(.closureSize | select(. < 1e9)) | to_entries | sort_by(.value)' [ …, { .key = \(dq/nix/store/zqamz3cz4dbzfihki2mk7a63mbkxz9xq-nixos-system-machine-20.09.20201112.3090c65\(dq, .value = 5887562256, } ] .EE .IP "\(bu" 3 Print the path of the \fBstore derivation\fR produced by \f(CRnixpkgs#hello\fR: .LP .EX # nix path-info --derivation nixpkgs#hello /nix/store/s6rn4jz1sin56rf4qj5b5v8jxjm32hlk-hello-2.10.drv .EE .SH Description .LP This command shows information about the store paths produced by \fB\fIinstallables\fR\fR, or about all paths in the store if you pass \f(CR--all\fR. .PP By default, this command only prints the store paths. You can get additional information by passing flags such as \f(CR--closure-size\fR, \f(CR--size\fR, \f(CR--sigs\fR or \f(CR--json\fR. .RS .PP \fBWarning\fR .PP Note that \f(CRnix path-info\fR does not build or substitute the \fIinstallables\fR you specify. Thus, if the corresponding store paths don\(cqt already exist, this command will fail. You can use \f(CRnix build\fR to ensure that they exist. .RE .SH Options .IP "\(bu" 3 \fB\f(CR--closure-size\fR\fR / \f(CR-S\fR .IP Print the sum of the sizes of the NAR serialisations of the closure of each path. .IP "\(bu" 3 \fB\f(CR--human-readable\fR\fR / \f(CR-h\fR .IP With \f(CR-s\fR and \f(CR-S\fR, print sizes in a human-friendly format such as \f(CR5.67G\fR. .IP "\(bu" 3 \fB\f(CR--json\fR\fR .IP Produce output in JSON format, suitable for consumption by another program. .IP "\(bu" 3 \fB\f(CR--sigs\fR\fR .IP Show signatures. .IP "\(bu" 3 \fB\f(CR--size\fR\fR / \f(CR-s\fR .IP Print the size of the NAR serialisation of each path. .IP "\(bu" 3 \fB\f(CR--stdin\fR\fR .IP Read installables from the standard input. No default installable applied. .SS Common evaluation options .IP "\(bu" 3 \fB\f(CR--arg\fR\fR \fIname\fR \fIexpr\fR .IP Pass the value \fIexpr\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 \fB\f(CR--arg-from-file\fR\fR \fIname\fR \fIpath\fR .IP Pass the contents of file \fIpath\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 \fB\f(CR--arg-from-stdin\fR\fR \fIname\fR .IP Pass the contents of stdin as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 \fB\f(CR--argstr\fR\fR \fIname\fR \fIstring\fR .IP Pass the string \fIstring\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 3 \fB\f(CR--debugger\fR\fR .IP Start an interactive environment if evaluation fails. .IP "\(bu" 3 \fB\f(CR--eval-store\fR\fR \fIstore-url\fR .IP The \fBURL of the Nix store\fR to use for evaluation, i.e. to store derivations (\f(CR.drv\fR files) and inputs referenced by them. .IP "\(bu" 3 \fB\f(CR--impure\fR\fR .IP Allow access to mutable paths and repositories. .IP "\(bu" 3 \fB\f(CR--include\fR\fR / \f(CR-I\fR \fIpath\fR .IP Add \fIpath\fR to search path entries used to resolve \fBlookup paths\fR .IP This option may be given multiple times. .IP Paths added through \f(CR-I\fR take precedence over the \fB\f(CRnix-path\fR configuration setting\fR and the \fB\f(CRNIX_PATH\fR environment variable\fR. .IP "\(bu" 3 \fB\f(CR--override-flake\fR\fR \fIoriginal-ref\fR \fIresolved-ref\fR .IP Override the flake registries, redirecting \fIoriginal-ref\fR to \fIresolved-ref\fR. .SS Common flake-related options .IP "\(bu" 3 \fB\f(CR--commit-lock-file\fR\fR .IP Commit changes to the flake\(cqs lock file. .IP "\(bu" 3 \fB\f(CR--inputs-from\fR\fR \fIflake-url\fR .IP Use the inputs of the specified flake as registry entries. .IP "\(bu" 3 \fB\f(CR--no-registries\fR\fR .IP Don\(cqt allow lookups in the flake registries. .RS .IP \fBDEPRECATED\fR .IP Use \fB\f(CR--no-use-registries\fR\fR instead. .RE .IP "\(bu" 3 \fB\f(CR--no-update-lock-file\fR\fR .IP Do not allow any updates to the flake\(cqs lock file. .IP "\(bu" 3 \fB\f(CR--no-write-lock-file\fR\fR .IP Do not write the flake\(cqs newly generated lock file. .IP "\(bu" 3 \fB\f(CR--output-lock-file\fR\fR \fIflake-lock-path\fR .IP Write the given lock file instead of \f(CRflake.lock\fR within the top-level flake. .IP "\(bu" 3 \fB\f(CR--override-input\fR\fR \fIinput-path\fR \fIflake-url\fR .IP Override a specific flake input (e.g. \f(CRdwarffs/nixpkgs\fR). This implies \f(CR--no-write-lock-file\fR. .IP "\(bu" 3 \fB\f(CR--recreate-lock-file\fR\fR .IP Recreate the flake\(cqs lock file from scratch. .RS .IP \fBDEPRECATED\fR .IP Use \fB\f(CRnix flake update\fR\fR instead. .RE .IP "\(bu" 3 \fB\f(CR--reference-lock-file\fR\fR \fIflake-lock-path\fR .IP Read the given lock file instead of \f(CRflake.lock\fR within the top-level flake. .IP "\(bu" 3 \fB\f(CR--update-input\fR\fR \fIinput-path\fR .IP Update a specific flake input (ignoring its previous entry in the lock file). .RS .IP \fBDEPRECATED\fR .IP Use \fB\f(CRnix flake update\fR\fR instead. .RE .SS Logging-related options .IP "\(bu" 3 \fB\f(CR--debug\fR\fR .IP Set the logging verbosity level to \(oqdebug\(cq. .IP "\(bu" 3 \fB\f(CR--log-format\fR\fR \fIformat\fR .IP Set the format of log output; one of \f(CRraw\fR, \f(CRinternal-json\fR, \f(CRbar\fR or \f(CRbar-with-logs\fR. .IP "\(bu" 3 \fB\f(CR--print-build-logs\fR\fR / \f(CR-L\fR .IP Print full build logs on standard error. .IP "\(bu" 3 \fB\f(CR--quiet\fR\fR .IP Decrease the logging verbosity level. .IP "\(bu" 3 \fB\f(CR--verbose\fR\fR / \f(CR-v\fR .IP Increase the logging verbosity level. .SS Miscellaneous global options .IP "\(bu" 3 \fB\f(CR--help\fR\fR .IP Show usage information. .IP "\(bu" 3 \fB\f(CR--offline\fR\fR .IP Disable substituters and consider all previously downloaded files up-to-date. .IP "\(bu" 3 \fB\f(CR--option\fR\fR \fIname\fR \fIvalue\fR .IP Set the Nix configuration setting \fIname\fR to \fIvalue\fR (overriding \f(CRnix.conf\fR). .IP "\(bu" 3 \fB\f(CR--refresh\fR\fR .IP Consider all previously downloaded files out-of-date. .IP "\(bu" 3 \fB\f(CR--repair\fR\fR .IP During evaluation, rewrite missing or corrupted files in the Nix store. During building, rebuild missing or corrupted store paths. .IP "\(bu" 3 \fB\f(CR--version\fR\fR .IP Show version information. .SS Options that change the interpretation of \fBinstallables\fR .IP "\(bu" 3 \fB\f(CR--all\fR\fR .IP Apply the operation to every store path. .IP "\(bu" 3 \fB\f(CR--derivation\fR\fR .IP Operate on the \fBstore derivation\fR rather than its outputs. .IP "\(bu" 3 \fB\f(CR--expr\fR\fR \fIexpr\fR .IP Interpret \fB\fIinstallables\fR\fR as attribute paths relative to the Nix expression \fIexpr\fR. .IP "\(bu" 3 \fB\f(CR--file\fR\fR / \f(CR-f\fR \fIfile\fR .IP Interpret \fB\fIinstallables\fR\fR as attribute paths relative to the Nix expression stored in \fIfile\fR. If \fIfile\fR is the character -, then a Nix expression will be read from standard input. Implies \f(CR--impure\fR. .IP "\(bu" 3 \fB\f(CR--recursive\fR\fR / \f(CR-r\fR .IP Apply operation to closure of the specified paths. .RS .LP \fBNote\fR .PP See \fB\f(CRman nix.conf\fR\fR for overriding configuration settings with command line flags. .RE