Sigil OS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
sigil/tests/default.nix

51 lines
1.4 KiB

# SPDX-FileCopyrightText: Emery Hemingway
#
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
let
tests = call: {
fs_report = call ./fs_report.nix { };
libc = call ./libc.nix { };
log = call ./log.nix { };
signal = call ./signal.nix { };
solo5 = call ./solo5.nix { };
solo5-ping = call ./solo5-ping.nix { };
};
in
{ genodepkgs ? import ./../default.nix { }
, nixpkgs ? import ./../nixpkgs.nix
, dhall-haskell
}:
let
hostPkgs = import nixpkgs {
overlays = [ (self: super: { dhall = dhall-haskell.linux-dhall; }) ];
};
testPkgs = genodepkgs;
lib = hostPkgs.lib // {
renderDhallInit = path: args:
hostPkgs.runCommand "init.xml" {
buildInputs = [ hostPkgs.dhall ];
initConfig = path;
initArgs = args;
DHALL_PRELUDE = "${testPkgs.dhallPackages.prelude}/package.dhall";
DHALL_GENODE = "${testPkgs.dhallPackages.genode}/package.dhall";
} ''
export XDG_CACHE_HOME=$NIX_BUILD_TOP
echo 'let Prelude = env:DHALL_GENODE in Prelude.Init.render (Prelude.Init.defaults { children = toMap (env:initConfig env:initArgs) })' \
| dhall text \
> $out
'';
};
in {
x86_64 = {
linux = tests
(import ./driver-linux.nix { inherit testPkgs hostPkgs lib; }).callTest;
nova = tests
(import ./driver-nova.nix { inherit testPkgs hostPkgs lib; }).callTest;
};
}