Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> * Enforce the use of static libraries in `-static` devshell --------- Co-authored-by: Yvan Sraka <[email protected]>
- Loading branch information