mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 05:26:02 +01:00
copyPathToStore(): Preserve symlinks
E.g. in a derivation attribute `foo = ./bar`, if ./bar is a symlink,
we should copy the symlink to the store, not its target. This restores
the behaviour of Nix <= 2.19.
(cherry picked from commit 26b87e78b5)
This commit is contained in:
parent
4c3786dd40
commit
83306bb841
4 changed files with 19 additions and 2 deletions
|
|
@ -2384,7 +2384,7 @@ StorePath EvalState::copyPathToStore(NixStringContext & context, const SourcePat
|
|||
: [&]() {
|
||||
auto dstPath = fetchToStore(
|
||||
*store,
|
||||
path.resolveSymlinks(),
|
||||
path.resolveSymlinks(SymlinkResolution::Ancestors),
|
||||
settings.readOnlyMode ? FetchMode::DryRun : FetchMode::Copy,
|
||||
path.baseName(),
|
||||
ContentAddressMethod::Raw::NixArchive,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue