diff --git a/dhall/genode.nix b/dhall/genode.nix
index c01ee34..59e5f96 100644
--- a/dhall/genode.nix
+++ b/dhall/genode.nix
@@ -6,6 +6,6 @@
fetchgit {
url = "https://git.sr.ht/~ehmry/dhall-genode";
- rev = "4e05e7bf88e53c81a8f00460673fd48e858c6dfc";
- sha256 = "0y92jinqr26wlrychk8mi58kqwmy4y25c2ffks3r3m78i8andi8y";
+ rev = "c9a9c18dc8dd45198dbf0a53732ca02079fee0fd";
+ sha256 = "1fcfyfcnm6snpagf3ii70p8vdy7na9lv6c3izlckyp6gvgadyyjn";
}
diff --git a/lib/default.nix b/lib/default.nix
index 130b1b6..bba52b8 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -24,7 +24,7 @@ in {
renderDhallInit = path: args:
hostPkgs.runCommand "init.xml" {
preferLocalBuild = true;
- buildInputs = [ hostPkgs.dhall ];
+ buildInputs = with hostPkgs; [ dhall libxml2 ];
initConfig = path;
initArgs = args;
DHALL_PRELUDE = "${testPkgs.dhallPrelude}/package.dhall";
@@ -32,8 +32,9 @@ in {
} ''
export XDG_CACHE_HOME=$NIX_BUILD_TOP
dhall text \
- <<< 'let Prelude = env:DHALL_GENODE in Prelude.Init.render (Prelude.Init::{ children = toMap (env:initConfig env:initArgs) })' \
+ <<< 'let Prelude = env:DHALL_GENODE in Prelude.Init.render (env:initConfig env:initArgs)' \
> $out
+ xmllint --noout $out
'';
x86_64-genode.buildNovaIso = { name, rom }:
diff --git a/tests/libc.dhall b/tests/libc.dhall
index 6e5ec7f..93b9797 100644
--- a/tests/libc.dhall
+++ b/tests/libc.dhall
@@ -1,24 +1,33 @@
let Genode = env:DHALL_GENODE
-in λ(_ : {})
- → { test-libc =
- Genode.Init.Start::{
- , binary = "test-libc"
- , resources = { caps = 200, ram = Genode.units.MiB 400 }
- , routes = [ Genode.ServiceRoute.parent "Timer" ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
-
- 2019-08-20 15:01
-
-
-
-
- ''
+in λ ( _
+ : {}
+ )
+ → Genode.Init::{
+ , verbose = True
+ , children =
+ toMap
+ { test-libc =
+ Genode.Init.Start::{
+ , binary = "test-libc"
+ , resources = { caps = 200, ram = Genode.units.MiB 400 }
+ , routes = [ Genode.ServiceRoute.parent "Timer" ]
+ , config =
+ Some
+ ( Genode.Prelude.XML.text
+ ''
+
+
+
+
+ 2019-08-20 15:01
+
+
+
+
+ ''
+ )
+ }
+ : Genode.Init.Start.Type
}
- : Genode.Init.Start.Type
}
diff --git a/tests/log.dhall b/tests/log.dhall
index 3016eee..8050261 100644
--- a/tests/log.dhall
+++ b/tests/log.dhall
@@ -1,3 +1,8 @@
let Genode = env:DHALL_GENODE ? ../dhall-genode/package.dhall
-in λ(_ : {}) → { test-log = Genode.Init.Start::{ binary = "test-log" } }
+in λ(_ : {})
+ → Genode.Init::{
+ , verbose = True
+ , children =
+ toMap { test-log = Genode.Init.Start::{ binary = "test-log" } }
+ }
diff --git a/tests/pci.dhall b/tests/pci.dhall
index 1adbc45..abd04e8 100644
--- a/tests/pci.dhall
+++ b/tests/pci.dhall
@@ -3,62 +3,72 @@ let Genode = env:DHALL_GENODE
in λ ( _
: {}
)
- → { test-pci =
- Genode.Init.Start::{
- , binary = "test-pci"
- , resources = { caps = 96, ram = Genode.units.MiB 2 }
- , routes = [ Genode.ServiceRoute.child "Platform" "platform_drv" ]
- }
- , acpi_report_rom =
- Genode.Init.Start::{
- , binary = "report_rom"
- , resources = { caps = 96, ram = Genode.units.MiB 2 }
- , provides = [ "ROM", "Report" ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
-
- ''
- }
- , acpi_drv =
- Genode.Init.Start::{
- , binary = "acpi_drv"
- , resources = { caps = 400, ram = Genode.units.MiB 4 }
- , constrainPhys = True
- , provides = [ "Platform", "Acpi" ]
- , routes =
- [ Genode.ServiceRoute.child "Report" "acpi_report_rom"
- , Genode.ServiceRoute.parent "IRQ"
- , Genode.ServiceRoute.parent "IO_MEM"
- , Genode.ServiceRoute.parent "IO_PORT"
- ]
- }
- , platform_drv =
- Genode.Init.Start::{
- , binary = "platform_drv"
- , resources = { caps = 800, ram = Genode.units.MiB 4 }
- , constrainPhys = True
- , provides = [ "Platform", "Acpi" ]
- , routes =
- [ Genode.ServiceRoute.parent "Timer"
- , Genode.ServiceRoute.parent "IRQ"
- , Genode.ServiceRoute.parent "IO_MEM"
- , Genode.ServiceRoute.parent "IO_PORT"
- , Genode.ServiceRoute.childLabel
- "ROM"
- "acpi_report_rom"
- (Some "acpi")
- (None Text)
- ]
- , config =
- Genode.Prelude.XML.text
- ''
-
-
-
- ''
- }
+ → Genode.Init::{
+ , verbose = True
+ , children =
+ toMap
+ { test-pci =
+ Genode.Init.Start::{
+ , binary = "test-pci"
+ , resources = { caps = 96, ram = Genode.units.MiB 2 }
+ , routes =
+ [ Genode.ServiceRoute.child "Platform" "platform_drv" ]
+ }
+ , acpi_report_rom =
+ Genode.Init.Start::{
+ , binary = "report_rom"
+ , resources = { caps = 96, ram = Genode.units.MiB 2 }
+ , provides = [ "ROM", "Report" ]
+ , config =
+ Some
+ ( Genode.Prelude.XML.text
+ ''
+
+
+
+
+ ''
+ )
+ }
+ , acpi_drv =
+ Genode.Init.Start::{
+ , binary = "acpi_drv"
+ , resources = { caps = 400, ram = Genode.units.MiB 4 }
+ , constrainPhys = True
+ , provides = [ "Platform", "Acpi" ]
+ , routes =
+ [ Genode.ServiceRoute.child "Report" "acpi_report_rom"
+ , Genode.ServiceRoute.parent "IRQ"
+ , Genode.ServiceRoute.parent "IO_MEM"
+ , Genode.ServiceRoute.parent "IO_PORT"
+ ]
+ }
+ , platform_drv =
+ Genode.Init.Start::{
+ , binary = "platform_drv"
+ , resources = { caps = 800, ram = Genode.units.MiB 4 }
+ , constrainPhys = True
+ , provides = [ "Platform", "Acpi" ]
+ , routes =
+ [ Genode.ServiceRoute.parent "Timer"
+ , Genode.ServiceRoute.parent "IRQ"
+ , Genode.ServiceRoute.parent "IO_MEM"
+ , Genode.ServiceRoute.parent "IO_PORT"
+ , Genode.ServiceRoute.childLabel
+ "ROM"
+ "acpi_report_rom"
+ (Some "acpi")
+ (None Text)
+ ]
+ , config =
+ Some
+ ( Genode.Prelude.XML.text
+ ''
+
+
+
+ ''
+ )
+ }
+ }
}
diff --git a/tests/signal.dhall b/tests/signal.dhall
index d541262..6d11a24 100644
--- a/tests/signal.dhall
+++ b/tests/signal.dhall
@@ -1,11 +1,16 @@
let Genode = env:DHALL_GENODE ? ../dhall-genode/package.dhall
in λ(_ : {})
- → { test-signal =
- Genode.Init.Start::{
- , binary = "test-signal"
- , resources = { caps = 500, ram = Genode.units.MiB 10 }
- , routes = [ Genode.ServiceRoute.parent "Timer" ]
+ → Genode.Init::{
+ , verbose = True
+ , children =
+ toMap
+ { test-signal =
+ Genode.Init.Start::{
+ , binary = "test-signal"
+ , resources = { caps = 500, ram = Genode.units.MiB 10 }
+ , routes = [ Genode.ServiceRoute.parent "Timer" ]
+ }
+ : Genode.Init.Start.Type
}
- : Genode.Init.Start.Type
}