File tree Expand file tree Collapse file tree 9 files changed +18
-5
lines changed
call-cabal-project-to-nix Expand file tree Collapse file tree 9 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 7
7
with pkgs ;
8
8
9
9
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 [
11
12
pkgs . windows . mcfgthreads
13
+ # If we just use `pkgs.buildPackages.gcc.cc` here it breaks the `th-dlls` test. TODO figure out why exactly.
12
14
( pkgs . evalPackages . runCommand "gcc-only" { nativeBuildInputs = [ pkgs . evalPackages . xorg . lndir ] ; } ''
13
15
mkdir $out
14
16
lndir ${ pkgs . buildPackages . gcc . cc } $out
18
20
# -- linux
19
21
{ crypto = [ openssl ] ;
20
22
"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 ;
23
28
ssl = [ openssl ] ;
24
29
z = [ zlib ] ;
25
30
pcap = [ libpcap ] ;
106
111
# this should be bundled with gcc.
107
112
# if it's not we have more severe
108
113
# issues anyway.
109
- gcc_s_seh-1 = null ;
110
- gcc_s = null ;
111
114
ssl32 = null ; eay32 = [ openssl ] ;
112
115
iphlpapi = null ; # IP Help API
113
116
msvcrt = null ; # this is the libc
Original file line number Diff line number Diff line change @@ -108,6 +108,9 @@ final: prev:
108
108
network . setupBuildFlags = [ ] ;
109
109
unix . setupBuildFlags = [ ] ;
110
110
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 [ ] ;
111
114
}
112
115
# Fix dependencies and case-sensitive filesystem builds for unix-time.
113
116
// pkgs . lib . optionalAttrs pkgs . stdenv . hostPlatform . isWindows {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ with lib;
6
6
let
7
7
modules = [
8
8
{
9
+ reinstallableLibGhc = true ;
9
10
# Package has no exposed modules which causes
10
11
# haddock: No input file(s)
11
12
packages . cabal-simple . doHaddock = false ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ with lib;
6
6
let
7
7
modules = [
8
8
{
9
+ reinstallableLibGhc = true ;
9
10
# Package has no exposed modules which causes
10
11
# haddock: No input file(s)
11
12
packages . cabal-simple . doHaddock = false ;
Original file line number Diff line number Diff line change 6
6
project = cabalProject' {
7
7
inherit compiler-nix-name ;
8
8
src = testSrc "cabal-source-repo-comments" ;
9
+ modules = [ { reinstallableLibGhc = true ; } ] ;
9
10
} ;
10
11
packages = project . hsPkgs ;
11
12
in recurseIntoAttrs {
Original file line number Diff line number Diff line change 6
6
project = cabalProject' {
7
7
inherit compiler-nix-name ;
8
8
src = testSrc "cabal-source-repo" ;
9
+ modules = [ { reinstallableLibGhc = true ; } ] ;
9
10
} ;
10
11
packages = project . hsPkgs ;
11
12
in recurseIntoAttrs {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ with lib;
6
6
let
7
7
modules = [
8
8
{
9
+ reinstallableLibGhc = true ;
9
10
# Package has no exposed modules which causes
10
11
# haddock: No input file(s)
11
12
packages . cabal-sublib . doHaddock = false ;
Original file line number Diff line number Diff line change 18
18
plan-pkgs = importAndFilterProject {
19
19
inherit ( callProjectResults ) projectNix sourceRepos src ;
20
20
} ;
21
+ modules = [ { reinstallableLibGhc = true ; } ] ;
21
22
} ;
22
23
packages = pkgSet . config . hsPkgs ;
23
24
Original file line number Diff line number Diff line change 7
7
project = project' {
8
8
inherit compiler-nix-name ;
9
9
src = testSrc "th-dlls" ;
10
+ modules = [ { reinstallableLibGhc = true ; } ] ;
10
11
} ;
11
12
12
13
packages = project . hsPkgs ;
You can’t perform that action at this time.
0 commit comments