Dmitry Bogatov <[email protected]> writes:
> [2018-12-29 19:54] Vincent Bernat <[email protected]>
>> > Probably not. Violations of FHS is violation of policy, and to get
>> > authorization to policy violation is long road, starting with discussion
>> > on debian-devel@.
>> >
>> > But, can't we just configure Nix to store it under /var/nix?
>>
>> This would break the ability to use pre-built stuff and make nix
>> slow.
>
> I belive you, but just for my curiosity, what will break if we download
> substitute (nar, almost tar archive) and extract it not in /nix, but in
> /var/nix?
The depender will break if the dependency is not at the path where it
used to be at build-time (by default /nix/store/...). All software
deployed by nix contains the full path to its dependencies. And all
dependencies are available inside the nix-store. The idea is to rely on
nothing that is outside the nix-store.
For example an ldd on bash looks like this:
$ ldd
/nix/store/ij6wirzff9id7jr071p04w4nk6hksc3y-bash-interactive-4.4-p23/bin/bash
/nix/store/ij6wirzff9id7jr071p04w4nk6hksc3y-bash-interactive-4.4-p23/bin/bash:
linux-vdso.so.1 (0x00007ffe1a7d5000)
libreadline.so.7 =>
/nix/store/vvwxc17kpc39qbcz7qp7mkqa7fr0my84-readline-7.0p5/lib/libreadline.so.7
(0x00007f25b0593000)
libhistory.so.7 =>
/nix/store/vvwxc17kpc39qbcz7qp7mkqa7fr0my84-readline-7.0p5/lib/libhistory.so.7
(0x00007f25b0389000)
libncursesw.so.6 =>
/nix/store/2lbhgxlrhgnij2c3bm719xidymmhp0m0-ncurses-6.1-20181027/lib/libncursesw.so.6
(0x00007f25b011a000)
libdl.so.2 =>
/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libdl.so.2
(0x00007f25aff16000)
libc.so.6 =>
/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib/libc.so.6
(0x00007f25afb62000)
/nix/store/7gx4kiv5m0i7d7qkixq2cobra10lvxwc-glibc-2.27/lib/ld-linux-x86-64.so.2
=>
/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/lib64/ld-linux-x86-64.so.2
(0x00007f25b07def000)
Regards, Kai