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

Update haskell.nix and disable GHC 8.10 Windows #507

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 51 additions & 56 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 15 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
description = "cardano-base";

inputs = {
# freeze haskell.nix prior to the nixpkgs update that broken 8.10 cross-windows
haskellNix.url = "github:input-output-hk/haskell.nix?ref=cb139fa956158397aa398186bb32dd26f7318784";
haskellNix.url = "github:input-output-hk/haskell.nix";
# allow us to independently update hackageNix
haskellNix.inputs.hackage.follows = "hackageNix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
Expand Down Expand Up @@ -56,7 +55,7 @@
inherit (nixpkgs) lib;

# see flake `variants` below for alternative compilers
defaultCompiler = "ghc964";
defaultCompiler = "ghc966";
fourmoluVersion = "0.16.2.0";
# We use cabalProject' to ensure we don't build the plan for
# all systems.
Expand Down Expand Up @@ -112,11 +111,23 @@
# Skip cross compilers for the shell
crossPlatforms = _: [];
};
flake = {
# on linux, build/test other supported compilers
variants = lib.genAttrs ["ghc8107"] (compiler-nix-name: {
inherit compiler-nix-name;
});
# we also want cross compilation to windows.
crossPlatforms = p: lib.optional (system == "x86_64-linux" && config.compiler-nix-name != "ghc8107") p.mingwW64;
};

# package customizations as needed. Where cabal.project is not
# specific enough, or doesn't allow setting these.
modules = [
({pkgs, ...}: {
# Packages that are not always in the plan need to be listed so that haskell.nix does not
# complain about overrides on packages that do not exist.
package-keys = ["katip" "ekg" "slotting" "lens" "nonempty-vector"];

# Packages we wish to ignore version bounds of.
# This is similar to jailbreakCabal, however it
# does not require any messing with cabal files.
Expand Down Expand Up @@ -148,17 +159,7 @@
];
});
# ... and construct a flake from the cabal project
flake =
cabalProject.flake (
lib.optionalAttrs (system == "x86_64-linux") {
# on linux, build/test other supported compilers
variants = lib.genAttrs ["ghc8107"] (compiler-nix-name: {
inherit compiler-nix-name;
});
# we also want cross compilation to windows.
crossPlatforms = p: [p.mingwW64];
}
);
flake = cabalProject.flake {};
in
lib.recursiveUpdate flake rec {
project = cabalProject;
Expand Down
Loading