.\" -*- mode: troff; coding: utf-8 -*- .TH "nix3-path-info" "1" "" .PP \fBWarning\fR: This program is \fBexperimental\fR and its interface is subject to change. .SH Name \fCnix path-info\fR - query information about store paths .SH Synopsis \fCnix path-info\fR [\fIoption\fR\[u2026]] \fIinstallables\fR\[u2026] .SH Examples .IP "\(bu" 2 Print the store path produced by \fCnixpkgs#hello\fR: .LP .EX # nix path-info nixpkgs#hello /nix/store/v5sv61sszx301i0x6xysaqzla09nksnd-hello-2.10 .EE .IP "\(bu" 2 Show the closure sizes of every path in the current NixOS system closure, sorted by size: .LP .EX # nix path-info -rS /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" 2 Show a package\[u2019]s closure size and all its dependencies with human readable sizes: .LP .EX # nix path-info -rsSh nixpkgs#rustc /nix/store/01rrgsg5zk3cds0xgdsq40zpk6g51dz9-ncurses-6.2-dev 386.7K 69.1M /nix/store/0q783wnvixpqz6dxjp16nw296avgczam-libpfm-4.11.0 5.9M 37.4M … .EE .IP "\(bu" 2 Check the existence of a path in a binary cache: .LP .EX # nix path-info -r /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" 2 Print the 10 most recently added paths (using \[u2013]json and the jq(1) command): .LP .EX # nix path-info --json --all | jq -r 'sort_by(.registrationTime)[-11:-1][].path' .EE .IP "\(bu" 2 Show the size of the entire Nix store: .LP .EX # nix path-info --json --all | jq 'map(.narSize) | add' 49812020936 .EE .IP "\(bu" 2 Show every path whose closure is bigger than 1 GB, sorted by closure size: .LP .EX # nix path-info --json --all -S \e | jq 'map(select(.closureSize > 1e9)) | sort_by(.closureSize) | map([.path, .closureSize])' [ …, [ \(dq/nix/store/zqamz3cz4dbzfihki2mk7a63mbkxz9xq-nixos-system-machine-20.09.20201112.3090c65\(dq, 5887562256 ] ] .EE .IP "\(bu" 2 Print the path of the store derivation produced by \fCnixpkgs#hello\fR: .LP .EX # nix path-info --derivation nixpkgs#hello /nix/store/s6rn4jz1sin56rf4qj5b5v8jxjm32hlk-hello-2.10.drv .EE .SH Description This command shows information about the store paths produced by \fIinstallables\fR, or about all paths in the store if you pass \fC--all\fR. .PP By default, this command only prints the store paths. You can get additional information by passing flags such as \fC--closure-size\fR, \fC--size\fR, \fC--sigs\fR or \fC--json\fR. .RS .PP \fBWarning\fR .PP Note that \fCnix path-info\fR does not build or substitute the \fIinstallables\fR you specify. Thus, if the corresponding store paths don\[u2019]t already exist, this command will fail. You can use \fCnix build\fR to ensure that they exist. .RE .SH Options .IP "\(bu" 2 \fC--closure-size\fR / \fC-S\fR .br Print the sum of the sizes of the NAR serialisations of the closure of each path. .IP "\(bu" 2 \fC--human-readable\fR / \fC-h\fR .br With \fC-s\fR and \fC-S\fR, print sizes in a human-friendly format such as \fC5.67G\fR. .IP "\(bu" 2 \fC--json\fR .br Produce output in JSON format, suitable for consumption by another program. .IP "\(bu" 2 \fC--sigs\fR .br Show signatures. .IP "\(bu" 2 \fC--size\fR / \fC-s\fR .br Print the size of the NAR serialisation of each path. .LP \fBCommon evaluation options:\fR .IP "\(bu" 2 \fC--arg\fR \fIname\fR \fIexpr\fR .br Pass the value \fIexpr\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--argstr\fR \fIname\fR \fIstring\fR .br Pass the string \fIstring\fR as the argument \fIname\fR to Nix functions. .IP "\(bu" 2 \fC--eval-store\fR \fIstore-url\fR .br The Nix store to use for evaluations. .IP "\(bu" 2 \fC--impure\fR .br Allow access to mutable paths and repositories. .IP "\(bu" 2 \fC--include\fR / \fC-I\fR \fIpath\fR .br Add \fIpath\fR to the list of locations used to look up \fC<...>\fR file names. .IP "\(bu" 2 \fC--override-flake\fR \fIoriginal-ref\fR \fIresolved-ref\fR .br Override the flake registries, redirecting \fIoriginal-ref\fR to \fIresolved-ref\fR. .LP \fBCommon flake-related options:\fR .IP "\(bu" 2 \fC--commit-lock-file\fR .br Commit changes to the flake\[u2019]s lock file. .IP "\(bu" 2 \fC--inputs-from\fR \fIflake-url\fR .br Use the inputs of the specified flake as registry entries. .IP "\(bu" 2 \fC--no-registries\fR .br Don\[u2019]t allow lookups in the flake registries. This option is deprecated; use \fC--no-use-registries\fR. .IP "\(bu" 2 \fC--no-update-lock-file\fR .br Do not allow any updates to the flake\[u2019]s lock file. .IP "\(bu" 2 \fC--no-write-lock-file\fR .br Do not write the flake\[u2019]s newly generated lock file. .IP "\(bu" 2 \fC--override-input\fR \fIinput-path\fR \fIflake-url\fR .br Override a specific flake input (e.g. \fCdwarffs/nixpkgs\fR). This implies \fC--no-write-lock-file\fR. .IP "\(bu" 2 \fC--recreate-lock-file\fR .br Recreate the flake\[u2019]s lock file from scratch. .IP "\(bu" 2 \fC--update-input\fR \fIinput-path\fR .br Update a specific flake input (ignoring its previous entry in the lock file). .LP \fBOptions that change the interpretation of installables:\fR .IP "\(bu" 2 \fC--all\fR .br Apply the operation to every store path. .IP "\(bu" 2 \fC--derivation\fR .br Operate on the store derivation rather than its outputs. .IP "\(bu" 2 \fC--expr\fR \fIexpr\fR .br Interpret installables as attribute paths relative to the Nix expression \fIexpr\fR. .IP "\(bu" 2 \fC--file\fR / \fC-f\fR \fIfile\fR .br Interpret installables 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. .IP "\(bu" 2 \fC--recursive\fR / \fC-r\fR .br Apply operation to closure of the specified paths.