List files of installed package

Hey,
I installed a custom package from a local repository like this:

nix-env -f /etc/nixos/apps -iA xerox6000-6010

I would like to see which files are installed by the package. Is there any command for it?

Best regards
Jonas

if it’s already in your nix store:

ls -l $(nix eval -f /etc/nixos/apps --raw xerox6000-6010.outPath)

if you haven’t built/installed it:

nix-build /etc/nixos/apps -A xerox6000-6010
ls -l ./result

nix-cli 2.0:

nix build -f /etc/nixos/apps xerox6000-6010
ls -l ./result
2 Likes

Isn’t readlink( -f) much more appropriate than to rely on ls which might be even aliased to something that does not understand -l and needs to be parsed manually?

Thanks @jonringer that helped :slight_smile:

1 Like