mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
ensure sources are cached locally before building
This commit is contained in:
parent
6a3b8ef8ca
commit
a8bfcdf17f
3 changed files with 28 additions and 5 deletions
12
default.nix
12
default.nix
|
|
@ -19,8 +19,16 @@ rec {
|
|||
|
||||
runners = import ./runners.nix { inherit lib; inherit (deploy) target; };
|
||||
|
||||
getSources = sources: lib.attrValues (lib.removeAttrs sources [ "__functor" ]);
|
||||
sourceCache = map(value: if lib.isDerivation value.outPath then value.outPath else value) (getSources sources ++ getSources (import sources.nix-hexchen {}).sources);
|
||||
sourceCache = with lib; let
|
||||
getSources = sources: removeAttrs sources [ "__functor" "dorkfiles" ];
|
||||
source2drv = value: if isDerivation value.outPath then value.outPath else value;
|
||||
sources2drvs = sources: mapAttrs (_: source2drv) (getSources sources);
|
||||
in recurseIntoAttrs rec {
|
||||
local = sources2drvs sources;
|
||||
hexchen = sources2drvs (import sources.nix-hexchen {}).sources;
|
||||
all = attrValues local ++ attrValues hexchen;
|
||||
allStr = toString all;
|
||||
};
|
||||
|
||||
deploy = import ./lib/deploy.nix {
|
||||
inherit pkgs sources;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue