Nix bundler creates symlink not a stanalone binary

HI. First time using nix bundler. I tried:
‘nix bundle nixpkgs#cpuid.’ Which created a symlink back to the nix store.
/nix/store/1vwlc51yma9qrsq0flvp6lp6mwbzajsr-arx
Docs say:
nix bundle , by default, packs the closure of the installable into a single self-extracting executable.

I just see a symlink not a binary?

Thanks

Murray

Yes, it is a link to the store, it has not been copied out there for space efficiency reasons.

$ nix bundle nixpkgs#exa
$ nix run nixpkgs#file $(readlink exa)
/nix/store/8hajvfk1ynxnww1rjm426rjqk0mq24j5-arx: POSIX shell script executable (binary data)
$ nix path-info -rsS $(readlink exa)
/nix/store/8hajvfk1ynxnww1rjm426rjqk0mq24j5-arx    23549672        23549672

Just take it on a USB and have fun with it.

Thanks again.

I’m missing something. I thought it would work something like an AppImage. Nix bundle would
create the equivalent of exa.AppImage which I could copy to another distro.

“Just take it on a USB and have fun with it.”
Not sure what ‘it’ is referring to.

Can I extract the exa bundle from the store or does it always have to be in the store?

Thanks

Murray

NobbZ
October 28

Yes, it is a link to the store, it has not been copied out there for space efficiency reasons.

$ nix bundle nixpkgs#exa
$ nix run nixpkgs#file $(readlink exa)
/nix/store/8hajvfk1ynxnww1rjm426rjqk0mq24j5-arx: POSIX shell script executable (binary data)
$ nix path-info -rsS $(readlink exa)
/nix/store/8hajvfk1ynxnww1rjm426rjqk0mq24j5-arx    23549672        23549672

Just take it on a USB and have fun with it.

Yes, just copy the bundle from the store to another PC and it should work.

I have to be honest though, Last time I played with bundle it only worked for smaller stuff, and only CLI tools.

It was not a pleasing experience, especially given the size of the artifacts. This has been 18+ months ago though, back before the official 2.4 release when nix-bundle still was an additional tool.