1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

Merge pull request #12452 from NixOS/mergify/bp/2.25-maintenance/pr-12448

copyPathToStore(): Preserve symlinks (backport #12448)
This commit is contained in:
mergify[bot] 2025-02-12 20:00:54 +00:00 committed by GitHub
commit d652513e45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -2365,7 +2365,7 @@ StorePath EvalState::copyPathToStore(NixStringContext & context, const SourcePat
: [&]() { : [&]() {
auto dstPath = fetchToStore( auto dstPath = fetchToStore(
*store, *store,
path.resolveSymlinks(), path.resolveSymlinks(SymlinkResolution::Ancestors),
settings.readOnlyMode ? FetchMode::DryRun : FetchMode::Copy, settings.readOnlyMode ? FetchMode::DryRun : FetchMode::Copy,
path.baseName(), path.baseName(),
ContentAddressMethod::Raw::NixArchive, ContentAddressMethod::Raw::NixArchive,

View file

@ -15,7 +15,7 @@ echo "output path is $outPath"
[[ ! -w $outPath ]] [[ ! -w $outPath ]]
text=$(cat "$outPath/hello") text=$(cat "$outPath/hello")
if test "$text" != "Hello World!"; then exit 1; fi [[ "$text" = "Hello World!" ]]
TODO_NixOS TODO_NixOS