diff options
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | src/libstore/download.cc | 2 | ||||
-rw-r--r-- | src/libstore/http-binary-cache-store.cc | 2 | ||||
-rw-r--r-- | src/libutil/archive.cc | 2 | ||||
-rwxr-xr-x | src/nix-build/nix-build.cc | 10 | ||||
-rw-r--r-- | tests/common.sh.in | 2 | ||||
-rw-r--r-- | tests/simple.sh | 2 |
7 files changed, 16 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore index 04dd791964f2..9b4ae6e151cd 100644 --- a/.gitignore +++ b/.gitignore @@ -34,14 +34,7 @@ Makefile.config # /scripts/ /scripts/nix-profile.sh -/scripts/nix-switch -/scripts/nix-collect-garbage -/scripts/nix-prefetch-url /scripts/nix-copy-closure -/scripts/NixConfig.pm -/scripts/NixManifest.pm -/scripts/download-from-binary-cache.pl -/scripts/find-runtime-roots.pl /scripts/build-remote.pl /scripts/nix-reduce-build /scripts/nix-http-export.cgi @@ -58,6 +51,8 @@ Makefile.config /src/libstore/schema.sql.hh /src/libstore/sandbox-defaults.sb +/src/nix/nix + # /src/nix-env/ /src/nix-env/nix-env @@ -67,9 +62,13 @@ Makefile.config # /src/nix-store/ /src/nix-store/nix-store +/src/nix-prefetch-url/nix-prefetch-url + # /src/nix-daemon/ /src/nix-daemon/nix-daemon +/src/nix-collect-garbage/nix-collect-garbage + # /src/nix-channel/ /src/nix-channel/nix-channel diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 97e9b0b2fd66..16a0bec67ea1 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -334,7 +334,7 @@ struct CurlDownloader : public Downloader { std::map<CURL *, std::shared_ptr<DownloadItem>> items; - bool quit; + bool quit = false; std::chrono::steady_clock::time_point nextWakeup; diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index 74ae7a4d198a..9d31f77c921f 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -71,7 +71,7 @@ protected: void getFile(const std::string & path, std::function<void(std::shared_ptr<std::string>)> success, - std::function<void(std::exception_ptr exc)> failure) + std::function<void(std::exception_ptr exc)> failure) override { DownloadRequest request(cacheUri + "/" + path); request.showProgress = DownloadRequest::no; diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index b9b26c5f5f98..fbba7f853f95 100644 --- a/src/libutil/archive.cc +++ b/src/libutil/archive.cc @@ -1,5 +1,3 @@ -#define _XOPEN_SOURCE 600 - #include "config.h" #include <cerrno> diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index b209464b8279..08c6793577a4 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -16,6 +16,8 @@ using namespace nix; +extern char * * environ; + /* Recreate the effect of the perl shellwords function, breaking up a * string into arguments like a shell word, including escapes */ @@ -448,9 +450,10 @@ int main(int argc, char ** argv) ? Strings{"bash", "--rcfile", rcfile} : Strings{"bash", rcfile}; - execvpe(getEnv("NIX_BUILD_SHELL", "bash").c_str(), - stringsToCharPtrs(args).data(), - stringsToCharPtrs(envStrs).data()); + environ = stringsToCharPtrs(envStrs).data(); + + execvp(getEnv("NIX_BUILD_SHELL", "bash").c_str(), + stringsToCharPtrs(args).data()); throw SysError("executing shell"); } @@ -507,4 +510,3 @@ int main(int argc, char ** argv) } }); } - diff --git a/tests/common.sh.in b/tests/common.sh.in index 316d5f6896bb..4565a490adfd 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -2,7 +2,7 @@ set -e datadir="@datadir@" -export TEST_ROOT=${TMPDIR:-/tmp}/nix-test +export TEST_ROOT=$(realpath ${TMPDIR:-/tmp}/nix-test) export NIX_STORE_DIR if ! NIX_STORE_DIR=$(readlink -f $TEST_ROOT/store 2> /dev/null); then # Maybe the build directory is symlinked. diff --git a/tests/simple.sh b/tests/simple.sh index 8f9d782a6c81..37631b648c67 100644 --- a/tests/simple.sh +++ b/tests/simple.sh @@ -18,7 +18,7 @@ if test "$text" != "Hello World!"; then exit 1; fi nix-store --delete $outPath if test -e $outPath/hello; then false; fi -outPath="$(NIX_REMOTE=local?store=/foo\&real=$TMPDIR/real-store nix-instantiate --readonly-mode hash-check.nix)" +outPath="$(NIX_REMOTE=local?store=/foo\&real=$TEST_ROOT/real-store nix-instantiate --readonly-mode hash-check.nix)" if test "$outPath" != "/foo/lfy1s6ca46rm5r6w4gg9hc0axiakjcnm-dependencies.drv"; then echo "hashDerivationModulo appears broken, got $outPath" exit 1 |