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

replace .cachix.dhall with devour-fake

parent c51a5684
Branches
1 merge request!7replace .cachix.dhall with devour-fake
let Prelude =
env:DHALL_PRELUDE
? https://raw.githubusercontent.com/dhall-lang/dhall-lang/v20.1.0/Prelude/package.dhall
sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
let H =
https://gitlab.horizon-haskell.net/dhall/horizon-spec/-/raw/0.10.0/horizon-spec/package.dhall
let toStep
: Text → Text
= λ(x : Text) →
"nix build --accept-flake-config --json .#${x} | jq -r '.[].outputs | to_entries[].value' | cachix push horizon"
let toEchoStep
: Text → Text
= λ(x : Text) → "echo \"${toStep x}\""
let input =
Prelude.Map.keys
Text
H.HaskellPackage.Type
( merge
{ MakePackageSet =
λ(x : H.PackageSetExportSettings) → x.packageSet.packages
, MakeOverlay = λ(x : H.OverlayExportSettings) → x.overlay.packages
}
./horizon.dhall
)
let packages = Prelude.List.map Text Text toEchoStep (input : List Text)
in "("
++ Prelude.List.fold
Text
packages
Text
(λ(x : Text) → λ(y : Text) → x ++ ";" ++ y)
""
++ ") | parallel -j 16"
stages: stages:
- generate - generate
- check - flake
- cache - cache
generate-flake-ci: generate-flake-ci:
stage: generate stage: generate
script: nix run "git+https://gitlab.homotopic.tech/haskell/flake-to-gitlab-ci?ref=refs/tags/0.2.2.0" > flake-ci.yml script:
- nix run "git+https://gitlab.nixica.dev/haskell/flake-to-gitlab-ci?ref=refs/tags/0.2.4.1" > flake-ci-x86_64-linux.yml
artifacts: artifacts:
paths: paths:
- flake-ci.yml - flake-ci-x86_64-linux.yml
flake-ci: x86_64-linux-ci:
stage: check stage: flake
trigger: trigger:
include: include:
- artifact: flake-ci.yml - artifact: flake-ci-x86_64-linux.yml
job: generate-flake-ci job: generate-flake-ci
strategy: depend strategy: depend
...@@ -24,4 +25,5 @@ cachix: ...@@ -24,4 +25,5 @@ cachix:
refs: refs:
- master - master
- cachix - cachix
script: nix-shell -p jq cachix parallel --command 'dhall --file .cachix.dhall | dhall text | bash' script:
- nix-shell -p cachix --command "nix build github:srid/devour-flake -L --no-link --print-out-paths --override-input flake . | xargs cat | cachix push horizon"
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