aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-06-01fetchOrSubstituteTree improvementsMatthew Kenigsberg
Caches tree in addition to lockedRef, and explicitly writes out the logic for different combinations of cached/uncached flakes and indirect/resolved/locked flakes. This eliminates uneccessary calls to lookupInFlakeCache, fetchTree, maybeLookupFlake, and flakeCache.push_back
2020-05-30Move substitution into Input::fetch()Eelco Dolstra
Closes #3520.
2020-05-30Check revCount / lastModified input attributes if specifiedEelco 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-29Factor out GitHub / GitLab commonalityEelco Dolstra
2020-05-28add gitlab libfetcherFinn Behrens
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-27Merge pull request #3621 from gilligan/add-json-testsEelco Dolstra
Add unit tests for "json.hh"
2020-05-27Merge pull request #3625 from gilligan/xml-writer-testsEelco Dolstra
Add unit tests for xml-writer
2020-05-25Add unit tests for xml-writerTobias Pflug
2020-05-25Add unit tests for "json.hh"Tobias Pflug
2020-05-25Add unit tests for hashing functionsTobias Pflug
2020-05-21handle circular flake dependencies in list-inputsMatthew Kenigsberg
2020-05-20Add unit testes for url.ccTobias Pflug
This adds tests for - parseURL - percentDecode - decodeQuery
2020-05-18CleanupEelco Dolstra
2020-05-18Merge branch 'wait-for-builders' of https://github.com/serokell/nixEelco Dolstra
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-14Don't lock a user while doing remote buildsAlexander Bantyev
2020-05-13Update src/libfetchers/git.ccEelco Dolstra
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2020-05-12Merge pull request #3587 from NixOS/bash-completionEelco Dolstra
Generic shell completion support for the 'nix' command
2020-05-12Show hint how to enable experimental featuresEelco Dolstra
2020-05-12nix: Don't require --experimental-features=nix-command for some subcommandsEelco Dolstra
2020-05-12Fix InstallableCommandEelco Dolstra
2020-05-12Fix macOS buildEelco Dolstra
macOS doesn't have GLOB_ONLYDIR.
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-11Shut up warnings while running completersEelco Dolstra
2020-05-11Merge pull request #3568 from kolloch/outputHashModeErrorDomen Kožar
libstore/build.cc: more explicit error about form of output
2020-05-11Update src/libstore/build.ccDomen Kožar
2020-05-11CleanupEelco Dolstra
2020-05-10SimplifyEelco 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-09doc: consistently refer to 'fixed-output' with a dashBenjamin Hipple
General cleanup that makes it easier to search for the term.
2020-05-08Merge pull request #3571 from gilligan/nix-unit-testingEelco Dolstra
Add unit tests
2020-05-08Enable toLower umlauts testTobias Pflug
Update comment and enable the test
2020-05-08Enable `baseNameOf` testTobias Pflug
Add note about removal of trailing slashes in the doc comment of baseNameOf and enabled the test.
2020-05-08Enable `dirOf` testTobias Pflug
Adjusted the doc comment for `dirOf` to reflect the implementation behavior.
2020-05-08configure: Look for gtestEelco Dolstra