dhall-sigil: update for priority rename

post-mortem
Emery Hemingway 2021-04-14 10:17:54 +02:00
parent e8f433559a
commit c8671b63d8
4 changed files with 39 additions and 64 deletions

View File

@ -1,30 +0,0 @@
{ config, pkgs, lib, ... }:
{
config = lib.mkIf (config.genode.core.storeBackend == "fs") {
genode.core.children.eris_vfs = let
vfsRump = lib.getEris' "lib" pkgs.genodePackages.rump "vfs_rump.lib.so";
in {
package = pkgs.genodePackages.vfs;
extraErisInputs = [ vfsRump ];
configFile = pkgs.writeText "rom-vfs.dhall" ''
let Sigil = env:DHALL_SIGIL
let VFS = Sigil.VFS
in ${./rom-vfs.dhall}
"${config.block.partitions.store.guid}"
Sigil.Init.Resources::{ caps = 256, ram = Sigil.units.MiB 32 }
( VFS.vfs
[ VFS.leafAttrs
"plugin"
(toMap { load = "${vfsRump.cap}", fs = "cd9660", ram = "12M", writeable="no" })
]
)
'';
};
};
}

View File

@ -1,32 +0,0 @@
{ config, pkgs, lib, ... }:
{
config = lib.mkIf (config.genode.core.storeBackend == "memory") {
genode.core.children.eris_vfs = {
package = pkgs.genodePackages.vfs;
configFile = pkgs.writeText "rom-vfs.dhall" ''
let Sigil = env:DHALL_SIGIL
let VFS = Sigil.VFS
in ${./rom-vfs.dhall}
${../partition-type}
Sigil.Init.Resources::{ ram = Sigil.units.MiB 4 }
( VFS.vfs
[ VFS.leafAttrs
"tar"
( toMap
{ name =
"${config.system.build.tarball}/tarball/${config.system.build.tarball.fileName}.tar"
}
)
]
)
'';
};
};
}

View File

@ -4,8 +4,8 @@ dhallPackages.buildDhallDirectoryPackage {
name = "dhall-sigil";
src = fetchgit {
url = "https://git.sr.ht/~ehmry/dhall-sigil";
rev = "e5a9bc19b23609b76512bc82173487671bd843db";
sha256 = "0inr4a0dn0201bcklj2x9inshqcmsn26fbh9wnyv7wac384fj47k";
rev = "fbdec3209f6e5aaa95abd2d1121164e31896b1df";
sha256 = "0h19nm0wrflnl16klnwgcj8316fnx0v7d3rqnv87pq63dar4sjk9";
};
dependencies = [ dhallPackages.Prelude ];
}

37
tests/backdrop.dhall Normal file
View File

@ -0,0 +1,37 @@
let Sigil = env:DHALL_SIGIL
let Init = Sigil.Init
let Child = Init.Child
let Libc = Sigil.Libc
in λ(binary : Text) →
Child.flat
Child.Attributes::{
, binary
, resources = Sigil.Init.Resources::{
, caps = 256
, ram = Sigil.units.MiB 16
}
, config =
let cfg =
Libc.toConfig
Libc::{
, rtc = None Text
, vfs =
[ VFS.dir "dev" [ VFS.leaf "null", VFS.leaf "log" ]
, VFS.leafAttrs "rom" (toMap { name = "backdrop.png" })
]
}
in cfg
with content =
cfg.content
# [ XML.leaf
{ name = "image"
, attributes = toMap
{ png = "backdrop.png", anchor = "bottomright" }
}
]
}