aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
AgeCommit message (Collapse)Author
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-20Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-18Get rid of downloadCached()Eelco Dolstra
Everything uses the generic caching system now.
2020-03-17Require shallow clones to be requested explicitlyEelco Dolstra
If you do a fetchTree on a Git repository, whether the result contains a revCount attribute should not depend on whether that repository happens to be a shallow clone or not. That would complicate caching a lot and would be semantically messy. So applying fetchTree/fetchGit to a shallow repository is now an error unless you pass the attribute 'shallow = true'. If 'shallow = true', we don't return revCount, even if the repository is not actually shallow. Note that Nix itself is not doing shallow clones at the moment. But it could do so as an optimisation if the user specifies 'shallow = true'. Issue #2988.
2020-03-17Unified fetcher caching systemEelco Dolstra
2020-03-16Add a test for shallow Git clonesEelco Dolstra
Also, don't return a revCount anymore for shallow or dirty Git trees, since it's incorrect. Closes #2988.
2020-03-13Add missing `#include <regex>`John Ericson
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-11Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-11Move some corepkgs into the nix binaryEelco Dolstra
2020-03-11parseExprFromString(): Use std::string_viewEelco 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-03-04Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-03-04builtins.cache: Cache regular expressionsEelco Dolstra
The evaluator was spending about 1% of its time compiling a small number of regexes over and over again.
2020-02-20Restore subdir -> dirEelco Dolstra
Got this mixed up somewhere.
2020-02-20Restore subdir support in registriesEelco Dolstra
Hacky...
2020-02-20fetchTree: Use a feature flagEelco Dolstra
2020-02-14Fix buildEelco Dolstra
2020-02-14Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-02-13Bindings::get(): std::optional<Attr *> -> Attr *Eelco Dolstra
Returning a nullable type in an optional is silly.
2020-02-11Add fetchTree builtin functionEelco Dolstra
This allows all supported fetchers to be used, e.g. builtins.fetchTree { type = "github"; owner = "NixOS"; repo = "nix"; rev = "d4df99a3349cf2228a8ee78dea320afef86eb3ba"; }
2020-02-07nix edit: Support non-derivation attributesEelco Dolstra
E.g. $ nix edit .#nixosConfigurations.bla now works.
2020-02-07findAlongAttrPath(): Return positionEelco Dolstra
2020-02-06Registry: Use attr notation instead of URLsEelco Dolstra
2020-02-05Warn when we commit a new revisionEelco Dolstra
2020-02-05Improve commit subject lineEelco Dolstra
2020-02-05Add option --commit-lock-fileEelco Dolstra
2020-02-03Install headers in the correct locationEelco Dolstra
2020-02-03Fix URL parserEelco Dolstra
Fixes #3062.
2020-02-03Emit narHash attributeEelco Dolstra
2020-02-02Automatically do git/hg add on flake.lockEelco Dolstra
2020-02-02Don't store fragment in FlakeRefEelco Dolstra
2020-02-02Re-read flake after updating flake.lockEelco Dolstra
Otherwise we'll evaluate the flake with the wrong metadata (rev, ...).
2020-02-02Detect circular flake importsEelco Dolstra
Fixes #2997.
2020-02-02Substitute flake inputsEelco Dolstra
This improves reproducibility and may be faster than fetching from the original source (especially for git/hg inputs, but probably also for github inputs - our binary cache is probably faster than GitHub's dynamically generated tarballs). Unfortunately this doesn't work for the top-level flake since even if we know the NAR hash of the tree, we don't know the other tree attributes such as revCount and lastModified. Fixes #3253.
2020-02-02Add TreeInfo::computeStorePath()Eelco Dolstra
2020-02-02CleanupEelco Dolstra
2020-02-02Renamed ref / resolvedRef -> lockedRefEelco Dolstra
2020-02-01Remove superfluous TreeInfo::rev fieldEelco Dolstra
2020-02-01Record TreeInfo in the lock fileEelco Dolstra
Necessary for #3253.
2020-02-01Factor out TreeInfoEelco Dolstra
2020-01-31Allow flake input specification via attributes rather than a URLEelco Dolstra
E.g. inputs.dwarffs = { type = "github"; owner = "edolstra"; repo = "dwarffs"; }; rather than inputs.dwarffs.url = github:edolstra/dwarffs;
2020-01-31CleanupEelco Dolstra
2020-01-31Change lock file format to use an attribute representation of flake refs ↵Eelco Dolstra
rather than URLs