Skip to content

Commit 656818e

Browse files
committed
Fix tests
1 parent bb75d5a commit 656818e

File tree

9 files changed

+18
-5
lines changed

9 files changed

+18
-5
lines changed

lib/system-nixpkgs-map.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ pkgs:
77
with pkgs;
88

99
let
10-
stdcplusplus = if pkgs.stdenv.hostPlatform.isWindows then [
10+
# On windows systems we need these to be propagatedBuildInputs so that the DLLs will be found.
11+
gcclibs = if pkgs.stdenv.hostPlatform.isWindows then [
1112
pkgs.windows.mcfgthreads
13+
# If we just use `pkgs.buildPackages.gcc.cc` here it breaks the `th-dlls` test. TODO figure out why exactly.
1214
(pkgs.evalPackages.runCommand "gcc-only" { nativeBuildInputs = [ pkgs.evalPackages.xorg.lndir ]; } ''
1315
mkdir $out
1416
lndir ${pkgs.buildPackages.gcc.cc} $out
@@ -18,8 +20,11 @@ in
1820
# -- linux
1921
{ crypto = [ openssl ];
2022
"c++" = []; # no libc++
21-
"stdc++" = stdcplusplus;
22-
"stdc++-6" = stdcplusplus;
23+
"stdc++" = gcclibs;
24+
"stdc++-6" = gcclibs;
25+
gcc_s_seh-1 = gcclibs;
26+
gcc_s = gcclibs;
27+
gcc = gcclibs;
2328
ssl = [ openssl ];
2429
z = [ zlib ];
2530
pcap = [ libpcap ];
@@ -106,8 +111,6 @@ in
106111
# this should be bundled with gcc.
107112
# if it's not we have more severe
108113
# issues anyway.
109-
gcc_s_seh-1 = null;
110-
gcc_s = null;
111114
ssl32 = null; eay32 = [ openssl ];
112115
iphlpapi = null; # IP Help API
113116
msvcrt = null; # this is the libc

overlays/windows.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ final: prev:
108108
network.setupBuildFlags = [];
109109
unix.setupBuildFlags = [];
110110

111+
# Newer Win32 includes hsc2hs, but we can get that that from the ghc derivation and
112+
# if the cabal plan included hsc2hs it winds up trying to build a windows version.
113+
Win32.components.library.build-tools = pkgs.lib.mkForce [];
111114
}
112115
# Fix dependencies and case-sensitive filesystem builds for unix-time.
113116
// pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isWindows {

test/cabal-simple-prof/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ with lib;
66
let
77
modules = [
88
{
9+
reinstallableLibGhc = true;
910
# Package has no exposed modules which causes
1011
# haddock: No input file(s)
1112
packages.cabal-simple.doHaddock = false;

test/cabal-simple/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ with lib;
66
let
77
modules = [
88
{
9+
reinstallableLibGhc = true;
910
# Package has no exposed modules which causes
1011
# haddock: No input file(s)
1112
packages.cabal-simple.doHaddock = false;

test/cabal-source-repo-comments/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ let
66
project = cabalProject' {
77
inherit compiler-nix-name;
88
src = testSrc "cabal-source-repo-comments";
9+
modules = [{ reinstallableLibGhc = true; }];
910
};
1011
packages = project.hsPkgs;
1112
in recurseIntoAttrs {

test/cabal-source-repo/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ let
66
project = cabalProject' {
77
inherit compiler-nix-name;
88
src = testSrc "cabal-source-repo";
9+
modules = [{ reinstallableLibGhc = true; }];
910
};
1011
packages = project.hsPkgs;
1112
in recurseIntoAttrs {

test/cabal-sublib/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ with lib;
66
let
77
modules = [
88
{
9+
reinstallableLibGhc = true;
910
# Package has no exposed modules which causes
1011
# haddock: No input file(s)
1112
packages.cabal-sublib.doHaddock = false;

test/call-cabal-project-to-nix/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ let
1818
plan-pkgs = importAndFilterProject {
1919
inherit (callProjectResults) projectNix sourceRepos src;
2020
};
21+
modules = [{ reinstallableLibGhc = true; }];
2122
};
2223
packages = pkgSet.config.hsPkgs;
2324

test/th-dlls/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ let
77
project = project' {
88
inherit compiler-nix-name;
99
src = testSrc "th-dlls";
10+
modules = [{ reinstallableLibGhc = true; }];
1011
};
1112

1213
packages = project.hsPkgs;

0 commit comments

Comments
 (0)