aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-04Turn mkString(Symbol) into a methodEelco Dolstra
2022-01-04Remove non-method mkPath()Eelco Dolstra
2022-01-04Remove non-method mk<X> functionsEelco Dolstra
2022-01-04Remove non-method mkString()Eelco Dolstra
2022-01-04Ensure that attrsets are sortedEelco Dolstra
Previously you had to remember to call value->attrs->sort() after populating value->attrs. Now there is a BindingsBuilder helper that wraps Bindings and ensures that sort() is called before you can use it.
2022-01-04Merge pull request #5830 from pennae/zipAttrsWithEelco Dolstra
add zipAttrsWith primop
2022-01-03add zipAttrsWith primoppennae
nixpkgs can save a good bit of eval memory with this primop. zipAttrsWith is used quite a bit around nixpkgs (eg in the form of recursiveUpdate), but the most costly application for this primop is in the module system. it improves the implementation of zipAttrsWith from nixpkgs by not checking an attribute multiple times if it occurs more than once in the input list, allocates less values and set elements, and just avoids many a temporary object in general. nixpkgs has a more generic version of this operation, zipAttrsWithNames, but this version is only used once so isn't suitable for being the base of a new primop. if it were to be used more we should add a second primop instead.
2022-01-03Merge pull request #5839 from tweag/balsoft/yet-another-follows-bugfixEelco Dolstra
flake.cc: computeLocks: Only verify overrides when they could change
2022-01-03Merge pull request #5840 from tweag/balsoft/nix-repl-show-traceEelco Dolstra
nix repl: fix --show-trace and add the ability to set trace display
2022-01-03Merge pull request #5844 from Kha/fix-ifd-chroot-once-moreEelco Dolstra
Fix IFD with chroot store
2022-01-03Merge pull request #5852 from autc04/docker-tmp-permissionsEelco Dolstra
docker.nix: set correct permissions on /tmp (fix #5851)
2022-01-01docker.nix: set correct permissions on /tmpWolfgang Thaller
2021-12-29Fix IFD with chroot storeSebastian Ullrich
2021-12-29Add ability to toggle show-trace from within the replAlexander Bantyev
2021-12-29Merge pull request #5841 from lilyinstarlight/fix-fromtoml-attrsEelco Dolstra
Sort attrs from tables in fromTOML
2021-12-28Sort attrs from tables in fromTOMLLily Foster
This was dropped in 10a8b5d for the migration from cpptoml to toml11 but seems to be necessary for the attrsets to work correctly. Fixes #5833
2021-12-28Add a test that nix repl --show-trace actually shows the traceAlexander Bantyev
2021-12-28BaseError::calcWhat: take loggerSettings.showTrace into accountAlexander Bantyev
Text representation for errors should include the trace if --show-trace is passed.
2021-12-28flake.cc: computeLocks: Only verify overrides when they could changeAlexander Bantyev
When we check for disappeared overrides, we can get "false positives" for follows and overrides which are defined in the dependencies of the flake we are locking, since they are not parsed by parseFlakeInputs. However, at that point we already know that the overrides couldn't have possible been changed if the input itself hasn't changed (since we check that oldLock->originalRef == *input.ref for the input's parent). So, to prevent this, only perform this check when it was possible that the flake changed (e.g. the flake we're locking, or a new input, or the input has changed and mustRefetch == true).
2021-12-27Merge pull request #5835 from yorickvP/fast-repl-loadEelco Dolstra
Fix accidental O(n^2 * log n) performance in NixRepl::addAttrsToScope
2021-12-27Fix accidental O(n^2 * log n) performance in NixRepl::addAttrsToScopeYorick van Pelt
Only sort once, after adding all of the attrs first. This reduces my `nix repl '<nixpkgs>'` loading time from 1.07s to 103ms. Fixes #5823
2021-12-23Merge branch 'nm-int64' of https://github.com/nmattia/nixEelco Dolstra
2021-12-23Use int64_t and NixFloat in fromTOML typesNicolas Mattia
This makes sure that values parsed from TOML have a proper size. Using e.g. `double` caused issues on i686 where the size of `double` (32bit) was too small to accommodate some values.
2021-12-23Merge pull request #5826 from NixOS/fixup-5807Eelco Dolstra
Properly return false on `builtins.pathExists /someNonAllowedPath`
2021-12-23Properly return false on `builtins.pathExists /someNonAllowedPath`regnat
Follow-up from https://github.com/NixOS/nix/pull/5807 to fix https://github.com/NixOS/nix/pull/5807#issuecomment-1000135394
2021-12-22Merge pull request #5821 from edolstra/remove-affinityEelco Dolstra
Remove CPU locking
2021-12-22Merge pull request #5820 from ncfavier/completion-nospaceEelco Dolstra
Don't insert spaces when completing attribute paths
2021-12-22Fix attr path completion after a dotNaïm Favier
2021-12-22Don't insert spaces when completing attribute pathsNaïm Favier
2021-12-22Remove CPU lockingEelco Dolstra
This was already accidentally disabled in ba87b08. It also no longer appears to be beneficial, and in fact slow things down, e.g. when evaluating a NixOS system configuration: elapsed time: median = 3.8170 mean = 3.8202 stddev = 0.0195 min = 3.7894 max = 3.8600 [rejected, p=0.00000, Δ=0.36929±0.02513]
2021-12-22Merge pull request #5819 from edolstra/devshell-completionEelco Dolstra
Make bash completion for 'nix' work in a devshell
2021-12-22Make bash completion work when nix is invoked as ~/.../nixEelco Dolstra
2021-12-22Make bash completion for 'nix' work in a devshellEelco Dolstra
2021-12-21Merge pull request #5814 from NixOS/docker-ssl-certs-in-etcEelco Dolstra
Add cacert to /etc/ssl/certs in the docker image
2021-12-21Add cacert to /etc/ssl/certs in the docker imageRok Garbas
Fixes #5797
2021-12-21Merge pull request #5807 from NixOS/5805-ca-ifdEelco Dolstra
Fix IFD with CA derivations
2021-12-21Update release notesEelco Dolstra
2021-12-21Merge branch 'nm-toml11' of https://github.com/nmattia/nixEelco Dolstra
2021-12-21Merge branch 'why-depends-completion' of https://github.com/ncfavier/nixEelco Dolstra
2021-12-21Fix IFD with CA derivationsregnat
Rewrite the string taken by the IFD-like primops to contain the actual output paths of the derivations rather than the placeholders Fix #5805
2021-12-21Factor out the path realisation bit of IFDregnat
2021-12-21Merge pull request #5809 from pennae/small-perf-improvementsThéophane Hufschmitt
small perf improvements
2021-12-20bulk-allocate Value instances in the evaluatorpennae
calling GC_malloc for each value is significantly more expensive than allocating a bunch of values at once with GC_malloc_many. "a bunch" here is a GC block size, ie 16KiB or less. this gives a 1.5% performance boost when evaluating our nixos system. tested with nix eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system' # on master Time (mean ± σ): 3.335 s ± 0.007 s [User: 2.774 s, System: 0.293 s] Range (min … max): 3.315 s … 3.347 s 50 runs # with this change Time (mean ± σ): 3.288 s ± 0.006 s [User: 2.728 s, System: 0.292 s] Range (min … max): 3.274 s … 3.307 s 50 runs
2021-12-20Clean up toml parsing codeNicolas Mattia
2021-12-20Add shell completion for why-dependsNaïm Favier
Fixes #5806
2021-12-17Use long in fromTOMLNicolas Mattia
2021-12-17Update primops/fromTOML.cc to use toml11Nicolas Mattia
2021-12-17Replace cpptoml with toml11Nicolas Mattia
2021-12-17Merge pull request #5787 from edolstra/unshare-fsEelco Dolstra
Ignore EPERM when unsharing FS state
2021-12-17Merge pull request #5047 from symphorien/fix-nix-channelThéophane Hufschmitt
nix-channel: use nix-env -i --remove-all to upgrade