Break up default.nix into two more files

This commit is contained in:
kat witch 2021-08-06 04:11:06 +01:00
parent f17cb11f9f
commit 042bd05bcf
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
3 changed files with 40 additions and 36 deletions

12
cache.nix Normal file
View file

@ -0,0 +1,12 @@
{ lib, sources }:
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.hexchen {}).sources;
all = attrValues local; #++ attrValues hexchen;
allStr = toString all;
};