From 871dc4e256dfad5f9ff6b7e3b99940af0cab60fd Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Giraudeau Date: Tue, 4 Oct 2022 11:45:11 +0200 Subject: [PATCH] Make cross-compilation work again. To correctly eval the haskell.nix project we need the pkgs for the current system, not the cross system one. cf. https://github.com/input-output-hk/haskell.nix/issues/1666 --- __std__/nix/plutus/library/plutus-project.nix | 6 ++++-- nix/pkgs/haskell/haskell.nix | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/__std__/nix/plutus/library/plutus-project.nix b/__std__/nix/plutus/library/plutus-project.nix index a9386f6e413..0cefa9dd83a 100644 --- a/__std__/nix/plutus/library/plutus-project.nix +++ b/__std__/nix/plutus/library/plutus-project.nix @@ -22,6 +22,8 @@ let compiler-nix-name = library.ghc-compiler-nix-name; + evalPackages = library.pkgs; + # This is incredibly difficult to get right, almost everything goes wrong, # see https://github.com/input-output-hk/haskell.nix/issues/496 src = library.haskell-nix.haskellLib.cleanSourceWith { @@ -149,7 +151,7 @@ let platforms = lib.platforms.linux; }; - # Werror everything. + # Werror everything. # This is a pain, see https://github.com/input-output-hk/haskell.nix/issues/519 plutus-core.ghcOptions = [ "-Werror" ]; @@ -191,4 +193,4 @@ let in -project +project diff --git a/nix/pkgs/haskell/haskell.nix b/nix/pkgs/haskell/haskell.nix index f4f9469bec6..29ddfa5040c 100644 --- a/nix/pkgs/haskell/haskell.nix +++ b/nix/pkgs/haskell/haskell.nix @@ -20,6 +20,7 @@ let r-packages = with rPackages; [ R tidyverse dplyr stringr MASS plotly shiny shinyjs purrr ]; project = haskell-nix.cabalProject' ({ pkgs, ... }: { inherit compiler-nix-name; + evalPackages = pkgs.buildPackages.buildPackages; # This is incredibly difficult to get right, almost everything goes wrong, # see https://github.com/input-output-hk/haskell.nix/issues/496 src = let root = ../../../.; in