aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build/local-derivation-goal.cc8
-rw-r--r--src/libstore/meson.build1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 99468d420..7066f5c93 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -1847,8 +1847,12 @@ void LocalDerivationGoal::runChild()
copyFile(path, chrootRootDir + path, { .followSymlinks = true });
}
- if (settings.caFile != "")
- pathsInChroot.try_emplace("/etc/ssl/certs/ca-certificates.crt", settings.caFile, true);
+ if (settings.caFile != "" && pathExists(settings.caFile)) {
+ // For the same reasons as above, copy the CA certificates file too.
+ // It should be even less likely to change during the build than resolv.conf.
+ createDirs(chrootRootDir + "/etc/ssl/certs");
+ copyFile(settings.caFile, chrootRootDir + "/etc/ssl/certs/ca-certificates.crt", { .followSymlinks = true });
+ }
}
for (auto & i : ss) pathsInChroot.emplace(i, i);
diff --git a/src/libstore/meson.build b/src/libstore/meson.build
index f776e9621..65ecacc20 100644
--- a/src/libstore/meson.build
+++ b/src/libstore/meson.build
@@ -220,6 +220,7 @@ libstore = library(
nlohmann_json,
],
cpp_args : cpp_args,
+ cpp_pch : ['../pch/precompiled-headers.hh'],
install : true,
# FIXME(Qyriad): is this right?
install_rpath : libdir,