mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
fbthrift: condition shared libraries on platform setting
This commit is contained in:
parent
dc60c66359
commit
3bdc69269d
@ -55,11 +55,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(darwinMinVersionHook "11.0")
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isDarwin then "OFF" else "ON"}"
|
||||
cmakeFlags =
|
||||
[
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
||||
|
||||
(lib.cmakeBool "thriftpy" false)
|
||||
];
|
||||
(lib.cmakeBool "thriftpy" false)
|
||||
]
|
||||
++ 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")
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Facebook's branch of Apache Thrift";
|
||||
|
Loading…
Reference in New Issue
Block a user