Pass a flake to itself as "self"
This commit is contained in:
parent
3ddb6d1833
commit
939bee06cd
2 changed files with 8 additions and 4 deletions
10
flake.nix
10
flake.nix
|
@ -3,13 +3,15 @@
|
|||
|
||||
description = "The purely functional package manager";
|
||||
|
||||
requires = [ flake:nixpkgs ];
|
||||
epoch = 2019;
|
||||
|
||||
provides = flakes: rec {
|
||||
requires = [ "nixpkgs" ];
|
||||
|
||||
provides = deps: rec {
|
||||
|
||||
hydraJobs = import ./release.nix {
|
||||
nix = flakes.nix; # => flakes.self?
|
||||
nixpkgs = flakes.nixpkgs;
|
||||
nix = deps.self;
|
||||
nixpkgs = deps.nixpkgs;
|
||||
};
|
||||
|
||||
packages.nix = hydraJobs.build.x86_64-linux;
|
||||
|
|
|
@ -441,6 +441,8 @@ void callFlake(EvalState & state, const Dependencies & flake, Value & v)
|
|||
auto vProvides = state.allocAttr(v, state.symbols.create("provides"));
|
||||
mkApp(*vProvides, *flake.flake.vProvides, v);
|
||||
|
||||
v.attrs->push_back(Attr(state.symbols.create("self"), &v));
|
||||
|
||||
v.attrs->sort();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue