Skip to content
Snippets Groups Projects
Commit 5d8ab107 authored by Daniel Firth's avatar Daniel Firth
Browse files

horizon.dhall: init

Use dhall definitions from horizon-spec
parent a5cf5311
Branches
Tags
No related merge requests found
...@@ -3,29 +3,12 @@ let Prelude = ...@@ -3,29 +3,12 @@ let Prelude =
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v20.1.0/Prelude/package.dhall ? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v20.1.0/Prelude/package.dhall
sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98 sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
let HsSrc = let H = ./horizon.dhall
< FromHackage : { name : Text, version : Text }
| FromGit :
{ url : Text, revision : Optional Text, subdir : Optional Text }
>
let Modifiers =
{ Type = { doJailbreak : Bool, doCheck : Bool }
, default = { doJailbreak = True, doCheck = False }
}
let Attr = λ(a : Type) → { mapKey : Text, mapValue : a }
let HsPkg = {source : HsSrc, modifiers : Modifiers.Type }
let Attr
: ∀(x : Type) → Type
= λ(x : Type) → { mapKey : Text, mapValue : x }
let Step = { script : List Text } let Step = { script : List Text }
let toStep let toStep
: ∀(id : Text) → ∀(prefix : Text) → ∀(x : Text) → Attr Step : ∀(id : Text) → ∀(prefix : Text) → ∀(x : Text) → H.Attr Step
= λ(id : Text) → = λ(id : Text) →
λ(prefix : Text) → λ(prefix : Text) →
λ(x : Text) → λ(x : Text) →
...@@ -33,12 +16,12 @@ let toStep ...@@ -33,12 +16,12 @@ let toStep
, mapValue.script = [ "nix build -L .#${prefix}.${x}" ] , mapValue.script = [ "nix build -L .#${prefix}.${x}" ]
} }
let input = Prelude.Map.keys Text HsPkg ./manifest.dhall let input = Prelude.Map.keys Text H.HsPkg.Type ./manifest.dhall
let packages = let packages =
Prelude.List.map Prelude.List.map
(Text) (Text)
(Attr Step) (H.Attr Step)
( λ(x : Text) → ( λ(x : Text) →
toStep "Package ${x}" "packages.x86_64-linux" x toStep "Package ${x}" "packages.x86_64-linux" x
) )
......
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
"horizon-gen-nix": { "horizon-gen-nix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1667926671, "lastModified": 1667975665,
"narHash": "sha256-TWD8yl8GSasvcFzn1ytS6/riemJ9zLi9xvc2Uhqi8QQ=", "narHash": "sha256-XQ6ZsZKa77M2Z0GtFsDhqhrR1HRe6R58xut2KfJmlCY=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "0b00a1c2c4e8f8ed169bb732ea35c4da4ea3e387", "rev": "29d95902966aa28ba09bed2d6e5edbabb0a153b5",
"revCount": 39, "revCount": 41,
"type": "git", "type": "git",
"url": "https://gitlab.homotopic.tech/horizon/horizon-gen-nix" "url": "https://gitlab.homotopic.tech/horizon/horizon-gen-nix"
}, },
......
https://gitlab.homotopic.tech/horizon/horizon-spec/-/raw/0.0.0.2/dhall/package.dhall
sha256:d68590d5517ee9693c9e7fc7e5c3412255c34d2c3f795d354e81a667405a09f3
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment