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

"at runtime" is not the same as "globally". i would love to install things locally at runtime, but the nix evaluator can't manage things that aren't packaged through a nix derivation, and i don't want to have to figure out how to package a random tool on the internet just to be able to run it at all.





Ah I misunderstood. Yes that's a bit more complex. Your options boil down to a) using pkgs.autoPatchelfHook [0], b) learning some nix and writing a derivation yourself, c) using nix-ld [1]. There's also pkgs.steam-run which provides a typical environment expected for games.

A great deal of things are already packaged, but for the most part I find it pretty fast to package something. Once you write a derivation [2] or two, it's not that bad. I never packaged for other distros because they all seemed quite tedious, but the nixpkgs reference [3] lists most things and I can look at the source of similar packages in nixpkgs. It is a time commitment though to learn so it's understandable that it's not really appealing.

[0]: https://github.com/svanderburg/nix-patchtools

[1]: https://blog.thalheim.io/2022/12/31/nix-ld-a-clean-solution-...

[2]: https://ayats.org/blog/nix-tuto-2

[3]: https://nixos.org/manual/nixpkgs/stable/




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: