Commit bb543f0
Add missing libblst to GHC options of wrapped-cabal in static mode. (#125)
* Add missing libblst to GHC options of wrapped-cabal in static mode.
* comment out post-fixup
* Overwrite buildPhase for libblst static
The current buildPhase in NixOS/nixpkgs does something like this:
```
./build.sh ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
./build.sh -shared ${lib.optionalString stdenv.hostPlatform.isWindows "flavour=mingw64"}
```
So we do build both a dynamic and static version, for convenience,
which is then correctly visible in the nix store (both `.a` and
`.dylib` are present).
BUT, it seems that because of the presence of the dynamic lib, cabal
or GHC (?) still chose to bundle the library dynamically despite the
static flags. Removing the `.dylib` from the nix store recover the
expected behavior (libblst being statically linked).
This is odd, but the current fix is to not build the `-shared` version
of the library at all when in the static shell.
Co-authored-by: yvan-sraka <yvan@sraka.xyz>
* Enforce the use of static libraries in `-static` devshell
---------
Co-authored-by: Yvan Sraka <yvan@sraka.xyz>1 parent 8dcb4f0 commit bb543f0
2 files changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 109 | | |
112 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
0 commit comments