File tree Expand file tree Collapse file tree 3 files changed +141
-27
lines changed
Expand file tree Collapse file tree 3 files changed +141
-27
lines changed Original file line number Diff line number Diff line change 11name : " Nix CI"
2- on : [pull_request, push, workflow_dispatch]
2+ on :
3+ push :
4+ branches :
5+ - ' master'
6+ pull_request :
7+ branches :
8+ - ' master'
9+ workflow_dispatch :
10+
311jobs :
412 nix-build :
5- name : ${{ matrix.pretty }} with nix (${{ matrix.derivation }})
613 runs-on : ubuntu-latest
7- strategy :
8- fail-fast : false
9- matrix :
10- derivation : [agda2lambox]
11- include :
12- - pretty : " Compile agda2lambox"
13- derivation : agda2lambox
1414 steps :
15- - uses : actions/checkout@v4
16- - uses : cachix/install-nix-action@v22
17- - uses : DeterminateSystems/magic-nix-cache-action@v4
18- - run : nix build .#${{ matrix.derivation }} --print-build-logs
15+ - uses : actions/checkout@v5
16+ - uses : cachix/install-nix-action@v31
17+ - run : nix build ./#agda2lambox --print-build-logs
Original file line number Diff line number Diff line change 11{
22 description = "agda2lambox" ;
33
4- inputs . nixpkgs . url = github:NixOS/nixpkgs ;
5- inputs . flake-utils . url = github:numtide/flake-utils ;
4+ inputs = {
5+ nixpkgs . url = "github:NixOS/nixpkgs" ;
6+ flake-utils . url = "github:numtide/flake-utils" ;
7+ agda = {
8+ url = "github:agda/agda" ;
9+ flake = false ;
10+ } ;
11+ } ;
612
7- outputs = { self , nixpkgs , flake-utils } :
8- flake-utils . lib . eachDefaultSystem ( system :
13+ outputs =
14+ {
15+ self ,
16+ nixpkgs ,
17+ flake-utils ,
18+ ...
19+ } @inputs :
20+ let
21+ overlay-agda2lambox =
22+ final : prev :
23+ let
24+ hLib = prev . haskell . lib ;
25+ lib = prev . lib ;
26+ src = lib . fileset . toSource {
27+ root = ./. ;
28+ fileset = lib . fileset . unions [
29+ ./src
30+ ./agda2lambox.cabal
31+ ] ;
32+ } ;
33+ in
34+ {
35+ haskellPackages = prev . haskellPackages . extend (
36+ hfinal : hprev : {
37+ sexpresso = hLib . doJailbreak ( hLib . markUnbroken hprev . sexpresso ) ;
38+ Agda = hLib . dontCheck ( hLib . dontHaddock ( hfinal . callCabal2nix "Agda" inputs . agda { } ) ) ;
39+ agda2lambox = hLib . doJailbreak ( hfinal . callCabal2nix "agda2lambox" ./. { } ) ;
40+ }
41+ ) ;
42+ } ;
43+ in
44+ flake-utils . lib . eachDefaultSystem (
45+ system :
946 let
10- pkgs = import nixpkgs { inherit system ; } ;
11- agda2lambox = pkgs . haskellPackages . callCabal2nix "agda2lambox" ./. { } ;
12- in {
47+ pkgs = import nixpkgs {
48+ inherit system ;
49+ overlays = [
50+ overlay-agda2lambox
51+ ] ;
52+ } ;
53+ agda2lambox = pkgs . haskellPackages . agda2lambox ;
54+ in
55+ {
1356 packages = {
1457 inherit agda2lambox ;
1558 default = agda2lambox ;
1659 } ;
1760 devShells . default = pkgs . haskellPackages . shellFor {
18- packages = p : [ agda2lambox ] ;
61+ packages = p : [ p . agda2lambox ] ;
1962 buildInputs = with pkgs . haskellPackages ; [
2063 cabal-install
2164 cabal2nix
2265 haskell-language-server
23- pkgs . agda
2466 ] ;
2567 } ;
26- } ) ;
68+ }
69+ ) ;
2770}
You can’t perform that action at this time.
0 commit comments