Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
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.

default.nix 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # SPDX-FileCopyrightText: Emery Hemingway
  2. #
  3. # SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
  4. let
  5. tests = call: {
  6. fs_report = call ./fs_report.nix { };
  7. libc = call ./libc.nix { };
  8. log = call ./log.nix { };
  9. signal = call ./signal.nix { };
  10. solo5 = call ./solo5.nix { };
  11. solo5-ping = call ./solo5-ping.nix { };
  12. };
  13. in
  14. { genodepkgs ? import ./../default.nix { }
  15. , nixpkgs ? import ./../nixpkgs.nix
  16. , dhall-haskell
  17. }:
  18. let
  19. hostPkgs = import nixpkgs {
  20. overlays = [ (self: super: { dhall = dhall-haskell.linux-dhall; }) ];
  21. };
  22. testPkgs = genodepkgs;
  23. lib = hostPkgs.lib // {
  24. renderDhallInit = path: args:
  25. hostPkgs.runCommand "init.xml" {
  26. buildInputs = [ hostPkgs.dhall ];
  27. initConfig = path;
  28. initArgs = args;
  29. DHALL_PRELUDE = "${testPkgs.dhallPackages.prelude}/package.dhall";
  30. DHALL_GENODE = "${testPkgs.dhallPackages.genode}/package.dhall";
  31. } ''
  32. export XDG_CACHE_HOME=$NIX_BUILD_TOP
  33. echo 'let Prelude = env:DHALL_GENODE in Prelude.Init.render (Prelude.Init.defaults ⫽ { children = toMap (env:initConfig env:initArgs) })' \
  34. | dhall text \
  35. > $out
  36. '';
  37. };
  38. in {
  39. x86_64 = {
  40. linux = tests
  41. (import ./driver-linux.nix { inherit testPkgs hostPkgs lib; }).callTest;
  42. nova = tests
  43. (import ./driver-nova.nix { inherit testPkgs hostPkgs lib; }).callTest;
  44. };
  45. }