From d506bd587aa62dfa9e70f5ba87dd614f7286fe2d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 22 Jan 2020 21:20:01 +0100 Subject: [PATCH 1/2] Fix clang warning --- src/libstore/path.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/path.hh b/src/libstore/path.hh index 6b29c3566..c31ea2179 100644 --- a/src/libstore/path.hh +++ b/src/libstore/path.hh @@ -7,7 +7,7 @@ namespace nix { /* See path.rs. */ struct StorePath; -struct Store; +class Store; extern "C" { void ffi_StorePath_drop(void *); From f8dbde0813c4e8beed6dfd09b093589e027a6675 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 23 Jan 2020 17:38:07 +0100 Subject: [PATCH 2/2] structured-attrs: chown .attrs.* files to builder Otherwise `chmod .`'ing the build directory doesn't work anymore, which is done in nixpkgs if sourceRoot is set to '.'. --- src/libstore/build.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 74a68e1f5..9c6aedfa5 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2579,6 +2579,7 @@ void DerivationGoal::writeStructuredAttrs() } writeFile(tmpDir + "/.attrs.json", rewriteStrings(json.dump(), inputRewrites)); + chownToBuilder(tmpDir + "/.attrs.json"); /* As a convenience to bash scripts, write a shell file that maps all attributes that are representable in bash - @@ -2647,6 +2648,7 @@ void DerivationGoal::writeStructuredAttrs() } writeFile(tmpDir + "/.attrs.sh", rewriteStrings(jsonSh, inputRewrites)); + chownToBuilder(tmpDir + "/.attrs.sh"); }