Conversation
Current manual needs nix installed into $(bindir) which could be non-writable if $(prefix) set to root-owned directory like /usr or /usr/local. In addition, half-baked nix could override the good nix that installed in $(prefix). Let's run $(nix_DIR)/nix instead of $(bindir)/nix.
|
Downstream patches from void-linux/void-packages#39050 |
thufschmitt
left a comment
There was a problem hiding this comment.
The qemu bits is very nice :)
The use of the locally built nix is more annoying because of an idiosyncrasy of the build system: $(nix_DIR)/nix and $(bindir)/nix are two separate executables (linked with different flags), and make install currently never builds $(nix_DIR)/nix. This change would make it necessary to build it too, which is annoying since the linking phase is far from cheap.
Ideally I'd really like to get rid of this weirdness and have make install just copy (and patchelf if needs be) the result of make, but that's another topic
|
I would rather get rid of the non- |
But that would make life harder for those people who want to use a stable nix by distros channel. |
I'm no expert in the field, but isn't that a fairly common and mostly solved problem, either by using relative rpaths or patching the rpath at install time? |
|
The actual fix will come as a side effect of #3160 since Meson internally handles both rpath and LD_LIBRARY_PATH and guarantees that build executables can be run by other build rules. |
|
The first commit is handled by #5145, you should rebase on top for it. |
This PR consists of 2 changes, the first change allows building manual this all target with touching anything outside build-directory. The second change adds support for cross compilation via qemu.
Current code base will always install nix into
$(prefix)whenmakewhich is undesirable, since it may override thenix(assumed-to-be-good) installed in$(prefix)by the under-developmentnix(could be buggy) unconditionally.The first change aimed to fix it, the second change is a bonus change that depends on the first change.