mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-14 12:07:47 +00:00
mvfst: condition shared libraries on platform setting
This commit is contained in:
parent
5b08d09834
commit
ee1e828c27
@ -43,6 +43,24 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(darwinMinVersionHook "11.0")
|
||||
];
|
||||
|
||||
cmakeFlags =
|
||||
[
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
||||
|
||||
(lib.cmakeBool "CMAKE_INSTALL_RPATH_USE_LINK_PATH" true)
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Homebrew sets this, and the shared library build fails without
|
||||
# it. I don‘t know, either. It scares me.
|
||||
(lib.cmakeFeature "CMAKE_SHARED_LINKER_FLAGS" "-Wl,-undefined,dynamic_lookup")
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Make sure the libraries the `tperf` binary uses are installed.
|
||||
printf 'install(TARGETS mvfst_test_utils)\n' >> quic/common/test/CMakeLists.txt
|
||||
printf 'install(TARGETS mvfst_dsr_backend)\n' >> quic/dsr/CMakeLists.txt
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Implementation of the QUIC transport protocol";
|
||||
homepage = "https://github.com/facebook/mvfst";
|
||||
|
Loading…
Reference in New Issue
Block a user