aboutsummaryrefslogtreecommitdiff
path: root/tests/flakes.sh
AgeCommit message (Collapse)Author
2019-06-04Shorter syntax for referencing flake outputsEelco Dolstra
Fixes #2819.
2019-06-04Make non-flake inputs lazyEelco Dolstra
Also add a proper test for non-flake inputs.
2019-06-04Fix testEelco Dolstra
2019-06-04Fix GC closure generationEelco Dolstra
2019-06-04Make flake input fetching lazyEelco Dolstra
As long as the flake input is locked, it is now only fetched when it is evaluated (e.g. "nixpkgs" is fetched when "inputs.nixpkgs.<something>" is evaluated). This required adding an "id" attribute to the members of "inputs" in lockfiles, e.g. "inputs": { "nixpkgs/release-19.03": { "id": "nixpkgs", "inputs": {}, "narHash": "sha256-eYtxncIMFVmOHaHBtTdPGcs/AnJqKqA6tHCm0UmPYQU=", "nonFlakeInputs": {}, "uri": "github:edolstra/nixpkgs/e9d5882bb861dc48f8d46960e7c820efdbe8f9c1" } } because the flake ID needs to be known beforehand to construct the "inputs" attrset. Fixes #2913.
2019-06-03Made epochs more fine-grainedNick Van den Broeck
Fixes #2894
2019-05-31Fix handling of bare flakerefs containing a colonEelco Dolstra
2019-05-31Allow bare flakerefs as installablesEelco Dolstra
So now $ nix build blender-bin works and builds the default package from that flake. You don't need to add a colon at the end anymore.
2019-05-31Rename requires -> inputs, provides -> outputsEelco Dolstra
Issue #2828.
2019-05-29Add date of last commit to SourceInfoEelco Dolstra
This is primarily useful for version string generation, where we need a monotonically increasing number. The revcount is the preferred thing to use, but isn't available for GitHub flakes (since it requires fetching the entire history). The last commit timestamp OTOH can be extracted from GitHub tarballs.
2019-05-28Added nonFlakeRequires testNick Van den Broeck
Fixes #2888
2019-05-23Register flake source trees as GC rootsEelco Dolstra
This ensures that flakes don't get garbage-collected, which is important to get nix-channel-like behaviour. For example, running $ nix build hydra: will create a GC root ~/.cache/nix/flake-closures/hydra -> /nix/store/xarfiqcwa4w8r4qpz1a769xxs8c3phgn-flake-closure where the contents/references of the linked file in the store are the flake source trees used by the 'hydra' flake: /nix/store/n6d5f5lkpfjbmkyby0nlg8y1wbkmbc7i-source /nix/store/vbkg4zy1qd29fnhflsv9k2j9jnbqd5m2-source /nix/store/z46xni7d47s5wk694359mq9ay353ar94-source Note that this in itself is not enough to allow offline use; the fetcher for the flakeref (e.g. fetchGit or downloadCached) must not fail if it cannot fetch the latest version of the file, so long as it knows a cached version. Issue #2868.
2019-05-23Fix testsEelco Dolstra
https://hydra.nixos.org/eval/1521131
2019-05-22Add a test for the registry GC rootEelco Dolstra
2019-05-22Check the flake epochEelco Dolstra
Closes #2883.
2019-05-22Add some testsEelco Dolstra
2019-05-17Lockfile handling in `resolveFlake` is fixedNick Van den Broeck
2019-05-16Give errors in resolveFlakeNick Van den Broeck
If DontUpdate but the lockfile isn't correct
2019-05-16Fixed issue 65Nick Van den Broeck
lockfile updating
2019-05-15Disable tests introduced by PR #82Eelco Dolstra
This PR was not intended to be merged until those tests were actually passing. So disable them for now to unbreak the flakes branch. https://hydra.nixos.org/eval/1519271
2019-05-09Add test for indirect flake dependenciesEelco Dolstra
I.e. flake3 depends on flake2 which depends on flake1. Currently this fails with error: indirect flake reference 'flake1' is not allowed because we're not propagating lockfiles downwards properly.
2019-05-09Add currently failing test for #81Eelco Dolstra
2019-05-07Add basic flake testsEelco Dolstra