aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
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-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
2021-07-13nix develop: Search in `devShells.${system}` by defaultregnat
Make `nix develop .#foo` search `.#devShells.${system}.foo` first
2021-07-12Merge branch 'master' into structured-attrs-shellMaximilian Bosch
Conflicts: src/nix/develop.cc src/nix/get-env.sh tests/shell.nix
2021-07-09nix print-dev-env: Add --json flagEelco Dolstra
2021-07-09nix develop: Filter some bash magic variablesEelco Dolstra
2021-07-09nix develop: Don't parse bash environment with regexesEelco Dolstra
Instead have get-env.sh dump the bash environment as JSON. This should be a lot less error-prone. Fixes #4992.
2021-07-08Merge pull request #4969 from serokell/balsoft/fix-nixConfig-flake-registryEelco Dolstra
flake.nixConfig: fix flake-registry config settings
2021-07-07Style tweaksEelco Dolstra
2021-07-07Merge branch 'balsoft/registry' of https://github.com/serokell/nixEelco Dolstra
2021-07-05Fix devShell handling of env values including @ and %Michael Fellinger
2021-07-01fixup! flake.nixConfig: fix flake-registry config settingsAlexander Bantyev
2021-06-30nix registry pin: add a way to pin to a custom lockedAlexander Bantyev
2021-06-30nix registry: add --registry flagAlexander Bantyev
2021-06-30Merge pull request #4958 from NixOS/nix-develop-remove-override-input-warningEelco Dolstra
develop: Discard the input{Overrides,Updates} when getting bash
2021-06-29Forward the experimental features to the nix repl subprocessesregnat
Pass the current experimental features using `NIX_CONFIG` to the various Nix subprocesses that `nix repl` invokes. This is quite a hack, but having `nix repl` call Nix with a subprocess is a hack already, so I guess that’s fine.
2021-06-29develop: Discard the input{Overrides,Updates} when getting bashregnat
`nix develop` is getting bash from an (assumed existing) `nixpkgs` flake. However, when doing so, it reuses the `lockFlags` passed to the current flake, including the `--input-overrides` and `--input-update` which generally don’t make sense anymore at that point (and trigger a warning because of that) Clear these overrides before getting the nixpkgs flake to get rid of the warning.
2021-06-28man: fix formatting of nix3-profile-removeFlorian Franzen
2021-06-23Merge pull request #4908 from NixOS/ca/fix-nix-developEelco Dolstra
Make `nix develop` work with CA derivations
2021-06-22Add testcase for `nix develop` with `__structuredAttrs`Maximilian Bosch
2021-06-22Fix usage of structured attrs for `nix develop`Maximilian Bosch
2021-06-21Properly set the output env variablesThéophane Hufschmitt
Co-authored-by: John Ericson <git@JohnEricson.me>
2021-06-21Only symlink the requested outputs in `nix build`regnat
Fix #4925
2021-06-18UDSRemoteStore: Support the 'root' store parameterEelco Dolstra
Useful when we're using a daemon with a chroot store, e.g. $ NIX_DAEMON_SOCKET_PATH=/tmp/chroot/nix/var/nix/daemon-socket/socket nix-daemon --store /tmp/chroot Then the client can now connect with $ nix build --store unix:///tmp/chroot/nix/var/nix/daemon-socket/socket?root=/tmp/chroot nixpkgs#hello
2021-06-15nix develop: Filter out NIX_REMOTEEelco Dolstra
When recursive Nix is enabled, NIX_REMOTE is set to unix:///build/.nix-socket, which doesn't work outside of the sandbox.
2021-06-11Make `nix develop` work with CA derivationsregnat
Fix #4823
2021-06-02doc: Wrap at 80 charactersregnat
2021-06-02Fix a documentation typoThéophane Hufschmitt
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-06-02throw_ -> reportErrorregnat
This function might or might not throw depending on the value of `keepGoing`, so naming it `throw_` was a bit confusing
2021-06-02Let `nix flake check` keep going when keep-going is setregnat
When the `keep-going` option is set to `true`, make `nix flake check` continue as much as it can before failing. The UI isn’t perfect as-it-is as all the lines currently start with a mostly useless `error (ignored): error:` prefix, but I’m not sure what the best output would be, so I’ll leave it as-it-is for the time being (This is a bit hijacking the `keep-going` flag as it’s supposed to be a build-time only thing. But I think it’s faire to reuse it here). Fix https://github.com/NixOS/nix/issues/4450
2021-06-01Fix typo in documentationJeremy Schlatter
2021-05-29Add .tar.zst support for TarballInputSchemeTimothy Klim