Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix.flake: simplify nix setup #4640

Merged
merged 11 commits into from
Aug 15, 2023
Merged

nix.flake: simplify nix setup #4640

merged 11 commits into from
Aug 15, 2023

Conversation

coot
Copy link
Contributor

@coot coot commented Aug 10, 2023

This PR provides nix.flake which builds on

  • x86_64-linux,
  • x86_64-darwin, and
  • aarch64-darwin

on x86_64-linux it cross compoiles to Windows. All project settings are set in `./scripts/ci/cabal.project.local.{Windows,Windows.CrossCompile,Linux}. They are also used for GitHub actions, and that's the preferred way to change configuration option.

The tests & benchmarks are disabled in the cabal.project.local.Windows.CrossCompile.

The cabal.project.local.Linux is used on all the above platforms; cabal.project.local.Windows is only used on GitHub actions.

Nix is using two compilers:

  • ghc-8.10.7 and
  • ghc-9.6.2

GitHub Actions, only build with ghc-8.10.7 on windows-latest.

There is a shell available with nix develop which gives access to ghc-9.6.2 and some other build tools.

Based on cardano-cli nix.flake.

@coot coot force-pushed the coot/flake.nix branch 11 times, most recently from 3c6bb27 to 42f91c9 Compare August 14, 2023 08:56
@coot coot marked this pull request as ready for review August 14, 2023 09:02
@coot coot requested review from newhoggy, a team and bolt12 as code owners August 14, 2023 09:02
@coot coot force-pushed the coot/flake.nix branch 5 times, most recently from 5ea18aa to 1483dfd Compare August 14, 2023 10:39
@coot coot removed the request for review from newhoggy August 14, 2023 14:47
@coot coot added nix This includes CI, nix changes or cabal dependencies CI Issues / PRs related to CI labels Aug 14, 2023
@coot coot added this pull request to the merge queue Aug 14, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 14, 2023
@coot coot added this pull request to the merge queue Aug 14, 2023
@coot coot removed this pull request from the merge queue due to a manual request Aug 14, 2023
@coot
Copy link
Contributor Author

coot commented Aug 14, 2023

I explicitly disabled cross compilation for now. Once the devx team will find out what's wrong we will re-enable it.

@coot coot enabled auto-merge August 14, 2023 17:33
@coot coot force-pushed the coot/flake.nix branch 2 times, most recently from 6feb796 to e516500 Compare August 15, 2023 05:03
coot added 10 commits August 15, 2023 07:57
Based on `cardano-cli` `nix.flake`.
This patch also disables testing when cross compiling with Nix.
GHC-9.6.2 is only used on Linux.
This solves the problem of providing shell with a HLS.  The drawback is
that we now build with both `8.10.7` and `9.6.2` on all three platforms:
`x86_64-linux`, `x86_64-darwin`, `aarch64-darwin`.  Previously we only
used `9.6.2` on `x86_64-linux`.
@coot coot added this pull request to the merge queue Aug 15, 2023
Merged via the queue into master with commit 9c89cd3 Aug 15, 2023
7 of 8 checks passed
@coot coot deleted the coot/flake.nix branch August 15, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Issues / PRs related to CI nix This includes CI, nix changes or cabal dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants