Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions pkgs/build-support/replace-vars/replace-vars-with.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,25 @@ let
preferLocalBuild = true;
allowSubstitutes = false;

# Due to NixOS/nix#12361 the placeholder paths of content-addressed derivations
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This meta-issue doesn't actually explain the behavior here described. Is there a more specific issue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen anything that would be more specific than "this output path has a weird format", and this seemed to have been the only issue relating to this in the nix namespace. But probably a moot discussion point anyway, since we ideally want to fix this without disabling the described behavior.

# do not follow the expected format, it lacks the `storeDir` and (more importantly)
# the `name`.
# This breaks assumptions of some downstream users of replaceVars, notably being able
# to filter out patches using their name:
# $ nix build -f. rocmPackages.clang --arg config '{ contentAddressedByDefault = true; }'
# [...]
# > applying patch /nix/store/8va99vng26z2pqlhvsva787rkqnqw8j4-clang-at-least-16-LLVMgold-path.patch
# > patching file lib/Driver/ToolChains/CommonArgs.cpp
# > Hunk #1 succeeded at 775 (offset 186 lines).
# [...]
# > applying patch /nix/store/8va99vng26z2pqlhvsva787rkqnqw8j4-clang-at-least-16-LLVMgold-path.patch
# > patching file lib/Driver/ToolChains/CommonArgs.cpp
# > Reversed (or previously applied) patch detected! Assume -R? [n]
# > Apply anyway? [n]
# > Skipping patch.
# > 1 out of 1 hunk ignored -- saving rejects to file lib/Driver/ToolChains/CommonArgs.cpp.rej
__contentAddressed = false;

buildPhase = ''
runHook preBuild

Expand Down
Loading