From d65bf985d9698e57dea9906b174b92dd311aff9c Mon Sep 17 00:00:00 2001 From: Jacob Chvatal Date: Sun, 28 Nov 2021 12:33:00 -0500 Subject: [PATCH 1/3] add menhirlib to dependencies --- default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 2531e9875..f6450c4fe 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,5 @@ { lib, fetchFromGitHub, buildDunePackage, ansiterminal, sedlex_2, menhir -, unionfind, bindlib, cmdliner, re, zarith, zarith_stubs_js, ocamlgraph +, menhirLib, unionfind, bindlib, cmdliner, re, zarith, zarith_stubs_js, ocamlgraph , calendar, visitors, benchmark, js_of_ocaml, js_of_ocaml-ppx, camomile, cppo }: buildDunePackage rec { @@ -16,6 +16,7 @@ buildDunePackage rec { ansiterminal sedlex_2 menhir + menhirLib cmdliner re zarith From e09db29aa47a0dfa386b262352391c2496e56676 Mon Sep 17 00:00:00 2001 From: Alain Date: Mon, 29 Nov 2021 11:24:03 +0100 Subject: [PATCH 2/3] add a check to whenever menhirLib exists If it does, it add menhirLib as a dependency. Else, ignore it. --- default.nix | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index f6450c4fe..fef100e2c 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,25 @@ -{ lib, fetchFromGitHub, buildDunePackage, ansiterminal, sedlex_2, menhir -, menhirLib, 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"; @@ -32,7 +51,7 @@ buildDunePackage rec { unionfind bindlib - ]; + ] ++ (if isNull menhirLib then [ ] else [ menhirLib ]); doCheck = true; patches = [ ./.nix/no-web.patch ]; @@ -44,4 +63,4 @@ buildDunePackage rec { license = licenses.asl20; maintainers = with maintainers; [ ]; }; -} +} \ No newline at end of file From 2fb80a6f8a47c065a7739eb23c5a8dd3f8038fd5 Mon Sep 17 00:00:00 2001 From: Alain Date: Mon, 29 Nov 2021 11:25:18 +0100 Subject: [PATCH 3/3] add CI check to nix-unstable rename check build-nix to build-nix-21.05 --- .github/workflows/build.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a8663bf2..b4c8a8c60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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/checkout@v2.3.4 @@ -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/checkout@v2.3.4 + - uses: cachix/install-nix-action@v14.1 + 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