aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-12-21Disable use-sqlite-wal under WSLBrian McKenna
Before: $ nix-channel --update unpacking channels... warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) warning: SQLite database '/nix/var/nix/db/db.sqlite' is busy (SQLITE_PROTOCOL) After: $ inst/bin/nix-channel --update unpacking channels... created 1 symlinks in user environment I've seen complaints that "sandbox" caused problems under WSL but I'm having no problems. I think recent changes could have fixed the issue.
2019-12-19tarfile.cc: Restore timestampsEelco Dolstra
This is needed to get the lastModified attribute of GitHub flakes.
2019-12-19tarfile.cc: Don't change the cwdEelco Dolstra
Nix is multithreaded so it's not safe to change the cwd.
2019-12-19tarfile.cc: Style fixesEelco Dolstra
2019-12-19Merge branch 'libarchive' of https://github.com/yorickvP/nixEelco Dolstra
2019-12-18nix make-content-addressable: Add --json flagEelco Dolstra
Fixes #3274.
2019-12-17Add priority setting to storesEelco Dolstra
This allows overriding the priority of substituters, e.g. $ nix-store --store ~/my-nix/ -r /nix/store/df3m4da96d84ljzxx4mygfshm1p0r2n3-geeqie-1.4 \ --substituters 'http://cache.nixos.org?priority=100 daemon?priority=10' Fixes #3264.
2019-12-16nix-store -r: Handle symlinks to store pathsEelco Dolstra
Fixes #3270.
2019-12-15Tweak error messageEelco Dolstra
2019-12-15Merge branch 'limit_depth_resolveExprPath' of https://github.com/d-goldin/nixEelco Dolstra
2019-12-14Merge pull request #3269 from xzfc/nix-shellEelco Dolstra
nix-shell: don't check for "nix-shell" in shebang script name
2019-12-14Fix progress barEelco Dolstra
2019-12-14nix-shell: don't check for "nix-shell" in shebang script nameAlbert Safin
2019-12-13Move some codeEelco Dolstra
2019-12-13Don't leak exceptionsEelco Dolstra
2019-12-13Improve gzip error messageEelco Dolstra
2019-12-13Get rid of CBoxEelco Dolstra
2019-12-13bugfix: Adding depth limit to resolveExprPathDima
There is no termination condition for evaluation of cyclical expression paths which can lead to infinite loops. This addresses one spot in the parser in a similar fashion as utils.cc/canonPath does. This issue can be reproduced by something like: ``` ln -s a b ln -s b a nix-instantiate -E 'import ./a' ```
2019-12-13Only install *.sb files on macOSEelco Dolstra
2019-12-13Remove FIXMEEelco Dolstra
2019-12-13SimplifyEelco Dolstra
2019-12-13Merge branch 'libstore-ssh-better-exec-error-message' of ↵Eelco Dolstra
https://github.com/Profpatsch/nix
2019-12-13Initial gzip supportTom Bereknyei
Closes #3256
2019-12-12libstore/ssh: Improve error message on failing `execvp`Profpatsch
If the `throw` is reached, this means that execvp into `ssh` wasn’t successful. We can hint at a usual problem, which is a missing `ssh` executable. Test with: ``` env PATH= ./result/bin/nix-copy-closure --builders '' unusedhost ``` and the bash version with ``` env PATH= ./result/bin/nix-copy-closure --builders '' localhost ```
2019-12-10Make the Store API more type-safeEelco Dolstra
Most functions now take a StorePath argument rather than a Path (which is just an alias for std::string). The StorePath constructor ensures that the path is syntactically correct (i.e. it looks like <store-dir>/<base32-hash>-<name>). Similarly, functions like buildPaths() now take a StorePathWithOutputs, rather than abusing Path by adding a '!<outputs>' suffix. Note that the StorePath type is implemented in Rust. This involves some hackery to allow Rust values to be used directly in C++, via a helper type whose destructor calls the Rust type's drop() function. The main issue is the dynamic nature of C++ move semantics: after we have moved a Rust value, we should not call the drop function on the original value. So when we move a value, we set the original value to bitwise zero, and the destructor only calls drop() if the value is not bitwise zero. This should be sufficient for most types. Also lots of minor cleanups to the C++ API to make it more modern (e.g. using std::optional and std::string_view in some places).
2019-12-10EvalState::callFunction(): Make FunctionCallTrace use less stack spaceEelco Dolstra
The FunctionCallTrace object consumes a few hundred bytes of stack space, even when tracing is disabled. This was causing stack overflows: $ nix-instantiate '<nixpkgs> -A texlive.combined.scheme-full --dry-run error: stack overflow (possible infinite recursion) This is with the default stack size of 8 MiB. Putting the object on the heap reduces stack usage to < 5 MiB.
2019-12-09Remove UserLock self-lock checkEelco Dolstra
This is no longer needed since we're not using POSIX locks anymore.
2019-12-09further clean up libarchive codeYorick van Pelt
2019-12-07Clean up libarchive supportPuck Meerburg
2019-12-07remove rust unpack_tarfile ffiYorick van Pelt
2019-12-07code 'cleanup'Yorick van Pelt
2019-12-07add wrapper function around libarchive to c++ errorsYorick van Pelt
2019-12-07fixup! libarchive proof of conceptYorick van Pelt
2019-12-07libarchive proof of conceptYorick van Pelt
2019-12-05Shut up clang warningEelco Dolstra
(cherry picked from commit 3392f1b77869269580b58e4931b7a79f44799ce0)
2019-12-05nix doctor: Fix typoEelco Dolstra
(cherry picked from commit 96c6b08ed7f99be84cb1816515a368392d19dbb5)
2019-12-05Show hash mismatch warnings in SRI formatEelco Dolstra
(cherry picked from commit 63c5c91cc053cbc1fcb8d3fe71c41142c9f51bfa)
2019-12-05Move #includeEelco Dolstra
(cherry picked from commit 8beedd44861d1fe7208609ee8d231ca1c02dedf6)
2019-12-05Bindings: Add convenience method for requiring an attributeEelco Dolstra
(cherry picked from commit fb692e5f7b34def8cf590298036ab63e40747062)
2019-12-05Bindings::get(): Add convenience methodEelco Dolstra
This allows writing attribute lookups as if (auto name = value.attrs->get(state.sName)) ... (cherry picked from commit f216c76c56cdffb5214d074a7d44812843dd174f)
2019-12-05Initialize Command::_nameEelco Dolstra
(cherry picked from commit d0a769cb061a13ad880c76e5ea69a76150439853)
2019-12-05Make subcommand construction in MultiCommand lazyEelco Dolstra
(cherry picked from commit a0de58f471c9087d8e6cc60a6078f9940a125b15)
2019-12-05Move Command and MultiCommand to libutilEelco Dolstra
(cherry picked from commit f70434b1fbbdb0e188718f0c55a8156a7aa08744)
2019-12-05MultiCommand: Simplify constructionEelco Dolstra
(cherry picked from commit 15a16e5c05d547ec07170df2392263e5e891447b)
2019-12-05Eliminate more pass-by-value in variadic callsEelco Dolstra
2019-12-05Revert "Make fmt() non-recursive"Eelco Dolstra
This reverts commit 2b761d5f50b7dc17dc55c31980c2253c37b3c920. Also *really* make fmt() take arguments by reference.
2019-12-05fmt(): Pass arguments by reference rather than by valueEelco Dolstra
2019-12-02Merge remote-tracking branch 'origin/recursive-nix'Eelco Dolstra
2019-11-30Fix typosBrian Wignall
2019-11-29Merge pull request #2748 from edolstra/rustEelco Dolstra
Make nix/unpack-channel.nix a builtin builder