nixos/doc/manual: init chapter on fhs binaries#264433
nixos/doc/manual: init chapter on fhs binaries#264433SomeoneSerge wants to merge 1 commit intoNixOS:masterfrom
Conversation
There was a problem hiding this comment.
I think it might make sense to describe that nix-built binaries have something like /nix/store/00000000000000000000000000000000-glibc-2.xx-xx/lib/ld-linux-x86-64.so.2 set as dynamic linker.
There was a problem hiding this comment.
One notable limitation where nix-ld won't work, is however if you have try to use a library in a scripting language like python, where the interpreter comes from nixpkgs and hence NIX_LIBRARY_PATH is not effective: https://github.com/Mic92/nix-ld/tree/main#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
fricklerhandwerk
left a comment
There was a problem hiding this comment.
It's a very important topic, and on the technical level this is very thoroughly covered, but I fear in the current state the addition won't alleviate confusion by far as much as it could (and should).
The main problem I see is that the change is trying to do many things at once, and that it doesn't provide enough context for the complex examples. That's generally a problem with the Nixpkgs manual: authors are often so deep into their subject that they find it hard to pick up readers from where they are. And it is work to do that.
Since now a lot of comments have piled up, instead of burdening you with change requests I propose to split out just the problem statement into a PR against the Nixpkgs manual to open a new section. Then we'll have something that can be iterated on with less hassle and merged quickly.
There was a problem hiding this comment.
Starting here it gets a bit confusing and repetitive. The confusing part is that the examples assume system state. It's repetitive because all that changes is that each example works in one case but not the other. I think it's enough to point to the option and say it's required to run FHS programs, as they won't work otherwise.
In an effort to address concerns of the users that require integration with other distributions, including language-specific package managers Update nixos/doc/manual/configuration/fhs.chapter.md Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com> Update nixos/doc/manual/configuration/fhs.chapter.md Update nixos/doc/manual/configuration/fhs.chapter.md nixos/doc/fhs: mention how nixpkgs executables are linked
b900b21 to
48dbb2a
Compare
|
I'm considering whether to link here in the error message from #269551 to make it much shorter... and I'm not sure. This is written more as an in-depth education on the infrastructure, and solutions aimed more at developers. The message I'm writing will often be seen by quite inexperienced users, and I don't want to throw too big a wall of text at them. Thoughts? |
|
Just to stay in sync: I read and am grateful for all of the feedback. I'll be rewriting this script, hopefully next week. Been occupied elsewhere so far |
I think its fair to have a smaller document just for stub-ld that maybe also link to this one here. |
I think if you simplify the example as @fricklerhandwerk said in #264433 (comment) than this is good to go. |
This is a work in progress!
I know I'm not a writer, and I'm probably using language and tone inappropriate to the manual, but I am convinced this chapter has to be written and included in the manual. The purpose is specifically to address concerns of the potential and existing NixOS users that require integration with external distributions, including language-specific package managers.
Description of changes
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)CC also @NixOS/cuda-maintainers @Mic92