aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-11-09remove dead codeBen Burdette
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-11-03Make the DrvOutputSubstitutionGoal more asyncregnat
2021-11-03Make the realisation fetching from binary caches asyncregnat
That way we can fetch several realisations from the same cache in parallel
2021-11-03Expose an async interface for `queryRealisation`regnat
Doesn’t change much so far because everything is still using it synchronously, but should allow the binary cache to fetch stuff in parallel
2021-11-03Don’t require `ca-derivations` when `__contentAddressed = false`regnat
If we explicitely opt-out of it, there’s no need to require the experimental feature
2021-11-01git: extend cache dir lock over all mutating operationsSebastian Ullrich
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.
2021-10-25toJSON: report error position for fancier outputShay Bergmann
Given flake: ```nix { description = "nix json error provenance"; inputs = {}; outputs = { self }: { jsonFunction = _: "function"; json = builtins.toJSON (_: "function"); }; } ``` - Before: ```console ❯ nix eval --json .#jsonFunction error: cannot convert a function to JSON ``` - After: ```console ❯ nix eval --json .#jsonFunction error: cannot convert a function to JSON at /nix/store/b7imf1c2j4jnkg3ys7fsfbj02s5j0i4f-source/testflake/flake.nix:4:5: 3| outputs = { self }: { 4| jsonFunction = _: "function"; | ^ 5| json = builtins.toJSON (_: "function"); ```
2021-10-23addToStore, addToStoreFromDump: add references argumentAlexander Bantyev
Allow to pass a set of references to be added as info to the added paths.
2021-10-22more code cleanupBen Burdette
2021-10-22more debug removalBen Burdette
2021-10-22remove more debug codeBen Burdette