2
0
Fork 0
genodepkgs/flake.nix

68 lines
2.2 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://github.com/ehmry/nixpkgs?ref=genode-19.09";
};
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;
} // thisSystem genode.packages);
defaultPackage.x86_64-linux =
self.packages.x86_64-linux-x86_64-genode.base-linux;
checks = nixpkgs.lib.forAllCrossSystems
({ system, localSystem, crossSystem }:
let thisSystem = builtins.getAttr system;
in import ./tests {
inherit self system localSystem crossSystem nixpkgs dhall-haskell
genode-depot;
genodepkgs = thisSystem self.packages;
lib = thisSystem self.lib;
}) // {
x86_64-linux.nixos =
let pkgs' = nixpkgs.legacyPackages.x86_64-linux // { };
in import ./nixos/test.nix {
inherit self;
nixpkgs = nixpkgs.outPath;
genodepkgs = self.packages.x86_64-linux-x86_64-genode;
depot = genode-depot.packages.x86_64-linux-x86_64-genode;
} { system = "x86_64-linux"; };
};
nixosModule = import ./nixos;
devShell.x86_64-linux = self.packages.x86_64-linux-x86_64-genode.stdenv;
};
}