Fix build hook error for libstore library users#8517
Merged
edolstra merged 1 commit intoNixOS:masterfrom Jun 16, 2023
Merged
Conversation
roberth
commented
Jun 14, 2023
Ericson2314
reviewed
Jun 14, 2023
This comment was marked as resolved.
This comment was marked as resolved.
93667d5 to
4cbd60f
Compare
Ericson2314
reviewed
Jun 14, 2023
b231749 to
c75784e
Compare
Ericson2314
reviewed
Jun 15, 2023
A library shouldn't require changes to the caller's argument handling, especially if it doesn't have to, and indeed we don't have to. This changes the lookup order to prioritize the hardcoded path to nix if it exists. The static executable still finds itself through /proc and the like.
c75784e to
d2696cd
Compare
thufschmitt
approved these changes
Jun 16, 2023
Contributor
|
Triaged in Nix team meeting:
|
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-06-16-nix-team-meeting-minutes-63/29316/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
A library shouldn't require changes to the caller's argument handling, especially if it doesn't have to, and indeed we don't have to.
This changes the lookup order to prioritize the hardcoded path to nix if it exists. The static executable still finds itself through /proc and the like.
Context
Encountered in hercules-ci-agent when run on a single user installation.
A solution is also required for #7735. It currently contains a workaround, whereas this is a general solution.
nixos-optionprobably also suffers from this problem.May be obsoleted by #1221, but a simple bugfix should take priority I think.
Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.shsrc/*/teststests/nixos/*Priorities
Add 👍 to pull requests you find important.