2 ms·
"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 th
by jynelson 1y ago
"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.
- huimang 1y agoAh 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 https://github.com/svanderburg/nix-patchtools [1]: https://blog.thalheim.io/2022/12/31/nix-ld-a-clean-solution-for-issues-with-pre-compiled-executables-on-nixos/ https://blog.thalheim.io/2022/12/31/nix-ld-a-clean-solution-... [2]: https://ayats.org/blog/nix-tuto-2 https://ayats.org/blog/nix-tuto-2 [3]: https://nixos.org/manual/nixpkgs/stable/ https://nixos.org/manual/nixpkgs/stable/