Add global imports to Dhall files

post-mortem
Emery Hemingway 1 year ago
parent c7a64a59ef
commit efa6cd7274
  1. 39
      lib/compile-boot.dhall
  2. 25
      lib/linux-script.dhall
  3. 4
      nixos-modules/eris/cached_fs_rom.dhall
  4. 4
      nixos-modules/eris/rom-vfs.dhall
  5. 4
      nixos-modules/gui/consoleLog.dhall
  6. 4
      nixos-modules/hardware/acpi_drv.dhall
  7. 4
      nixos-modules/services/tor.dhall
  8. 4
      nixos-modules/store-wrapper.dhall
  9. 4
      tests/bash.dhall
  10. 4
      tests/hello.dhall
  11. 4
      tests/posix.dhall
  12. 4
      tests/test.dhall
  13. 4
      tests/vmm_arm.dhall
  14. 4
      tests/vmm_x86.dhall

@ -1,5 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Prelude = Sigil.Prelude
@ -8,10 +9,10 @@ let BootModules = Sigil.BootModules
let RomEntry = Prelude.Map.Entry Text BootModules.ROM.Type
let compile =
λ(addressType : Text)
λ(boot : Sigil.Boot.Type)
λ(out : Text)
let NaturalIndex = { index : Natural, value : Text }
λ(addressType : Text)
λ(boot : Sigil.Boot.Type)
λ(out : Text)
let NaturalIndex = { index : Natural, value : Text }
let TextIndex = { index : Text, value : Text }
@ -20,8 +21,8 @@ let compile =
let moduleValues =
let f =
λ(e : RomEntry)
merge
λ(e : RomEntry)
merge
{ RomText = λ(text : Text) → ".ascii ${Text/show text}"
, RomPath = λ(path : Text) → ".incbin ${Text/show path}"
}
@ -31,16 +32,16 @@ let compile =
# [ ".incbin \"${out}/config\"" ]
let map =
λ(list : List Text)
λ(f : TextIndex → Text)
let indexedNatural = Prelude.List.indexed Text list
λ(list : List Text)
λ(f : TextIndex → Text)
let indexedNatural = Prelude.List.indexed Text list
let indexed =
Prelude.List.map
NaturalIndex
TextIndex
( λ(x : NaturalIndex)
{ index = Prelude.Natural.show x.index
( λ(x : NaturalIndex)
{ index = Prelude.Natural.show x.index
, value = x.value
}
)
@ -67,8 +68,8 @@ let compile =
''
++ mapNames
( λ(m : TextIndex)
''
( λ(m : TextIndex)
''
${addressType} _boot_module_${m.index}_name
${addressType} _boot_module_${m.index}_begin
${addressType} _boot_module_${m.index}_end - _boot_module_${m.index}_begin
@ -80,8 +81,8 @@ let compile =
''
++ mapNames
( λ(m : TextIndex)
''
( λ(m : TextIndex)
''
.p2align DATA_ACCESS_ALIGNM_LOG2
_boot_module_${m.index}_name:
.string "${m.value}"
@ -97,8 +98,8 @@ let compile =
''
++ mapValues
( λ(m : TextIndex)
''
( λ(m : TextIndex)
''
.p2align MIN_PAGE_SIZE_LOG2
_boot_module_${m.index}_begin:
${m.value}

@ -1,5 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Prelude = Sigil.Prelude
@ -8,27 +9,27 @@ let Args = { config : Sigil.Init.Type, rom : Sigil.BootModules.Type } : Type
let RomEntry = Prelude.Map.Entry Text Sigil.BootModules.ROM.Type
let addLine =
λ(e : RomEntry)
λ(script : Text)
merge
λ(e : RomEntry)
λ(script : Text)
merge
{ RomText =
λ(rom : Text)
''
λ(rom : Text)
''
${script}
echo ${Text/show rom} > ${Text/show e.mapKey}
''
, RomPath =
λ(rom : Text)
''
λ(rom : Text)
''
${script}
ln -s ${Text/show rom} ${Text/show e.mapKey}
''
}
e.mapValue
in λ(args : Args)
λ(out : Text)
{ config = Sigil.Init.render args.config
in λ(args : Args)
λ(out : Text)
{ config = Sigil.Init.render args.config
, script =
Prelude.List.fold
RomEntry

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Init = Sigil.Init

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Init = Sigil.Init

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Prelude = Sigil.Prelude

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Init = Sigil.Init

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Init = Sigil.Init

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Prelude = Sigil.Prelude

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Prelude = Sigil.Prelude

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Init = Sigil.Init

@ -1,4 +1,6 @@
let Test = ./test.dhall ? env:DHALL_SIGIL_TEST
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Prelude = Sigil.Prelude

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Prelude = Sigil.Prelude

@ -1,4 +1,6 @@
let Test = ./test.dhall ? env:DHALL_SIGIL_TEST
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let XML = Sigil.Prelude.XML

@ -1,4 +1,6 @@
let Sigil = env:DHALL_SIGIL
let Sigil =
env:DHALL_SIGIL
? https://git.sr.ht/~ehmry/dhall-sigil/blob/trunk/package.dhall
let Init = Sigil.Init

Loading…
Cancel
Save