Skip to content

Commit

Permalink
Disable broken cross compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Jun 11, 2024
1 parent 71bf575 commit 496a76a
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,21 @@
# ... and construct a flake from the cabal.project file.
# We use cabalProject' to ensure we don't build the plan for
# all systems.
perSystemFlake = (nixpkgs.haskell-nix.cabalProject' rec {
perSystemFlake = (nixpkgs.haskell-nix.cabalProject' ({pkgs, lib, config, ...}: {
src = ./.;
name = "cardano-prelude";
compiler-nix-name = "ghc92";
flake.variants = {
ghc810.compiler-nix-name = nixpkgs.lib.mkForce "ghc810";
ghc96.compiler-nix-name = nixpkgs.lib.mkForce "ghc96";
ghc98.compiler-nix-name = nixpkgs.lib.mkForce "ghc98";
ghc910.compiler-nix-name = nixpkgs.lib.mkForce "ghc910";
flake = {
variants = {
ghc810.compiler-nix-name = lib.mkForce "ghc810";
ghc96.compiler-nix-name = lib.mkForce "ghc96";
ghc98.compiler-nix-name = lib.mkForce "ghc98";
ghc910.compiler-nix-name = lib.mkForce "ghc910";
};

# we also want cross compilation to windows.
crossPlatforms = p:
lib.optional (builtins.elem config.compiler-nix-name ["ghc8107" "ghc928"]) p.mingwW64;
};

# CHaP input map, so we can find CHaP packages (needs to be more
Expand All @@ -54,11 +60,7 @@
inputMap = {
"https://input-output-hk.github.io/cardano-haskell-packages" = inputs.CHaP;
};
}).flake (
# we also want cross compilation to windows.
nixpkgs.lib.optionalAttrs (system == "x86_64-linux") {
crossPlatforms = p: [p.mingwW64];
});
}).flake {};
in perSystemFlake
); in let pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
# This is not ideal, it means this flake will not evaluate properly on
Expand Down

0 comments on commit 496a76a

Please sign in to comment.