aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix22
1 files changed, 16 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index 866fbb5..5a40ece 100644
--- a/flake.nix
+++ b/flake.nix
@@ -29,6 +29,12 @@
(pkgs.lib.filterAttrs
(_: type: type == "directory")
(builtins.readDir ./zkvms));
+
+ guests = [ null ] ++ (builtins.attrNames
+ (pkgs.lib.filterAttrs
+ (_: type: type == "directory")
+ (builtins.readDir ./guests)));
+
foldr = pkgs.lib.foldr;
createPackages = guestName: let
@@ -46,14 +52,18 @@
{}
zkvms;
- guests = [ null ] ++ (builtins.attrNames
- (pkgs.lib.filterAttrs
- (_: type: type == "directory")
- (builtins.readDir ./guests)));
- in {
- packages.${system} = pkgs.lib.foldr
+ hostPackages = foldr
(guest: accum: accum // (createPackages guest))
{}
guests;
+
+ guestPackages = foldr
+ (guest: accum: accum // {
+ ${guest} = callPackage ./guest.nix { inherit guest; inherit zkvms; inherit hostPackages; };
+ })
+ {}
+ guests;
+ in {
+ packages.${system} = hostPackages // guestPackages;
};
}