aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-10-17Add error reporting to machine spec paserAlexey Novikov
Currently machine specification (`/etc/nix/machine`) parser fails with a vague exception if the file had incorrect format. This commit adds verbose exceptions and unit-tests for the parser.
2021-10-17Fix error detection in 'base64Decode()'Alexey Novikov
Fixed a bug in initialization of 'base64DecodeChars' variable. Currently decoder do not fail on invalid Base64 strings. Added test-case to verify the fix. Also have made 'base64DecodeChars' to be computed at compile time. And added a test case to encode/decode string with non-printable charactes.
2021-10-15Merge pull request #5383 from kvtb/patch-7Eelco Dolstra
fix build with gcc11
2021-10-15Merge pull request #5388 from yvt/fix-oahd-pathEelco Dolstra
Add another path where a Rosetta 2 daemon plist file is possibly located
2021-10-14add pos to EvalState::forceValueKevin Amado
- This way we improve error messages on infinite recursion - Demo: ```nix let x = builtins.fetchMercurial x; in x ``` - Before: ```bash $ nix-instantiate --show-trace --strict error: infinite recursion encountered ``` - After: ```bash nix-instantiate --show-trace --strict error: infinite recursion encountered at /data/github/kamadorueda/test/default.nix:2:7: 1| let 2| x = builtins.fetchMercurial x; | ^ 3| in ``` Mentions: #3505
2021-10-15Add another path where a Rosetta 2 configuration file is possibly locatedyvt
2021-10-13fix build with gcc11kvtb
2021-10-13Merge pull request #5362 from Artturin/nixunpackEelco Dolstra
nix develop: add --unpack
2021-10-13Style tweaksEelco Dolstra
2021-10-13Merge branch 'feature/comp-level' of https://github.com/tomberek/nixEelco Dolstra
2021-10-12Merge pull request #5375 from edolstra/repl-ctrl-cEelco Dolstra
nix repl: Fix plugin-files warning
2021-10-12CleanupEelco Dolstra
2021-10-12Merge branch 'nix-repl-download-interruption' of https://github.com/Ma27/nixEelco Dolstra
2021-10-12nix repl: Don't write to std::cout directlyEelco Dolstra
Writing to std::cout doesn't play nice with ProgressBar.
2021-10-12nix repl: Don't build in a child processEelco Dolstra
Fixes #5356. This is a bit risky due to interrupts, but we have to deal with those anyway (#5353).
2021-10-12Add compression level for NARsTom Bereknyei
Based off on @dtzWill's #2276
2021-10-11(partially) Revert "Don't copy in rethrow"regnat
This reverts some parts of commit 8430a8f0866e4463a891ccce62779ea9ac0f3b38 which was trying to rethrow some exceptions while we weren’t in the context of a `catch` block, causing some weird “terminate called without an active exception” errors. Fix #5368
2021-10-09nix develop: add --unpackArtturin
2021-10-08libstore-tests: add libutil dependency (fix static link failure)Sergei Trofimovich
In https://github.com/NixOS/nix/pull/5350 we noticed link failures pkgsStatic.nixUnstable. Adding explicit dependency on libutil fixes libstore-tests linking.
2021-10-07nix repl: properly deal with interruptionsMaximilian Bosch
When I stop a download with Ctrl-C in a `nix repl` of a flake, the REPL refuses to do any other downloads: nix-repl> builtins.getFlake "nix-serve" [0.0 MiB DL] downloading 'https://api.github.com/repos/edolstra/nix-serve/tarball/e9828a9e01a14297d15ca41 error: download of 'https://api.github.com/repos/edolstra/nix-serve/tarball/e9828a9e01a14297d15ca416e5a9415d4972b0f0' was interrupted [0.0 MiB DL] nix-repl> builtins.getFlake "nix-serve" error: interrupted by the user [0.0 MiB DL] To fix this issue, two changes were necessary: * Reset the global `_isInterrupted` variable: only because a single operation was aborted, it should still be possible to continue the session. * Recreate a `fileTransfer`-instance if the current one was shut down by an abort.
2021-10-07Make builtins.{path,filterSource} work with chroot storesEelco Dolstra
2021-10-07Add a trace to all errors in addPath()Eelco Dolstra
2021-10-07Allow builtins.{path,filterSource} on paths with a contextEelco Dolstra
We now build the context (so this has the side-effect of making builtins.{path,filterSource} work on derivations outputs, if IFD is enabled) and then check that the path has no references (which is what we really care about).
2021-10-07TypoEelco Dolstra
2021-10-07Remove unnecessary call to queryMissing()Eelco Dolstra
Worker::run() already does this.
2021-10-07Allow access to path copied to the storeEelco Dolstra
Fixes https://github.com/NixOS/nix/pull/5163#issuecomment-931733912.
2021-10-07Refactoring: Add allowPath() methodEelco Dolstra
2021-10-07Merge pull request #5341 from andir/libexpr-formalsEelco Dolstra
libexpr: remove matchAttrs boolean from ExprLambda
2021-10-06Merge pull request #5286 from ilkecan/add-a-warning-to-filterSourceEelco Dolstra
Warn about the usage of filterSource with Nix store paths
2021-10-06Add a warning to `filterSource`ilkecan
Warn about the usage of `filterSource` with Nix store paths
2021-10-06Remove no-op call to realiseContext()Eelco Dolstra
2021-10-06Merge branch 'flakes_filterSource' of https://github.com/tomberek/nixEelco Dolstra
2021-10-06fetchTree(): Parse type attribute firstEelco Dolstra
The 'url' attribute depends on whether type == 'git', so this is needed for builtins.fetchTree {url = "git@github.com:NixOS/nix.git"; type = "git";}
2021-10-06CleanupEelco Dolstra
2021-10-06libexpr: remove matchAttrs boolean from ExprLambdaAndreas Rammhold
The boolean is only used to determine if the formals are set to a non-null pointer in all our cases. We can get rid of that allocation and instead just compare the pointer value with NULL. Saving up to sizeof(bool) + platform specific alignment per ExprLambda instace. Probably not a lot of memory but perhaps a few kilobyte with nixpkgs? This also gets rid of a potential issue with dereferencing formals based on the value of the boolean that didn't have to be aligned with the formals pointer but was in all our cases.
2021-10-06Merge branch 'considerate/scp-like-urls' of https://github.com/considerate/nixEelco Dolstra
2021-10-06Don't reset the logger in a vforkEelco Dolstra
9c766a40cbbd3a350a9582d0fd8201e3361a63b2 broke logging from the daemon, because commonChildInit is called when starting the build hook in a vfork, so it ends up resetting the parent's logger. So don't vfork. It might be best to get rid of vfork altogether, but that may cause problems, e.g. when we call an external program like git from the evaluator.
2021-10-06Remove links to .md files in help outputEelco Dolstra
Fixes #5337.
2021-10-05Merge pull request #5335 from edolstra/socket-pathsEelco Dolstra
Support arbitrary-length socket paths
2021-10-05Don't ignore SIGCHLD in createUnixDomainSocket()Eelco Dolstra
2021-10-05Show failing PIDEelco Dolstra
2021-10-05TypoEelco Dolstra
2021-10-05Add FIXME about ptsnameEelco Dolstra
2021-10-05Connect/bind Unix domain sockets in a child processEelco Dolstra
In the child process, we can do a chdir() and avoid the problem of the path not fitting into sockaddr_un.
2021-10-04Add a test for RefScanSink and clean up the codeEelco Dolstra
Issue #5322.
2021-10-04scanForReferences(): Use a StorePathSetEelco Dolstra
2021-10-03Merge pull request #5310 from trofi/drop-spammy-rewriteEelco Dolstra
local-derivation-goal.cc: drop spammy "warning: rewriting hashes in..…
2021-10-02fix creation of NAR files >4GB on 32-bit platformskvtb
`size_t` is 32-bit on 32-bit platforms, while the file size can be bigger
2021-10-02Fix typoAleksey Kladov
2021-10-01local-derivation-goal.cc: downgrade "warning: rewriting hashes in..." down ↵Sergei Trofimovich
to debug Before the changes when building the whole system with `contentAddressedByDefault = true;` we get many noninformative messages: $ nix build -f nixos system --keep-going ... warning: rewriting hashes in '/nix/store/...-clang-11.1.0.drv.chroot/nix/store/...-11.1.0'; cross fingers warning: rewriting hashes in '/nix/store/...-clang-11.1.0.drv.chroot/nix/store/...-11.1.0-dev'; cross fingers warning: rewriting hashes in '/nix/store/...-clang-11.1.0.drv.chroot/nix/store/...-11.1.0-python'; cross fingers error: 2 dependencies of derivation '/nix/store/...-hub-2.14.2.drv' failed to build warning: rewriting hashes in '/nix/store/...-subversion-1.14.1.drv.chroot/nix/store/...-subversion-1.14.1-dev'; cross fingers warning: rewriting hashes in '/nix/store/...-subversion-1.14.1.drv.chroot/nix/store/...-subversion-1.14.1-man'; cross fingers ... Let's downgrade these messages down to debug().