NIX_REMOTE has a URL-like format, so we need to strip the query part.
The exact details remain to be specified; see https://github.com/NixOS/nix/issues/10582, but this PR aligns with the current Nix behavior, and paths that need (un)escaping can be expected to be rare.
What this enables in practice, is to generate a store as part of a build, and then use both nix and nix-diff in a shell session with
NIX_REMOTE=/nix/store/<hash>-foo/store?read-only=true to analyze the result.
NIX_REMOTE
has a URL-like format, so we need to strip the query part. The exact details remain to be specified; see https://github.com/NixOS/nix/issues/10582, but this PR aligns with the current Nix behavior, and paths that need (un)escaping can be expected to be rare.What this enables in practice, is to generate a store as part of a build, and then use both
nix
andnix-diff
in a shell session withNIX_REMOTE=/nix/store/<hash>-foo/store?read-only=true
to analyze the result.