aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-12-02Introduce builtins.groupBy primopSilvan Mosberger
This function is very useful in nixpkgs, but its implementation in Nix itself is rather slow due to it requiring a lot of attribute set and list appends.
2021-12-02Merge pull request #5713 from tweag/balsoft/another-follows-bugfixEelco Dolstra
Flakes: computeLocks: pass correct LockParent when reusing oldLock
2021-12-02Merge pull request #5708 from trofi/fix-build-on-gcc-11Eelco Dolstra
src/libutil/util.hh: fix build on gcc-11
2021-12-02Flakes: computeLocks: pass correct LockParent when reusing oldLockAlexander Bantyev
Previously, when we were attempting to reuse the old lockfile information in the computeLocks function, we have passed the parent of the current input to the next computeLocks call. This was incorrect, since the follows are resolved relative to the parent. This caused issues when we tried to reuse oldLock but couldn't for some reason (read: mustRefetch is true), in that case the follows were resolved incorrectly. Fix this by passing the correct parent, and adding some tests to prevent this particular regression from happening again. Closes https://github.com/NixOS/nix/issues/5697
2021-12-01Fix parent path check boundaryDavid Arnold
- Previous to this commit the boundary was exclusive of the top level flake. - This is wrong since the top level flake is still a valid relative reference. - Now, the check boundary is inclusive of the top level flake. Signed-off-by: Timothy DeHerrera <tim.deh@pm.me>
2021-12-01src/libutil/util.hh: fix build on gcc-11Sergei Trofimovich
Due to missing <atomic> declaration the build fails as: src/libutil/util.hh:350:24: error: no match for 'operator||' (operand types are 'std::atomic<bool>' and 'bool') 350 | if (_isInterrupted || (interruptCheck && interruptCheck())) | ~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | std::atomic<bool> bool
2021-12-01Merge branch 'nix-env-install-suggestions' of https://github.com/tweag/nixEelco Dolstra
2021-12-01Merge pull request #5696 from obsidiansystems/fix-5299Eelco Dolstra
Fix #5299 and remove uncesssary unbounded buffer
2021-12-01Merge pull request #5599 from fzakaria/faridzakaria/fix-progress-bar-leakThéophane Hufschmitt
Fix heap use after free in progress-bar.cc
2021-11-30Fix #5299John Ericson
No matter what, we need to resize the buffer to not have any scratch space after we do the `read`. In the end of file case, `got` will be 0 from it's initial value. Before, we forgot to resize in the EOF case with the break. Yes, we know we didn't recieve any data in that case, but we still have the scatch space to undo. Co-Authored-By: Will Fancher <Will.Fancher@Obsidian.Systems>
2021-11-30Push wopAddToStore old style stream adapters into smaller scopesJohn Ericson
This doesn't fix the bug, but makes the code less difficult to read. Also improve the comments, now that it is clear what part is needed in each code path.
2021-11-30Nix daemon stream old wopAddToStoreJohn Ericson
No more buffering in string.
2021-11-29createTempFile(): Mark file as CLOEEXECEelco Dolstra
Fixes #5674.
2021-11-29Merge pull request #5680 from andir/libexpr-dont-move-primop-argsEelco Dolstra
Don't move the arguments of the primOp
2021-11-29Merge pull request #5667 from NixOS/5661-dont-complete-flakes-without-xp-featureEelco Dolstra
Don’t try to complete flakes is the feature isn’t enabled
2021-11-28Don't move the arguments of the primOpAndreas Rammhold
Moving arguments of the primOp into the registration structure makes it impossible to initialize a second EvalState with the correct primOp registration. It will end up registering all those "RegisterPrimOp"'s with an arity of zero on all but the 2nd instance of the EvalState. Not moving the memory will add a tiny bit of memory overhead during the eval since we need a copy of all the argument lists of all the primOp's. The overhead shouldn't be too bad as it is static (based on the amonut of registered operations) and only occurs once during the interpreter startup.
2021-11-27Fix typoAleksey Kladov
2021-11-26Don’t try to complete flakes is the feature isn’t enabledregnat
Fix #5661
2021-11-26nix repl: Reset the terminal on exceptional exitsEelco Dolstra
2021-11-26Merge pull request #5662 from NixOS/5259-nix-shell-with-ca-bashEelco Dolstra
Make `nix-shell` work when nixpkgs is content-addressed
2021-11-26Catch flake-related exception type in REPLAlex Shabalin
Closes https://github.com/NixOS/nix/issues/5656
2021-11-26Make `nix-shell` work when nixpkgs is content-addressedregnat
Fix #5259
2021-11-25Merge pull request #5384 from baloo/baloo/dns-timeoutEelco Dolstra
preloadNSS / dns timeout
2021-11-25Merge pull request #5603 from obsidiansystems/recursive-nix-system-featureEelco Dolstra
"recursive-nix" system feature only with experimental feature
2021-11-25Merge pull request #5648 from edolstra/list-iterEelco Dolstra
Support range-based for loop over list values
2021-11-25Support range-based for loop over list valuesEelco Dolstra
2021-11-25Fix the error when accessing a forbidden path in pure evalregnat
If we’re in pure eval mode, then tell that in the error message rather than (wrongly) speaking about restricted mode. Fix https://github.com/NixOS/nix/issues/5611
2021-11-25Merge pull request #5644 from tweag/fix-interrupted-data-raceEelco Dolstra
Fix a minor data race with _isInterrupted
2021-11-24Merge pull request #5631 from Infinisil/list-compareEelco Dolstra
Make lists be comparable
2021-11-24Fix a minor data race with _isInterruptedAlex Shabalin
2021-11-24nix flake check: Fix markdownEelco Dolstra
2021-11-24Make lists be comparableSilvan Mosberger
Makes lists comparable using lexicographic comparison. Increments builtins.langVersion in order for this change to be detectable
2021-11-23"recursive-nix" system feature only with experimental featureJohn Ericson
2021-11-23Fix heap use after free in progress-bar.ccFarid Zakaria
Fix some heap-use-after-free in progress-bar.cc These are somewhat tricky failures here due to temporary variable creation and string_view
2021-11-23Fix use after free in content-address.ccAlex Shabalin
Inspired by https://github.com/NixOS/nix/pull/5599
2021-11-23Merge pull request #5628 from matthewbauer/rosetta2-new-pathEelco Dolstra
Set new rosetta 2 path in sandbox
2021-11-22Set new rosetta 2 path in sandboxMatthew Bauer
see: https://github.com/NixOS/nix/pull/5388 and https://github.com/NixOS/nix/pull/5251
2021-11-22Merge pull request #5624 from rofrol/typo-single-quoteEelco Dolstra
Typo: change to normal single quote
2021-11-22Merge pull request #5613 from tomberek/allow_realpathEelco Dolstra
add real path to allowedPaths
2021-11-22Merge pull request #5620 from alyssais/waylandEelco Dolstra
nix-shell --pure: let variables for Wayland through
2021-11-22Unify #if linuxAlex Shabalin
2021-11-22Typo: change to normal singlequoteRoman Frołow
2021-11-21nix-shell --pure: let variables for Wayland throughAlyssa Ross
We let DISPLAY (X11) through, so we should let the Wayland equivalents through as well. Similarly, we let HOME through, so it should be okay to allow XDG_RUNTIME_DIR (which is needed for connecting to Wayland with WAYLAND_DISPLAY) through as well. Otherwise graphical applications will either fall back to X11 (if they support it), or just not work (if they don't).
2021-11-20add real path to allowedPathsTom Bereknyei
2021-11-19Use warn to print a warningAlex Shabalin
2021-11-19Fix build warnings on MacOSAlex Shabalin
2021-11-18Offer suggestions for nix-env -iAlex Shabalin
Closes https://github.com/NixOS/nix/issues/972
2021-11-18Merge branch 'accept_conf' of https://github.com/tomberek/nixEelco Dolstra
2021-11-18Merge pull request #5580 from ksonj/fix/non-standard-sshEelco Dolstra
Fix detection of scp-style URIs to support non-standard SSH ports
2021-11-18SimplifyEelco Dolstra