aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
2020-05-16Call lockFlake once and store in _lockedFlakeMatthew Kenigsberg
2020-05-16use flake's nixpkgs to find bashInteractiveMatthew Kenigsberg
2020-05-16use nixpkgs#bashInteractive for dev-shellMatthew Kenigsberg
2020-05-15Move registry-related commands from 'nix flake' to 'nix registry'Eelco Dolstra
This makes 'nix flake' less cluttered and more consistent (it's only subcommands that operator on a flake). Also, the registry is not inherently flake-related (e.g. fetchTree could also use it to remap inputs).
2020-05-12Merge pull request #3587 from NixOS/bash-completionEelco Dolstra
Generic shell completion support for the 'nix' command
2020-05-12Fix InstallableCommandEelco Dolstra
2020-05-11nix flake: Add completion supportEelco Dolstra
2020-05-11When completing flakerefs, only return directoriesEelco Dolstra
2020-05-11Add completion for installablesEelco Dolstra
This completes flakerefs using the registry (e.g. 'nix<TAB>' => 'nix nixpkgs') and flake output attributes by evaluating the flake (e.g. 'dwarffs#nix<TAB>' => 'dwarffs#nixosModules').
2020-05-11CleanupEelco Dolstra
2020-05-10Add completion for pathsEelco Dolstra
2020-05-10nix: Implement basic bash completionEelco Dolstra
2020-05-09Reorder to buildMatthew Kenigsberg
This reverts commit 883948d7a0add742ccae58e9845d769a8064371c.
2020-05-09Refactor installablesMatthew Kenigsberg
InstallableValue has children InstallableFlake and InstallableAttrPath, but InstallableFlake was overriding toDerivations, and usage was changed so that InstallableFlake didn't need cmd. So these changes were made: InstallableValue::toDerivations() -> InstalllableAttrPath::toDerivations() InstallableValue::cmd -> InstallableAttrPath::cmd InstallableValue uses state instead of cmd toBuildables() and toDerivations() were made abstract
2020-05-09InstallableExpr unusedMatthew Kenigsberg
2020-05-07Update src/nix/search.ccEelco Dolstra
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-05-06Remove the nixpkgs.<attr> compatibility hackEelco Dolstra
Since we've changed a lot of things in the 'nix' command (e.g. rename 'nix run') there is not much point in keeping this around.
2020-05-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-06Merge pull request #3546 from guibou/nix_readfile_on_0_sized_filesEelco Dolstra
builtins.readFile: do not truncate content
2020-05-06Merge pull request #3557 from Ma27/nix-repl-helpEelco Dolstra
Improve help-message for nix-repl
2020-05-05Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-05nix doctor: ConsistencyEelco Dolstra
2020-05-05nix --help: Group commandsEelco Dolstra
2020-05-04Flag: Use designated initializersEelco Dolstra
2020-05-01Improve help-message for nix-replMaximilian Bosch
* Remove obsolete `printHelp` function * Add an example to demonstrate how to list all available commands within the REPL
2020-05-01Fix buildEelco Dolstra
2020-05-01rename nix run to nix shell and nix app to nix runMatthew Kenigsberg
(cherry picked from commit 5d8504b9789ffebabe8226227c4061dd48354177)
2020-05-01Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-30nix dev-shell: Unset shellHookEelco Dolstra
This avoids inheriting the caller's shellHook, which can happen when running a dev-shell inside a dev-shell.
2020-04-30nix dev-shell: Support structured attrsEelco Dolstra
Tested against https://github.com/NixOS/nixpkgs/pull/72074. Fixes #3540.
2020-04-30nix dev-shell: Refactor script for getting the environmentEelco Dolstra
2020-04-29rename nix run to nix shell and nix app to nix runMatthew Kenigsberg
2020-04-29Remove the `drain` argument from `readFile`Guillaume Bouchard
Now it is always `drain` (see previous commit).
2020-04-29nix copy: Build derivationsEelco Dolstra
Fixes $ nix copy .#hydraJobs.vendoredCrates --to /tmp/nix error: path '/nix/store/...' is not valid
2020-04-29nix copy: Move --from / --to checkEelco Dolstra
This means you now get an error message *before* stuff gets built: $ nix copy .#hydraJobs.vendoredCrates error: you must pass '--from' and/or '--to' Try 'nix --help' for more information.
2020-04-29Evaluation cache: Don't barf in read-only modeEelco Dolstra
Fixes $ nix copy warning: Git tree '/home/eelco/Dev/nix-flake' is dirty nix: src/nix/installables.cc:348: std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, nix::FlakeRef, nix::InstallableValue::DerivationInfo> nix::InstallableFlake::toDerivation(): Assertion `state->store->isValidPath(drvPath)' failed. Aborted (core dumped)
2020-04-29Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-28rename to NIX_GCROOTMatthew Kenigsberg
2020-04-27Improve path:// handlingEelco Dolstra
In particular, doing 'nix build /path/to/dir' now works if /path/to/dir is not a Git tree (it only has to contain a flake.nix file). Also, 'nix flake init' no longer requires a Git tree (but it will do a 'git add flake.nix' if it's a Git tree)
2020-04-27flake-template.nix: Add defaultPackageEelco Dolstra
2020-04-27commentMatthew Kenigsberg
2020-04-27Set GCROOT to store path to prevent garbage collectionMatthew Kenigsberg
2020-04-27Improve error message when an argument is not a flakeEelco Dolstra
2020-04-27nix search: Search legacyPackages recursivelyEelco Dolstra
2020-04-24nix search: Show versionEelco Dolstra
2020-04-20Revive 'nix search'Eelco Dolstra
It uses the evaluation cache now rather than the ad hoc JSON cache.
2020-04-20Move eval-cache.{cc,hh}Eelco Dolstra
2020-04-20Get rid of the old eval cacheEelco Dolstra
2020-04-19Store more stuff in the evaluation cacheEelco Dolstra
In particular, we store whether an attribute failed to evaluate (threw an exception) or was an unsupported type. This is to ensure that a repeated 'nix flake show' never has to evaluate anything, so it can execute without fetching the flake. With this, 'nix flake show nixpkgs/nixos-20.03 --legacy' executes in 0.6s (was 3.4s).
2020-04-18Eval cache: Don't replace real attributes with placeholdersEelco Dolstra