Skip to content

Commit c91a9b4

Browse files
committed
Add useArchiveFilesForTemplateHaskell option.
The motivation is that @aherrmann and @jonathanlking want to use Bazel and found that it might it easier to use `.a` files in TH than to try to provide `.so` AND `.a` files of all dependencies.
1 parent d90f0ec commit c91a9b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

survey/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ in
2424
# When changing this, also change the default version of Cabal declared below
2525
compiler ? "ghc927",
2626

27+
# Tries to use `.a` files when evaluating TH, instead of `.so` files.
28+
useArchiveFilesForTemplateHaskell ? false,
29+
2730
# See:
2831
# * https://www.snoyman.com/base/
2932
# * https://www.haskell.org/cabal/download.html
@@ -1556,6 +1559,9 @@ let
15561559
then ghcPackage # GHC < 9.6, no Hadrian
15571560
else ghcPackage.override { enableDwarf = false; }
15581561
)
1562+
(ghcPackage:
1563+
ghcPackage.override { enableRelocatedStaticLibs = useArchiveFilesForTemplateHaskell; }
1564+
)
15591565
];
15601566

15611567
# Overlay all Haskell executables are statically linked.

0 commit comments

Comments
 (0)