2
0
Fork 0
genodepkgs/flake.nix

63 lines
2.1 KiB
Nix
Raw Normal View History

2019-10-28 20:19:52 +01:00
{
edition = 201909;
2019-11-05 17:38:47 +01:00
description = "Genode packages";
2019-10-28 20:19:52 +01:00
inputs = {
2019-11-05 16:00:56 +01:00
dhall-haskell.uri =
"git+https://github.com/dhall-lang/dhall-haskell?ref=flake";
2019-11-19 16:36:52 +01:00
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";
2019-10-28 20:19:52 +01:00
};
2019-11-19 16:36:52 +01:00
outputs = { self, dhall-haskell, genode-depot, genode, nixpkgs }:
2019-11-05 17:38:47 +01:00
let
systems = [ "x86_64-genode" ];
2019-10-28 20:19:52 +01:00
2019-11-05 17:38:47 +01:00
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
2019-10-28 20:19:52 +01:00
2019-11-05 17:38:47 +01:00
in {
2019-10-28 20:19:52 +01:00
2019-12-02 16:39:52 +01:00
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;
2019-12-02 16:39:52 +01:00
checks = nixpkgs.lib.forAllCrossSystems
({ system, localSystem, crossSystem }:
let thisSystem = builtins.getAttr system;
in import ./tests {
2019-12-02 16:39:52 +01:00
inherit self system localSystem crossSystem nixpkgs dhall-haskell
genode-depot;
genodepkgs = thisSystem self.packages;
lib = thisSystem self.lib;
2019-12-02 16:39:52 +01:00
}) // {
x86_64-linux.nixos =
let pkgs' = nixpkgs.legacyPackages.x86_64-linux // { };
in import ./nixos/test.nix {
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"; };
2019-12-02 16:39:52 +01:00
};
nixosModule = import ./nixos;
2019-10-28 20:19:52 +01:00
};
2019-10-28 20:19:52 +01:00
}