libstore: Correct getUri methods for all stores#13734
Merged
Mic92 merged 5 commits intoNixOS:masterfrom Aug 11, 2025
Merged
Conversation
This is necessary to make libstore-tests for store configs work again.
These headers need to be included before everything else (at least in GCC).
Previously `getUri` didn't include store query parameters, `ssh-ng` didn't include any information at all and the local store didn't have the path: ``` $ nix store info --store "local?root=/tmp/aaa&require-sigs=false" Store URL: local Version: 2.31.0 Trusted: 1 $ nix store info --store "ssh-ng://localhost?remote-program=nix-daemon" Store URL: ssh-ng:// Version: 2.31.0 Trusted: 1 $ nix store info --store "ssh://localhost?remote-program=nix-store" Store URL: ssh://localhost ``` This commit changes this to: ``` $ nix store info --store "local?root=/tmp/aaa&require-sigs=false" Store URL: local?require-sigs=false&root=/tmp/aaa Version: 2.31.0 Trusted: 1 $ nix store info --store "ssh-ng://localhost?remote-program=nix-daemon" Store URL: ssh-ng://localhost?remote-program=nix-daemon Version: 2.31.0 Trusted: 1 $ nix store info --store "ssh://localhost?remote-program=nix-store" Store URL: ssh://localhost?remote-program=nix-store ```
Mic92
approved these changes
Aug 11, 2025
Member
|
@xokdvium Should we make |
Contributor
Author
Could be made to work, yeah. |
Member
|
can be a bit verbose: Probably more if you put public keys in there.... |
Member
|
I might actually prefer this: Over: |
Member
|
Maybe we can drop arguments and only print the user@host part? |
Contributor
Author
Doing that only for the logs would be good, yeah. Something like |
Member
|
My #13739 should make that easier, since it separates the rending logic from making the URL. |
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
Previously
getUrididn't include store query parameters,ssh-ngdidn't include any information at all and the localstore didn't have the path:
This commit changes this to:
Context
Fixes #11721
Resolves #11873
Best reviewed commit by commit.
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.