aboutsummaryrefslogtreecommitdiff
path: root/src/nix
AgeCommit message (Collapse)Author
2020-06-08nix flake: Require 'flakes' featureEelco Dolstra
2020-06-08Add completion for --update-inputEelco Dolstra
2020-06-05Fix completion of --templateEelco Dolstra
2020-06-04nix flake init: Add a '--template' flagEelco Dolstra
The initial contents of the flake is specified by the 'templates.<name>' or 'defaultTemplate' output of another flake. E.g. outputs = { self }: { templates = { nixos-container = { path = ./nixos-container; description = "An example of a NixOS container"; }; }; }; allows $ nix flake init -t templates#nixos-container Also add a command 'nix flake new', which is identical to 'nix flake init' except that it initializes a specified directory rather than the current directory.
2020-06-04Disable eval cache with --impureEelco Dolstra
Fixes $ nix build nixpkgs#zoom-us error: Package ‘zoom-us-5.0.399860.0429’ in /nix/store/m79v7h75b69fkk8d2qcwm555l3wq6fmv-source/pkgs/applications/networking/instant-messengers/zoom-us/default.nix:126 has an unfree license (‘unfree’), refusing to evaluate. $ nix build nixpkgs#zoom-us --impure error: cached failure of attribute 'legacyPackages.x86_64-linux.zoom-us.drvPath'
2020-06-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-04Make 'nix dev-shell' a deprecated alias for 'nix develop'Eelco Dolstra
2020-06-04Rename 'nix dev-shell' to 'nix develop'Eelco Dolstra
Fixes #3648.
2020-06-03Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-30Remove TreeInfoEelco Dolstra
The attributes previously stored in TreeInfo (narHash, revCount, lastModified) are now stored in Input. This makes it less arbitrary what attributes are stored where. As a result, the lock file format has changed. An entry like "info": { "lastModified": 1585405475, "narHash": "sha256-bESW0n4KgPmZ0luxvwJ+UyATrC6iIltVCsGdLiphVeE=" }, "locked": { "owner": "NixOS", "repo": "nixpkgs", "rev": "b88ff468e9850410070d4e0ccd68c7011f15b2be", "type": "github" }, is now stored as "locked": { "owner": "NixOS", "repo": "nixpkgs", "rev": "b88ff468e9850410070d4e0ccd68c7011f15b2be", "type": "github", "lastModified": 1585405475, "narHash": "sha256-bESW0n4KgPmZ0luxvwJ+UyATrC6iIltVCsGdLiphVeE=" }, The 'Input' class is now a dumb set of attributes. All the fetcher implementations subclass InputScheme, not Input. This simplifies the API. Also, fix substitution of flake inputs. This was broken since lazy flake fetching started using fetchTree internally.
2020-05-29Remove addToStore variant as requested by `FIXME`John Ericson
The idea is it's always more flexible to consumer a `Source` than a plain string, and it might even reduce memory consumption. I also looked at `addToStoreFromDump` with its `// FIXME: remove?`, but the worked needed for that is far more up for interpretation, so I punted for now.
2020-05-28Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-05-28Merge branch 'store-visited' of https://github.com/mkenigs/nix into flakesEelco Dolstra
2020-05-28nixpkgsFlakeRef(): Use locked nixpkgsEelco Dolstra
2020-05-27Use `FileIngestionMethod` for `nix hash`John Ericson
There was an enum there that matched in perfectly.
2020-05-27Don’t use FileIngestionMethod for StorePathsCommandMatthew Bauer
This is a different recursive than used in makeFixedOutputPath.
2020-05-26Merge remote-tracking branch 'origin/master' into enum-FileIngestionMethodCarlo Nucera
2020-05-21handle circular flake dependencies in list-inputsMatthew Kenigsberg
2020-05-16rm includesMatthew Kenigsberg
2020-05-16Create bashInteractive InstallableFlakeMatthew Kenigsberg
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-12nix: Don't require --experimental-features=nix-command for some subcommandsEelco Dolstra
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 pull request #3570 from Mic92/nix-searchDomen Kožar
nix/search: no error for empty search results if json is enabled
2020-05-06nix/search: no error for empty search results if json is enabledJörg Thalheim
- result list will be always empty if --json is passed - for scripts an empty search result is not really an error, we rather want to distinguish between evaluation errors and empty results
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)