1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 04:01:47 +02:00

Some effort to minimize flake dependencies

For example, if the top-level flake depends on
"nixpkgs/release-19.03", and one of its dependencies depends on
"nixpkgs", then the latter will be mapped to "nixpkgs/release-19.03",
rather than whatever the default branch of "nixpkgs" is. Thus you get
only one "nixpkgs" dependency rather than two.

This currently only works in a breadth-first way, so the other way
around (i.e. if the top-level flake depends on "nixpkgs", and a
dependency depends on "nixpkgs/release-19.03") still results in two
"nixpkgs" dependencies.
This commit is contained in:
Eelco Dolstra 2019-09-18 23:59:45 +02:00
parent c67407172d
commit aeb7148afd
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 94 additions and 26 deletions

View file

@ -80,13 +80,6 @@ struct Flake
Flake getFlake(EvalState & state, const FlakeRef & flakeRef, bool allowLookup);
/* If 'allowLookup' is true, then resolve 'flakeRef' using the
registries. */
FlakeRef maybeLookupFlake(
EvalState & state,
const FlakeRef & flakeRef,
bool allowLookup);
/* Fingerprint of a locked flake; used as a cache key. */
typedef Hash Fingerprint;