nix-community/nix-bundle

Cannot access any environment variables

Closed this issue · 4 comments

Taneb commented

From the source of AppRun.c I'd expect a number of environment variables to be available, in particular $USER. However:

$ echo $USER
nathan
$ nix-bundle bash /bin/bash
Nix bundle created at bash.
$ ./bash
bash-4.4$ echo $USER

bash-4.4$

Are you running nix-bundle from a Nixpkgs install? I think that one might be a little bit older.

Taneb commented

Ah, yes, that may be it.

You can clone this repo & use it directly as ./nix-bundle.sh. If that fixes this problem, I can do a new release so hopefully other people don't run into this.

You can clone this repo & use it directly as ./nix-bundle.sh. If that fixes this problem, I can do a new release so hopefully other people don't run into this.

Yes, please do that. Nixpkgs version can't build AppImages.