List Files of Package

Not really sure how I can list installed files by package that I find on for example search.nixos.org?

I’ve tried a few commands, but can’t get a full list;) Any pointers?

Depending on whether you use flakes or channels one of these 2 works:

$ find $(nix build nixpkgs#hello --print-out-paths --no-link)|head -3
/nix/store/260q5867crm1xjs4khgqpl6vr9kywql1-hello-2.12.1
/nix/store/260q5867crm1xjs4khgqpl6vr9kywql1-hello-2.12.1/bin
/nix/store/260q5867crm1xjs4khgqpl6vr9kywql1-hello-2.12.1/bin/hello
$ find $(nix-build '<nixpkgs>' -A hello --no-link)|head -3
/nix/store/260q5867crm1xjs4khgqpl6vr9kywql1-hello-2.12.1
/nix/store/260q5867crm1xjs4khgqpl6vr9kywql1-hello-2.12.1/bin
/nix/store/260q5867crm1xjs4khgqpl6vr9kywql1-hello-2.12.1/bin/hello
2 Likes

Not really sure what I’m looking at here;) It doesn’t list the actual pwsh binary that is installed

find $(nix-build '<nixpkgs>' -A powershell --no-link)|head -3
/nix/store/dz0bsv6r1yzc999jf7piabpcq1w2jg1v-powershell-7.2.3
/nix/store/dz0bsv6r1yzc999jf7piabpcq1w2jg1v-powershell-7.2.3/share
/nix/store/dz0bsv6r1yzc999jf7piabpcq1w2jg1v-powershell-7.2.3/share/powershell

Because you copied blindly… Doesn’t seem to be among the first 3 results…

$ find $(nix-build '<nixpkgs>' -A powershell --no-link)|rg pwsh
/nix/store/b1wv8m933yrp3jvqsxq7hlnsmwp8fqys-powershell-7.3.2/bin/pwsh
/nix/store/b1wv8m933yrp3jvqsxq7hlnsmwp8fqys-powershell-7.3.2/share/powershell/pwsh
/nix/store/b1wv8m933yrp3jvqsxq7hlnsmwp8fqys-powershell-7.3.2/share/powershell/pwsh.ni.r2rmap
/nix/store/b1wv8m933yrp3jvqsxq7hlnsmwp8fqys-powershell-7.3.2/share/powershell/pwsh.dll
/nix/store/b1wv8m933yrp3jvqsxq7hlnsmwp8fqys-powershell-7.3.2/share/powershell/pwsh.xml
/nix/store/b1wv8m933yrp3jvqsxq7hlnsmwp8fqys-powershell-7.3.2/share/powershell/pwsh.deps.json
/nix/store/b1wv8m933yrp3jvqsxq7hlnsmwp8fqys-powershell-7.3.2/share/powershell/pwsh.runtimeconfig.json
2 Likes