Skip to content

Commit 542d4c9

Browse files
committed
Merge branch 'master' of github.com:input-output-hk/haskell.nix into circuithub
2 parents bbd522b + 6eaafcd commit 542d4c9

File tree

24 files changed

+5268
-20
lines changed

24 files changed

+5268
-20
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ Haskell packages in Nix. It depends on other repos, which are:
2929

3030
- [`stackage.nix`](https://github.com/input-output-hk/stackage.nix) — all of the [Stackage](https://www.stackage.org/) snapshots, converted to Nix expressions.
3131

32+
> [!NOTE]
33+
> For commercial support, please don't hesitate to reach out at [email protected]

build.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ in rec {
4242
"ghc8105" = "3.4.1";
4343
"ghc8106" = "3.4.1";
4444
"ghc8107" = "3.4.1";
45+
"ghc928" = "3.6.1";
4546
}.${compiler-nix-name} or "latest";
4647
};
4748
} // pkgs.lib.optionalAttrs (ghcFromTo "9.2" "9.6") {

compiler/ghc/default.nix

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,10 @@ let
311311
# For cross compilers only the RTS should be built with -mno-outline-atomics
312312
+ lib.optionalString (!hostPlatform.isAarch64 && targetPlatform.isLinux && targetPlatform.isAarch64)
313313
" '*.rts.ghc.c.opts += -optc-mno-outline-atomics'"
314-
+ lib.optionalString enableRelocatedStaticLibs
314+
# PIC breaks GHC annotations on windows (see test/annotations for a test case)
315+
+ lib.optionalString (enableRelocatedStaticLibs && !targetPlatform.isWindows)
315316
" '*.*.ghc.*.opts += -fPIC' '*.*.cc.*.opts += -fPIC'"
317+
# `-fexternal-dynamic-refs` causes `undefined reference` errors when building GHC cross compiler for windows
316318
+ lib.optionalString (enableRelocatedStaticLibs && targetPlatform.isx86_64 && !targetPlatform.isWindows)
317319
" '*.*.ghc.*.opts += -fexternal-dynamic-refs'"
318320
# The following is required if we build on aarch64-darwin for aarch64-iOS. Otherwise older
@@ -791,6 +793,19 @@ stdenv.mkDerivation (rec {
791793
then ''
792794
mkdir $out
793795
cp -r _build/stage1/bin $out
796+
${
797+
# These are needed when building the reinstallable lib ghc
798+
if targetPlatform.isMusl
799+
then ''
800+
cp _build/stageBoot/bin/genprimopcode $out/bin
801+
cp _build/stageBoot/bin/deriveConstants $out/bin
802+
'' else ''
803+
cp _build/stageBoot/bin/${targetPrefix}genprimopcode $out/bin
804+
ln -s $out/bin/${targetPrefix}genprimopcode $out/bin/genprimopcode
805+
cp _build/stageBoot/bin/${targetPrefix}deriveConstants $out/bin
806+
ln -s $out/bin/${targetPrefix}deriveConstants $out/bin/deriveConstants
807+
''
808+
}
794809
cp -r _build/stage1/lib $out
795810
mkdir $doc
796811
cp -r _build/stage1/share $doc

flake.lock

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
url = "github:input-output-hk/stackage.nix";
4040
flake = false;
4141
};
42+
nix-tools-static = {
43+
url = "github:input-output-hk/haskell-nix-example/nix";
44+
flake = false;
45+
};
4246
cabal-32 = {
4347
url = "github:haskell/cabal/3.2";
4448
flake = false;

lib/call-cabal-project-to-nix.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ let
401401
exit 1
402402
''}
403403
else
404-
cp -r ${cleanedSource}/* .
404+
rsync -a ${cleanedSource}/ ./
405405
fi
406406
chmod +w -R .
407407
# Decide what to do for each `package.yaml` file.

0 commit comments

Comments
 (0)