From 7388091a3ef5d52f8fb1782b1c99f6b60e8656ee Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 14 Jan 2020 12:16:02 +0100 Subject: [PATCH] Update flake --- flake.lock | 49 ++++++++++----- flake.nix | 2 +- lib/default.nix | 10 +++- tests/default.nix | 11 ++-- tests/log.dhall | 8 --- tests/log.nix | 13 ---- tests/solo5/blk.dhall | 46 +++++++------- tests/solo5/default.nix | 22 +++---- tests/solo5/net.dhall | 111 +++++++++++++++++++--------------- tests/solo5/net_2if.dhall | 123 +++++++++++++++++++++----------------- tests/solo5/simple.dhall | 32 ++++++---- 11 files changed, 233 insertions(+), 194 deletions(-) delete mode 100644 tests/log.dhall delete mode 100644 tests/log.nix diff --git a/flake.lock b/flake.lock index 0a53674..637b3ad 100644 --- a/flake.lock +++ b/flake.lock @@ -15,41 +15,60 @@ "url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b" } }, - "narHash": "sha256-NGbS2bymVuCQcanlBO41I6ZjSAZSLXhACK3qQU25zUs=", + "narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=", "originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake", - "url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=256810cd5adf1ae5862eed0ffdaab4cf49f6fe67" + "url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f" }, "genode": { "inputs": { + "dhall-haskell": { + "inputs": { + "nixpkgs": { + "inputs": {}, + "narHash": "sha256-wJg4DA700SoQbEz61448sR6BgxRa1R92K3vvCV1g+HY=", + "originalUrl": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148", + "url": "git+https://github.com/nixos/nixpkgs.git?ref=18.09-beta&rev=1d4de0d552ae9aa66a5b8dee5fb0650a4372d148" + }, + "nixpkgsStaticLinux": { + "inputs": {}, + "narHash": "sha256-famU3pJZ4vkElV9qc71HmyRVSvcrAhfMZ0UJKpmmKP8=", + "originalUrl": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working", + "url": "git+https://github.com/nh2/nixpkgs.git?ref=static-haskell-nix-stack-dhall-working&rev=925aac04f4ca58aceb83beef18cb7dae0715421b" + } + }, + "narHash": "sha256-KJl9ZLcMcEsLSPcwcWoc0Ac74/6HKC9LkVMeLwhyhlg=", + "originalUrl": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake", + "url": "git+https://github.com/dhall-lang/dhall-haskell?ref=flake&rev=aea28adf3d10ff1982aa4ddd176d1476251b932f" + }, "nixpkgs": { "inputs": {}, - "narHash": "sha256-aFixJLbJ9ubH5I6ST8k9NRjb/d7o/MAu1Qc/1Sv6eRY=", - "originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode", - "url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=489c8ae221fde2b011ebfc207eb3acb6573816ce" + "narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=", + "originalUrl": "github:ehmry/nixpkgs", + "url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011" } }, - "narHash": "sha256-7X6XqNVzCzMRqq0LV+NLdfS1h7gWi+psnRNl4mwdPCY=", + "narHash": "sha256-nQ42ujMS0QcOk0xCGzdsjZNQS2z3RuxthIRE8na5YL0=", "originalUrl": "git+https://gitea.c3d2.de/ehmry/genode.git", - "url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=32f8b603cb09bd85b8ad9092b55b4f3869da19d5" + "url": "git+https://gitea.c3d2.de/ehmry/genode.git?ref=master&rev=8c8606b375fb913864b0e51892da51eccf97df5f" }, "genode-depot": { "inputs": { "nixpkgs": { "inputs": {}, - "narHash": "sha256-aFixJLbJ9ubH5I6ST8k9NRjb/d7o/MAu1Qc/1Sv6eRY=", - "originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode", - "url": "git+https://gitea.c3d2.de/ehmry/nixpkgs.git?ref=genode&rev=489c8ae221fde2b011ebfc207eb3acb6573816ce" + "narHash": "sha256-NB+H7zK3BB//zM127FqgbG4iAfY+nS/IOyO+uGWA5Ho=", + "originalUrl": "nixpkgs", + "url": "github:edolstra/nixpkgs/7845bf5f4b3013df1cf036e9c9c3a55a30331db9" } }, - "narHash": "sha256-oPigZTib2kL1FVllm4xkf1l8eS9peXi1PFSdvrbYRK0=", + "narHash": "sha256-72QPBUP9EaIPGneWDLYIb6Wo5XR/lmijobDlaX8iKHA=", "originalUrl": "git+https://gitea.c3d2.de/ehmry/genode-depot.git", - "url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=a951bb013b0c053e858ccaf3672b7ab85580695d" + "url": "git+https://gitea.c3d2.de/ehmry/genode-depot.git?ref=master&rev=4e85cc4dd28d868d28815be4c925b1bb64d19939" }, "nixpkgs": { "inputs": {}, - "narHash": "sha256-aFixJLbJ9ubH5I6ST8k9NRjb/d7o/MAu1Qc/1Sv6eRY=", - "originalUrl": "git+https://gitea.c3d2.de/ehmry/nixpkgs?ref=genode", - "url": "git+https://gitea.c3d2.de/ehmry/nixpkgs?ref=genode&rev=489c8ae221fde2b011ebfc207eb3acb6573816ce" + "narHash": "sha256-EqxCk6ORqq4fkewWttpvks0VycBec9X9spAZ+Pq/CEI=", + "originalUrl": "github:ehmry/nixpkgs", + "url": "github:ehmry/nixpkgs/cf50f3b8bdc28832249afab6bca68acad832e011" } }, "version": 3 diff --git a/flake.nix b/flake.nix index 66902ba..804eadb 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ "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://gitea.c3d2.de/ehmry/nixpkgs?ref=genode"; + nixpkgs.uri = "github:ehmry/nixpkgs"; }; outputs = { self, dhall-haskell, genode-depot, genode, nixpkgs }: diff --git a/lib/default.nix b/lib/default.nix index 43860be..05b3a36 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,11 +1,15 @@ { system, localSystem, crossSystem, genodepkgs, nixpkgs, dhall-haskell, genode-depot }: let + thisSystem = builtins.getAttr system; hostPkgs = import nixpkgs { system = localSystem; - overlays = [ (self: super: { inherit (dhall-haskell.packages) dhall; }) ]; + overlays = [ + (self: super: { + inherit (builtins.getAttr localSystem dhall-haskell.packages) dhall; + }) + ]; }; - thisSystem = builtins.getAttr system; testPkgs = thisSystem genodepkgs.packages; depot = thisSystem genode-depot.packages; @@ -132,7 +136,7 @@ in { strip boot/image.elf # build ISO image - cp ${testPkgs.nova}/hypervisor* boot/hypervisor + cp ${testPkgs.NOVA}/hypervisor* boot/hypervisor cp ${./nova-isolinux.cfg} boot/syslinux/isolinux.cfg cp \ ${syslinuxDir}/isolinux.bin \ diff --git a/tests/default.nix b/tests/default.nix index 88fbf58..601334b 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -3,12 +3,11 @@ # SPDX-License-Identifier: LicenseRef-Hippocratic-1.1 let - tests = call: { - fs_report = call ./fs_report.nix { }; - log = call ./log.nix { }; - signal = call ./signal.nix { }; - # solo5 = call ./solo5 { }; - }; + tests = call: + { + fs_report = call ./fs_report.nix { }; + signal = call ./signal.nix { }; + } // call ./solo5 { }; in { self, system, localSystem, crossSystem, genodepkgs, nixpkgs, dhall-haskell, genode-depot, lib }: diff --git a/tests/log.dhall b/tests/log.dhall deleted file mode 100644 index 8050261..0000000 --- a/tests/log.dhall +++ /dev/null @@ -1,8 +0,0 @@ -let Genode = env:DHALL_GENODE ? ../dhall-genode/package.dhall - -in λ(_ : {}) - → Genode.Init::{ - , verbose = True - , children = - toMap { test-log = Genode.Init.Start::{ binary = "test-log" } } - } diff --git a/tests/log.nix b/tests/log.nix deleted file mode 100644 index 1ef6fed..0000000 --- a/tests/log.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ testEnv, pkgs, ... }: -with pkgs; - -testEnv.mkTest rec { - name = "log"; - meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ehmry ]; - - testConfig = testEnv.lib.renderDhallInit ./log.dhall "{=}"; - - bootModules.test-log = "${base}/bin/test-log"; - - testScript = "run_genode_until {Test done.} 10"; -} diff --git a/tests/solo5/blk.dhall b/tests/solo5/blk.dhall index 146b3c4..58302df 100644 --- a/tests/solo5/blk.dhall +++ b/tests/solo5/blk.dhall @@ -1,24 +1,30 @@ let Genode = env:DHALL_GENODE in λ(_ : {}) - → { solo5 = - Genode.Init.Start::{ - , binary = "test" - , resources = { caps = 256, ram = Genode.units.MiB 3 } - , routes = - [ Genode.ServiceRoute.parent "Timer" - , Genode.ServiceRoute.child "Block" "block" - ] - } - , block = - Genode.Init.Start::{ - , binary = "ram_block" - , provides = [ "Block" ] - , resources = { caps = 96, ram = Genode.units.MiB 9 } - , config = - Genode.Prelude.XML.text - '' - - '' - } + → Genode.Init::{ + , children = + toMap + { solo5 = + Genode.Init.Start::{ + , binary = "test" + , resources = { caps = 256, ram = Genode.units.MiB 3 } + , routes = + [ Genode.ServiceRoute.parent "Timer" + , Genode.ServiceRoute.child "Block" "block" + ] + } + , block = + Genode.Init.Start::{ + , binary = "ram_block" + , provides = [ "Block" ] + , resources = { caps = 96, ram = Genode.units.MiB 9 } + , config = + Some + ( Genode.Prelude.XML.text + '' + + '' + ) + } + } } diff --git a/tests/solo5/default.nix b/tests/solo5/default.nix index 195e291..bd50484 100644 --- a/tests/solo5/default.nix +++ b/tests/solo5/default.nix @@ -1,4 +1,4 @@ -{ testEnv, pkgs }: +{ testEnv, pkgs, ... }: with pkgs; let @@ -28,7 +28,7 @@ let name = "blk"; bootModules = { test = "${solo5.tests}/bin/solo5-test_blk"; - ram_block = "${genode-os}/bin/ram_block"; + ram_block = "${os}/bin/ram_block"; }; testConfig = testEnv.lib.renderDhallInit ./blk.dhall "{=}"; } @@ -69,7 +69,7 @@ let name = "mft_maxdevices"; bootModules = { test = "${solo5.tests}/bin/solo5-test_mft_maxdevices"; - rom_block = "${genode-os}/bin/rom_block"; + rom_block = "${os}/bin/rom_block"; }; testConfig = testEnv.lib.renderDhallInit ./mft_maxdevices.dhall "{=}"; } @@ -79,9 +79,9 @@ let name = "net"; bootModules = { test = "${solo5.tests}/bin/solo5-test_net"; - nic_bridge = "${genode-os}/bin/nic_bridge"; - nic_loopback = "${genode-os}/bin/nic_loopback"; - ping = "${genode-os}/bin/ping"; + nic_bridge = "${os}/bin/nic_bridge"; + nic_loopback = "${os}/bin/nic_loopback"; + ping = "${os}/bin/ping"; }; testConfig = testEnv.lib.renderDhallInit ./net.dhall "{=}"; testScript = '' @@ -93,10 +93,10 @@ let name = "net_2if"; bootModules = { test = "${solo5.tests}/bin/solo5-test_net_2if"; - sequence = "${genode-os}/bin/sequence"; - nic_bridge = "${genode-os}/bin/nic_bridge"; - nic_loopback = "${genode-os}/bin/nic_loopback"; - ping = "${genode-os}/bin/ping"; + sequence = "${os}/bin/sequence"; + nic_bridge = "${os}/bin/nic_bridge"; + nic_loopback = "${os}/bin/nic_loopback"; + ping = "${os}/bin/ping"; }; testConfig = testEnv.lib.renderDhallInit ./net_2if.dhall "{=}"; testScript = '' @@ -151,7 +151,7 @@ let name = "time"; bootModules = { test = "${solo5.tests}/bin/solo5-test_time"; - rtc_drv = "${genode-os}/bin/rtc_drv"; + rtc_drv = "${os}/bin/rtc_drv"; }; testConfig = testEnv.lib.renderDhallInit ./time.dhall "{=}"; } diff --git a/tests/solo5/net.dhall b/tests/solo5/net.dhall index 01f91fe..1775afc 100644 --- a/tests/solo5/net.dhall +++ b/tests/solo5/net.dhall @@ -1,53 +1,66 @@ let Genode = env:DHALL_GENODE in λ(_ : {}) - → { nic = - Genode.Init.Start::{ binary = "nic_loopback", provides = [ "Nic" ] } - , bridge = - Genode.Init.Start::{ - , binary = "nic_bridge" - , resources = { caps = 200, ram = Genode.units.MiB 6 } - , provides = [ "Nic" ] - , routes = [ Genode.ServiceRoute.child "Nic" "nic" ] - , config = - Genode.Prelude.XML.text - '' - - - - - '' - } - , solo5 = - Genode.Init.Start::{ - , binary = "test" - , resources = { caps = 256, ram = Genode.units.MiB 3 } - , routes = - [ Genode.ServiceRoute.parent "Timer" - , Genode.ServiceRoute.child "Nic" "bridge" - ] - , config = - Genode.Prelude.XML.text - '' - limit - '' - } - , ping = - Genode.Init.Start::{ - , binary = "ping" - , resources = { caps = 128, ram = Genode.units.MiB 6 } - , routes = - [ Genode.ServiceRoute.parent "Timer" - , Genode.ServiceRoute.child "Nic" "bridge" - ] - , config = - Genode.Prelude.XML.text - '' - - '' - } + → Genode.Init::{ + , children = + toMap + { nic = + Genode.Init.Start::{ + , binary = "nic_loopback" + , provides = [ "Nic" ] + } + , bridge = + Genode.Init.Start::{ + , binary = "nic_bridge" + , resources = { caps = 200, ram = Genode.units.MiB 6 } + , provides = [ "Nic" ] + , routes = [ Genode.ServiceRoute.child "Nic" "nic" ] + , config = + Some + ( Genode.Prelude.XML.text + '' + + + + + '' + ) + } + , solo5 = + Genode.Init.Start::{ + , binary = "test" + , resources = { caps = 256, ram = Genode.units.MiB 3 } + , routes = + [ Genode.ServiceRoute.parent "Timer" + , Genode.ServiceRoute.child "Nic" "bridge" + ] + , config = + Some + ( Genode.Prelude.XML.text + '' + limit + '' + ) + } + , ping = + Genode.Init.Start::{ + , binary = "ping" + , resources = { caps = 128, ram = Genode.units.MiB 6 } + , routes = + [ Genode.ServiceRoute.parent "Timer" + , Genode.ServiceRoute.child "Nic" "bridge" + ] + , config = + Some + ( Genode.Prelude.XML.text + '' + + '' + ) + } + } } diff --git a/tests/solo5/net_2if.dhall b/tests/solo5/net_2if.dhall index 993b0d8..a73a39e 100644 --- a/tests/solo5/net_2if.dhall +++ b/tests/solo5/net_2if.dhall @@ -3,59 +3,72 @@ let Genode = env:DHALL_GENODE in λ ( _ : {} ) - → { nic = - Genode.Init.Start::{ binary = "nic_loopback", provides = [ "Nic" ] } - , bridge = - Genode.Init.Start::{ - , binary = "nic_bridge" - , resources = { caps = 200, ram = Genode.units.MiB 8 } - , provides = [ "Nic" ] - , routes = [ Genode.ServiceRoute.child "Nic" "nic" ] - , config = - Genode.Prelude.XML.text - '' - - - - - - '' - } - , solo5 = - Genode.Init.Start::{ - , binary = "test" - , resources = { caps = 256, ram = Genode.units.MiB 4 } - , routes = - [ Genode.ServiceRoute.parent "Timer" - , Genode.ServiceRoute.child "Nic" "bridge" - ] - , config = - Genode.Prelude.XML.text - '' - limit - '' - } - , clients = - Genode.Init.Start::{ - , binary = "sequence" - , resources = { caps = 256, ram = Genode.units.MiB 8 } - , routes = - [ Genode.ServiceRoute.parent "Timer" - , Genode.ServiceRoute.child "Nic" "bridge" - ] - , config = - Genode.Prelude.XML.text - '' - - - - - - - - - - - '' - } + → Genode.Init::{ + , children = + toMap + { nic = + Genode.Init.Start::{ + , binary = "nic_loopback" + , provides = [ "Nic" ] + } + , bridge = + Genode.Init.Start::{ + , binary = "nic_bridge" + , resources = { caps = 200, ram = Genode.units.MiB 8 } + , provides = [ "Nic" ] + , routes = [ Genode.ServiceRoute.child "Nic" "nic" ] + , config = + Some + ( Genode.Prelude.XML.text + '' + + + + + + '' + ) + } + , solo5 = + Genode.Init.Start::{ + , binary = "test" + , resources = { caps = 256, ram = Genode.units.MiB 4 } + , routes = + [ Genode.ServiceRoute.parent "Timer" + , Genode.ServiceRoute.child "Nic" "bridge" + ] + , config = + Some + ( Genode.Prelude.XML.text + '' + limit + '' + ) + } + , clients = + Genode.Init.Start::{ + , binary = "sequence" + , resources = { caps = 256, ram = Genode.units.MiB 8 } + , routes = + [ Genode.ServiceRoute.parent "Timer" + , Genode.ServiceRoute.child "Nic" "bridge" + ] + , config = + Some + ( Genode.Prelude.XML.text + '' + + + + + + + + + + + '' + ) + } + } } diff --git a/tests/solo5/simple.dhall b/tests/solo5/simple.dhall index eebc594..065c2f3 100644 --- a/tests/solo5/simple.dhall +++ b/tests/solo5/simple.dhall @@ -1,17 +1,23 @@ let Genode = env:DHALL_GENODE in λ(_ : {}) - → { solo5 = - Genode.Init.Start::{ - , binary = "test" - , resources = { caps = 256, ram = Genode.units.MiB 3 } - , routes = [ Genode.ServiceRoute.parent "Timer" ] - , config = - Genode.Prelude.XML.text - '' - - Hello_Solo5 - - '' - } + → Genode.Init::{ + , children = + toMap + { solo5 = + Genode.Init.Start::{ + , binary = "test" + , resources = { caps = 256, ram = Genode.units.MiB 3 } + , routes = [ Genode.ServiceRoute.parent "Timer" ] + , config = + Some + ( Genode.Prelude.XML.text + '' + + Hello_Solo5 + + '' + ) + } + } }