aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
2021-10-13Merge pull request #5362 from Artturin/nixunpackEelco Dolstra
nix develop: add --unpack
2021-10-12Merge pull request #5375 from edolstra/repl-ctrl-cEelco Dolstra
nix repl: Fix plugin-files warning
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-09nix develop: add --unpackArtturin
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-07Refactoring: Add allowPath() methodEelco 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-06Remove links to .md files in help outputEelco Dolstra
Fixes #5337.
2021-10-05Don't ignore SIGCHLD in createUnixDomainSocket()Eelco Dolstra
2021-10-02Fix typoAleksey Kladov
2021-09-30`std::visit` by referenceJohn Ericson
I had started the trend of doing `std::visit` by value (because a type error once mislead me into thinking that was the only form that existed). While the optomizer in principle should be able to deal with extra coppying or extra indirection once the lambdas inlined, sticking with by reference is the conventional default. I hope this might even improve performance.
2021-09-27run(): MoveEelco Dolstra
2021-09-22Disable IFD selectivelyEelco Dolstra
It's now disabled by default for the following: * 'nix search' (this was already implied by read-only mode) * 'nix flake show' * 'nix flake check', but only on the hydraJobs output
2021-09-14nix profile history: Show profile dateEelco Dolstra
2021-09-14Add 'nix profile wipe-history' commandEelco Dolstra
2021-09-14Generations -> profile versionsEelco Dolstra
2021-09-14Add "nix profile rollback" commandEelco Dolstra
2021-09-14nix flake show --json: Add type infoEelco Dolstra
For extensibility, every leaf node is now an object that contains at least a type field (e.g. "type": "derivation").
2021-09-14Merge branch 'tomberek/show_json' of https://github.com/tomberek/nixEelco Dolstra
2021-09-14Merge pull request #5245 from edolstra/warningsEelco Dolstra
Change warning messages from yellow to magenta
2021-09-14Merge pull request #5240 from edolstra/builtin-helpEelco Dolstra
nix --help: Display help using lowdown instead of man
2021-09-14ANSI_YELLOW -> ANSI_WARNINGEelco Dolstra
2021-09-14Fix macOS buildEelco Dolstra
2021-09-13RunOptions: Use designated initializersEelco Dolstra
Also get rid of _killStderr because it wasn't actually checked anywhere.
2021-09-13nix --help: Display help using lowdown instead of manEelco Dolstra
Fixes #4476. Fixes #5231.
2021-09-13Fix markdown errorEelco Dolstra
2021-09-13Use Bindings::{get,need} instead of findEelco Dolstra
2021-09-08Ensure nix flake show produces valid jsonTom Bereknyei
2021-09-08Merge branch 'fix-3976' of https://github.com/mkenigs/nixEelco Dolstra
2021-09-02Don't use read-only mode for nix build --dry-runGeorges Dubus
In dry run mode, new derivations can't be create, so running the command on anything that has not been evaluated before results in an error message of the form `don't know how to build these paths (may be caused by read-only store access)`. For comparison, the classical `nix-build --dry-run` doesn't use read-only mode. Closes #1795 (cherry picked from commit 54525682df707742e58311c32e9c9cb18de1e31f)
2021-09-02Docs: Fix syntax error in json example in man pageLucas Hoffmann
2021-08-21nix {bundle,run}: drop broken flake attr-path prefixesJan Tojnar
“packages” was probably meant to be “packages.${system}.” but that is already listed in `getDefaultFlakeAttrPathPrefixes` in `installables`, which is probably why no one noticed it was broken.
2021-08-21nix develop: Fix `devShells` lookupJan Tojnar
It currently fails with the following error: error: flake 'git+file://…' does not provide attribute 'devShells.x86_64-linuxhaskell', 'packages.x86_64-linux.haskell', 'legacyPackages.x86_64-linux.haskell' or 'haskell'
2021-08-19nix develop --phase: chdir to flake directoryMatthew Kenigsberg
For git+file and path flakes, chdir to flake directory so that phases that expect to be in the flake directory can run Fixes https://github.com/NixOS/nix/issues/3976
2021-08-17Enable JSON option to show flakesTom Bereknyei
`nix-flake show --json`
2021-07-27nix develop: Support chroot storesEelco Dolstra
Fixes #5024.
2021-07-27Merge pull request #5048 from tweag/flox-eval-storeEelco Dolstra
--eval-store and faster closure copying
2021-07-22Fix formatting error in 'nix store' manpageEelco Dolstra
2021-07-22buildPaths(): Add an evalStore argumentEelco Dolstra
With this, we don't have to copy the entire .drv closure to the destination store ahead of time (or at all). Instead, buildPaths() reads .drv files from the eval store and copies inputSrcs to the destination store if it needs to build a derivation. Issue #5025.
2021-07-22copyPaths: Pass store by referenceEelco Dolstra
2021-07-22Use eval-store in more placesEelco Dolstra
In particular, this now works: $ nix path-info --eval-store auto --store https://cache.nixos.org nixpkgs#hello Previously this would fail as it would try to upload the hello .drv to cache.nixos.org. Now the .drv is instantiated in the local store, and then we check for the existence of the outputs in cache.nixos.org.
2021-07-20Merge remote-tracking branch 'origin/repl-flake-support'Eelco Dolstra
2021-07-19nix repl: Update :edit help textRobert Hensing
It supports functions as well. Also change `package` to `derivation` because it operates at the language level and does not open the derivation (which would be useful but not nearly as much).
2021-07-19Rename findDerivationFilename -> findPackageFilenameRobert Hensing
It does not operate on a derivation and does not return a derivation path. Instead it works at the language level, where a distinct term "package" is more appropriate to distinguish the parent object of `meta.position`; an attribute which doesn't even make it into the derivation.
2021-07-19Add a `:load-flake` command to the nix replregnat
`:lf ref` does essentially the same thing as `:a (builtins.getFlake "ref")` (but cannonicalising `ref` if needs be, so that `:lf .` works) Fix #3803
2021-07-16Forward the whole Nix config to the repl subprocessesregnat
Fill `NIX_CONFIG` with the value of the current Nix configuration before calling the nix subprocesses in the repl That way the whole configuration (including the possible `experimental-features`, a possibly `--store` option or whatever) will be made available. This is required for example to make `nix repl` work with a custom `--store`
2021-07-15Forward the whole Nix config to the post-build-hookregnat
Fill `NIX_CONFIG` with the value of the current Nix configuration before calling the post-build-hook. That way the whole configuration (including the possible `experimental-features`, a possibly `--store` option or whatever) will be made available to the hook
2021-07-13Make `nix flake check` aware of `devShells`regnat
2021-07-13Make `nix flake show` display the `devShells`regnat