Gabriella439 / nix-diff

Explain why two Nix derivations differ
BSD 3-Clause "New" or "Revised" License
340 stars 18 forks source link

Strip NIX_REMOTE query part #84

Open roberth opened 4 months ago

roberth commented 4 months ago

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.