aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/flake
AgeCommit message (Collapse)Author
2020-09-21Don't include <regex> in header filesEelco Dolstra
This reduces compilation time by ~15 seconds (CPU time). Issue #4045.
2020-09-16Make the store plugins more introspectableregnat
Directly register the store classes rather than a function to build an instance of them. This gives the possibility to introspect static members of the class or choose different ways of instantiating them.
2020-07-28Restore backwards-compat for current `builtins.fetchGit`Maximilian Bosch
If a repo is dirty, it used to return a `rev` object with an "empty" sha1 (0000000000000000000000000000000000000000). Please note that this only applies for `builtins.fetchGit` and *not* for `builtins.fetchTree{ type = "git"; }`.
2020-07-17parseFlakeRef(): Only search for the top-level directory for CLI flakerefsEelco Dolstra
2020-07-14EvalCache: Ignore SQLite errorsEelco Dolstra
Fixes #3794.
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-01Support building flakes from a shallow Git repoEelco Dolstra
Fixes #3756.
2020-06-17getFlake -> builtins.getFlakeEelco Dolstra
2020-06-17Don't provide 'getFlake' if the 'flakes' feature is not enabledEelco Dolstra
2020-06-12Check 'follows' inputsEelco Dolstra
2020-06-11diffLockFiles(): Show 'follows' changesEelco Dolstra
2020-06-11Represent 'follows' inputs explicitly in the lock fileEelco Dolstra
This fixes an issue where lockfile generation was not idempotent: after updating a lockfile, a "follows" node would end up pointing to a new copy of the node, rather than to the original node.
2020-06-10Preserve 'isFlake' when not updating a lock file entryEelco Dolstra
2020-06-10Combine lock file update messagesEelco Dolstra
2020-06-10Add helper function printInputPath()Eelco Dolstra
2020-06-09Fix applyOverride() for githubEelco Dolstra
2020-06-08Add completion for --update-inputEelco Dolstra
2020-06-05diffLockFiles(): Fix assertion failureEelco Dolstra
There are some cases where this inequality didn't hold, in particular due to the Input / TreeInfo merge, where we're not always showing narHash.
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-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-06Remove support for old lockfiles and the epoch/uri attributesEelco Dolstra
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-20Fix typoEelco Dolstra
2020-04-20Move eval-cache.{cc,hh}Eelco Dolstra
2020-04-20Get rid of the old eval cacheEelco Dolstra
2020-04-16Use RootValueEelco Dolstra
2020-04-10Remove flake 'edition' fieldEelco Dolstra
Future editions of flakes or the Nix language can be supported by renaming flake.nix (e.g. flake-v2.nix). This avoids a bootstrap problem where we don't know which grammar to use to parse flake*.nix. It also allows a project to support multiple flake editions, in theory.
2020-04-06nix flake info: Show resolved URLEelco Dolstra
This is useful for finding out what a registry lookup resolves to, e.g $ nix flake info patchelf Resolved URL: github:NixOS/patchelf Locked URL: github:NixOS/patchelf/cd7955af31698c571c30b7a0f78e59fd624d0229
2020-04-03Make --override-input stickyEelco Dolstra
When we do something like 'nix flake update --override-input nixpkgs ...', the override is now kept on subsequent calls. (If you don't want this behaviour, you can use --no-write-lock-file.)
2020-04-03getFlake: In pure mode, check that the argument is an immutable flakerefEelco Dolstra
2020-04-02Respect the narHash attribute in more input typesEelco Dolstra
call-flake.nix now passes node.info.narHash to fetchTree. This ensures that dirty Git trees work even in pure mode.
2020-04-02Move parseTreeInfo()Eelco Dolstra
2020-04-02nix flake info --json: Show TreeInfoEelco Dolstra
2020-03-30Move fetchers from libstore to libfetchersEelco Dolstra
2020-03-28Warn about --override-input / --update-input flags that don't match an inputEelco Dolstra
2020-03-28nix flake info: Show flake subdirectoryEelco Dolstra
2020-03-27Improve lock file generationEelco Dolstra
This is now done in a single pass. Also fixes some issues when updating flakes with circular dependencies. Finally, when using '--recreate-lock-file --commit-lock-file', the commit message now correctly shows the differences.
2020-03-27Fix diffLockFiles()Eelco Dolstra
2020-03-17Unified fetcher caching systemEelco Dolstra
2020-03-12Change the lock file to a graphEelco Dolstra
This enables support for cycles between flakes.
2020-03-11Move call-flake.nix into libexprEelco Dolstra
2020-03-10Fix flake subdirectory handlingEelco Dolstra
2020-03-09Move calling flakes into a Nix helper function (call-flake.nix)Eelco Dolstra
2020-03-09Add 'flake' attribute to lock files to denote non-flakesEelco Dolstra
2020-02-20Restore subdir -> dirEelco Dolstra
Got this mixed up somewhere.
2020-02-20Restore subdir support in registriesEelco Dolstra
Hacky...
2020-02-14Fix buildEelco Dolstra
2020-02-06Registry: Use attr notation instead of URLsEelco Dolstra
2020-02-05Warn when we commit a new revisionEelco Dolstra