Skip to content

Commit

Permalink
Merge pull request #160 from jakeisnt/add-menhirLib-dep
Browse files Browse the repository at this point in the history
add menhirLib to Nix dependencies
  • Loading branch information
denismerigoux authored Nov 29, 2021
2 parents 38a0c1a + 2fb80a6 commit 520ef75
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-nix:
build-nix-21-05:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand All @@ -21,6 +21,16 @@ jobs:
nix_path: nixpkgs=channel:nixos-21.05
- run: nix-build release.nix
- run: nix-shell --run "echo OK"

build-nix-unstable:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: cachix/[email protected]
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build release.nix
- run: nix-shell --run "echo OK"

build:
# The type of runner that the job will run on
Expand Down
30 changes: 25 additions & 5 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
{ lib, fetchFromGitHub, buildDunePackage, ansiterminal, sedlex_2, menhir
, unionfind, bindlib, cmdliner, re, zarith, zarith_stubs_js, ocamlgraph
, calendar, visitors, benchmark, js_of_ocaml, js_of_ocaml-ppx, camomile, cppo }:
{ lib
, fetchFromGitHub
, buildDunePackage
, ansiterminal
, sedlex_2
, menhir
, unionfind
, bindlib
, cmdliner
, re
, zarith
, zarith_stubs_js
, ocamlgraph
, calendar
, visitors
, benchmark
, js_of_ocaml
, js_of_ocaml-ppx
, camomile
, cppo
, menhirLib ? null #for nixos-unstable compatibility.
}:

buildDunePackage rec {
pname = "catala";
Expand All @@ -16,6 +35,7 @@ buildDunePackage rec {
ansiterminal
sedlex_2
menhir
menhirLib
cmdliner
re
zarith
Expand All @@ -31,7 +51,7 @@ buildDunePackage rec {

unionfind
bindlib
];
] ++ (if isNull menhirLib then [ ] else [ menhirLib ]);
doCheck = true;

patches = [ ./.nix/no-web.patch ];
Expand All @@ -43,4 +63,4 @@ buildDunePackage rec {
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}
}

0 comments on commit 520ef75

Please sign in to comment.