2
0
Fork 0
genodepkgs/flake.nix

52 lines
1.7 KiB
Nix

{
edition = 201909;
description = "Genode packages";
inputs = {
dhall-haskell.uri =
"git+https://github.com/dhall-lang/dhall-haskell?ref=flake";
genode-depot.uri = "git+https://gitea.c3d2.de/ehmry/genode-depot.git";
genode.uri = "git+https://gitea.c3d2.de/ehmry/genode.git";
nixpkgs.uri = "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode";
};
outputs = { self, dhall-haskell, genode-depot, genode, nixpkgs }:
let
systems = [ "x86_64-genode" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in {
lib = nixpkgs.lib.forAllCrossSystems
({ system, localSystem, crossSystem }:
nixpkgs.lib // (import ./lib {
inherit system localSystem crossSystem nixpkgs dhall-haskell
genode-depot;
genodepkgs = self;
}));
packages = nixpkgs.lib.forAllCrossSystems
({ system, localSystem, crossSystem }:
let thisSystem = builtins.getAttr system;
in import ./packages.nix {
inherit system nixpkgs;
depot = thisSystem genode-depot.packages;
genode = thisSystem genode.packages;
} // builtins.getAttr system genode.packages);
checks = nixpkgs.lib.forAllCrossSystems
({ system, localSystem, crossSystem }:
import ./tests {
inherit self system localSystem crossSystem nixpkgs dhall-haskell
genode-depot;
genodepkgs = builtins.getAttr system self.packages;
lib = builtins.getAttr system self.lib;
}) // {
x86_64-linux = self.checks.x86_64-linux-x86_64-genode;
};
};
}