Hacker News new | past | comments | ask | show | jobs | submit login

> PYTHONPATH, CPATH, etc are all set up and ready to go.

Does that mean that Guix just exports the required environment variables in the shell rather than wrapping each executable with a bash script [1] like nix does?

If yes, that's great, because the wrapper approach feels like an ugly hack. I found some executables on my nixos installation that are behind three layers of wrappers, and that's probably not the maximum.

I guess nix could improve this situation by making `wrapProgram` smarter (if the executable to be wrapped is already a wrapper, merge the inner and outer wrapper), but even single-layer wrappers are annoying, and I imagine they have some performance impact.

EDIT:

I forgot about nix-shell, which does actually export the right environment variables directly to the shell.

[1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-supp...




Guix has a mechanism called search-paths which is defined for any package like Python that searches for things based on envars; it exports the relevant search paths into the environment. Though it also has shell wrappers, which are essentially a hack around non-propagating dependencies: it allows you to expose things that would normally be visible to everyone, like executables, to just the specific program.


Does nix-shell/`nix develop` use makeWrapper?


Thank you, I totally forgot how nix-shell works. You're right, it should export the right env variables without makeWrapper.

I haven't used nixos in a while and I got confused about this because to install python packages globally I used `python3.withPackages` and that does use the wrappers.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: