hive.nix: Add automatic patching of nixpkgs
This commit is contained in:
parent
da20afa6a6
commit
660a35c7bb
1 changed files with 11 additions and 3 deletions
14
hive.nix
14
hive.nix
|
@ -18,10 +18,18 @@ let
|
||||||
inherit (metadata.nodes.${node}) deployment;
|
inherit (metadata.nodes.${node}) deployment;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkNixpkgs = node: import sources."nixos-${metadata.nodes.${node}.nixpkgs}" { };
|
mkNixpkgs = node:
|
||||||
|
let version = "nixos-${metadata.nodes.${node}.nixpkgs}"; in
|
||||||
|
(import sources.${version} { }).applyPatches {
|
||||||
|
name = "${version}-patched";
|
||||||
|
src = sources.${version};
|
||||||
|
patches = (import ./nix-patches).${version} or [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
mkNixpkgs' = node: import (mkNixpkgs node) { };
|
||||||
|
|
||||||
mkArgs = node: {
|
mkArgs = node: {
|
||||||
dgn-lib = import ./lib { inherit ((mkNixpkgs node)) lib; };
|
dgn-lib = import ./lib { inherit ((mkNixpkgs' node)) lib; };
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes = builtins.attrNames metadata.nodes;
|
nodes = builtins.attrNames metadata.nodes;
|
||||||
|
@ -29,7 +37,7 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
meta = {
|
meta = {
|
||||||
nodeNixpkgs = lib.mapSingleFuse mkNixpkgs nodes;
|
nodeNixpkgs = lib.mapSingleFuse mkNixpkgs' nodes;
|
||||||
|
|
||||||
specialArgs = { inherit sources; meta = metadata; };
|
specialArgs = { inherit sources; meta = metadata; };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue