aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-11-15Merge branch 'master' of github.com:NixOS/nixEelco Dolstra
2021-11-15Simplify lockFlake() a bitEelco Dolstra
2021-11-15Merge branch 'balsoft/fix-subinputs-not-getting-updated' of ↵Eelco Dolstra
https://github.com/tweag/nix
2021-11-15Merge pull request #5428 from kreisys/add-pos-to-json-type-errorDomen Kožar
toJSON: report error position for fancier output
2021-11-13toXML: display errors positionKevin Amado
- This change applies to builtins.toXML and inner workings - Proof of concept: ```nix let e = builtins.toXML e; in e ``` - Before: ``` $ nix-instantiate --eval poc.nix error: infinite recursion encountered ``` - After: ``` $ nix-instantiate --eval poc.nix error: infinite recursion encountered at /data/github/kamadorueda/nix/poc.nix:1:9: 1| let e = builtins.toXML e; in e | ```
2021-11-12TypoEelco Dolstra
2021-11-12Merge pull request #5540 from samueldr/fix/key-subcommandEelco Dolstra
nix key: Fix error message and don't require flakes
2021-11-12nix registry: Mark experimentalSamuel Dionne-Riel
This is part of the flakes feature. Mark it as such.
2021-11-11nix key: Fix error message and don't require flakesSamuel Dionne-Riel
2021-11-11Flakes: refetch the input when a follows disappearsAlexander Bantyev
When an input follows disappears, we can't just reuse the old lock file entries since we may be missing some required ones. Refetch the input when this happens. Closes https://github.com/NixOS/nix/issues/5289
2021-11-10Merge pull request #5528 from matthewbauer/recognize-nixosModuleEelco Dolstra
Recognize singular "nixosModule" in nix flake show
2021-11-09Recognize singular "nixosModule" in nix flake showMatthew Bauer
This makes nixosModule appears as a "NixOS Module" like nixosModules does.
2021-11-09Merge pull request #5494 from tweag/balsoft/allow-references-in-addPathEelco Dolstra
Allow references in addPath
2021-11-09addToStore, addToStoreFromDump: refactor: pass refs by const referenceAlexander Bantyev
Co-Authored-By: Eelco Dolstra <edolstra@gmail.com>
2021-11-08Unshare mount namespace in main()Eelco Dolstra
Doing it as a side-effect of calling LocalStore::makeStoreWritable() is very ugly. Also, make sure that stopping the progress bar joins the update thread, otherwise that thread should be unshared as well.
2021-11-08Merge branch 'fix-writable-shell' of https://github.com/yorickvP/nixEelco Dolstra
2021-11-08Merge pull request #5434 from timothyklim/git-url-submodulesEelco Dolstra
Support building flakes from a Git repo url with submodules
2021-11-08Merge pull request #5504 from NixOS/flake-options-and-daemonEelco Dolstra
Make the flake options work when using the daemon
2021-11-07Remove unused "<let-body>" symbolAndreas Rammhold
The requirement for the symbol has been removed since at least 7d47498.
2021-11-05addPath: allow paths with referencesAlexander Bantyev
Since 4806f2f6b0fd2cae401b89fe19d8c528ffd88b5f, we can't have paths with references passed to builtins.{path,filterSource}. This prevents many cases of those functions called on IFD outputs from working. Resolve this by passing the references found in the original path to the added path.
2021-11-05Merge pull request #5476 from NixOS/ca/fix-build-in-nix-replThéophane Hufschmitt
Fix `nix repl`’s building of CA derivations
2021-11-05Make the flake options work when using the daemonregnat
When setting flake-local options (with the `nixConfig` field), forward these options to the daemon in case we’re using one. This is necessary in particular for options like `binary-caches` or `post-build-hook` to make sense. Fix <https://github.com/NixOS/nix/commit/343239fc8a1993f707a990c2cd54a41f1fa3de99#r44356843>
2021-11-05Fix `nix repl`’s building of CA derivationsregnat
When running a `:b` command in the repl, after building the derivations query the store for its outputs rather than just assuming that they are known in the derivation itself (which isn’t true for CA derivations) Fix #5328
2021-11-04Remove maxPrimOpArityEelco Dolstra
2021-11-04Fix derivation primopEelco Dolstra
2021-11-04Use callFunction() with an array for some calls with arity > 1Eelco Dolstra
2021-11-04Add level / displacement typesEelco Dolstra
2021-11-04Optimize primop callsEelco Dolstra
We now parse function applications as a vector of arguments rather than as a chain of binary applications, e.g. 'substring 1 2 "foo"' is parsed as ExprCall { .fun = <substring>, .args = [ <1>, <2>, <"foo"> ] } rather than ExprApp (ExprApp (ExprApp <substring> <1>) <2>) <"foo"> This allows primops to be called immediately (if enough arguments are supplied) without having to allocate intermediate tPrimOpApp values. On $ nix-instantiate --dry-run '<nixpkgs/nixos/release-combined.nix>' -A nixos.tests.simple.x86_64-linux this gives a substantial performance improvement: user CPU time: median = 0.9209 mean = 0.9218 stddev = 0.0073 min = 0.9086 max = 0.9340 [rejected, p=0.00000, Δ=-0.21433±0.00677] elapsed time: median = 1.0585 mean = 1.0584 stddev = 0.0024 min = 1.0523 max = 1.0623 [rejected, p=0.00000, Δ=-0.20594±0.00236] because it reduces the number of tPrimOpApp allocations from 551990 to 42534 (i.e. only small minority of primop calls are partially applied) which in turn reduces time spent in the garbage collector.
2021-11-04StaticEnv: Use std::vector instead of std::mapEelco Dolstra
2021-11-04Add helper function to check whether a function arg is 'X' or '_X'Eelco Dolstra
Also allow '_'.
2021-11-03Merge pull request #5475 from doronbehar/SQLiteWAL-vfsEelco Dolstra
libstore: Use unix-dotfile vfs if useSQLiteWAL is false
2021-11-03In checkOverlay, accept underscored names for final/prev args.Christopher League
Resolves #4416.
2021-11-03libstore: Use unix-dotfile vfs if useSQLiteWAL is falseDoron Behar
2021-10-29StyleEelco Dolstra
2021-10-29Merge branch 'master' of https://github.com/alekswn/nixEelco Dolstra
2021-10-28Use nix::connect() to connect to the garbage collectorEelco Dolstra
2021-10-28Remove unused variableEelco Dolstra
2021-10-28Merge remote-tracking branch 'origin/master' into non-blocking-gcEelco Dolstra
2021-10-27toJSON: improve pos accuracy, add traceShay Bergmann
2021-10-27nix-instantiate: pass pos in the `--eval --json` code pathShay Bergmann
2021-10-27Remove redundant 'warning:'Eelco Dolstra
2021-10-27build-remote: Implicitly add the 'builtin' system type to all machinesEelco Dolstra
This makes 'nix-env -i --max-jobs 0' work with remote builders.
2021-10-27If max-jobs == 0, do preferLocalBuild on remote buildersEelco Dolstra
2021-10-27daemon: Accept 'repeat' setting from untrusted usersEelco Dolstra
Fixes #5352.
2021-10-27StyleEelco Dolstra
2021-10-26toJSON: pass pos in case of a list as wellShay Bergmann
2021-10-26Support building flakes from a Git repo url with submodules query parameterTimothy
2021-10-26parseExperimentalFeature(): Initialize atomicallyEelco Dolstra
2021-10-26Tweak fetchTree docsEelco Dolstra
2021-10-26Make experimental-features a proper typeregnat
Rather than having them plain strings scattered through the whole codebase, create an enum containing all the known experimental features. This means that - Nix can now `warn` when an unkwown experimental feature is passed (making it much nicer to spot typos and spot deprecated features) - It’s now easy to remove a feature altogether (once the feature isn’t experimental anymore or is dropped) by just removing the field for the enum and letting the compiler point us to all the now invalid usages of it.