Skip to content

Commit

Permalink
Make cross-compilation work again.
Browse files Browse the repository at this point in the history
 To correctly eval the haskell.nix project we need the pkgs for the current
 system, not the cross system one.

 cf. input-output-hk/haskell.nix#1666
  • Loading branch information
jbgi committed Oct 4, 2022
1 parent c606fb6 commit 871dc4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions __std__/nix/plutus/library/plutus-project.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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" ];

Expand Down Expand Up @@ -191,4 +193,4 @@ let

in

project
project
1 change: 1 addition & 0 deletions nix/pkgs/haskell/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 871dc4e

Please sign in to comment.