You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
0 commit comments