Move NIX_BIN_DIR and all logic using it to the Nix executable itself#11178
Move NIX_BIN_DIR and all logic using it to the Nix executable itself#11178Ericson2314 merged 1 commit intoNixOS:masterfrom
NIX_BIN_DIR and all logic using it to the Nix executable itself#11178Conversation
df11dd3 to
b0bc5cd
Compare
| If you're porting Nix to a new platform, that might be good enough for a while, but | ||
| you'll want to improve `getSelfExe()` to work on your platform. | ||
| */ | ||
| std::string nixExePath = nixBinDir + "/nix"; |
There was a problem hiding this comment.
This made libstore capable of remote builds regardless of PATH and regardless of the library consumer's main behavior.
If we do this, we need a release note so library consumers can make sure a compatible nix is on their PATH, which is not a given for programs that run as a service.
(fwiw hercules-ci-agent NixOS module seems unaffected, oddly)
b0bc5cd to
f611899
Compare
d3676c6 to
b7094cc
Compare
3e9f429 to
55f301f
Compare
d6af41a to
9902e38
Compare
|
🎉 All dependencies have been resolved ! |
|
This kind of needs a rebase to incorporate the last couple lookup path changes. Note that not all methods were part of #11218; don't drop the first commit (but do fix and reword it) |
2f954e3 to
61c7b3c
Compare
I am not sure what this means? It was not rebased on the entirety of #11218 because the second commit of that, but this was a no-conflict rebase on top except for renaming |
|
Perhaps relating to #11218 (comment) By "second commit" there I had meant "second PR", i.e. this one. The Also we can decide whether |
61c7b3c to
e432e7b
Compare
roberth
left a comment
There was a problem hiding this comment.
Have thoughts and suggestions, but otherwise LGTM.
| writeChannels(); | ||
|
|
||
| runProgram(settings.nixBinDir + "/nix-env", true, { "--profile", profile, "--uninstall", name }); | ||
| runProgram(getNixBin("nix-env").string(), true, { "--profile", profile, "--uninstall", name }); |
There was a problem hiding this comment.
We ought to just call C++ for this, but this will do for now.
There was a problem hiding this comment.
Is bin-dir the right name for this? It doesn't seem to be about a directory, as it abstracts that away.
Would self-exec be better?
230470f to
f5ced8d
Compare
This is because with the split packages of the Meson build, we simply have no idea what directory the binaries will be installed in when we build the library. In the process of doing so, consolidate and make more sophisticated the logic to cope with a few corner cases (e.g. `NIX_BIN_DIR` exists, but no binaries are inside it). Co-authored-by: Robert Hensing <[email protected]>
f5ced8d to
58b03ef
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Motivation
This is because with the split packages of the Meson build, we simply have no idea what directory the binaries will be installed in when we build the library.
In the process of doing so, consolidate and make more sophisticated the logic to cope with a few corner cases (e.g.
NIX_BIN_DIRexists, but no binaries are inside it).Context
#2503
depends on #11218
Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.