mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
parent
ad6d6e8f5a
commit
7d24989226
@ -6,6 +6,7 @@
|
||||
|
||||
cmake,
|
||||
ninja,
|
||||
removeReferencesTo,
|
||||
|
||||
folly,
|
||||
fizz,
|
||||
@ -24,6 +25,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "wangle";
|
||||
version = "2024.11.18.00";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = "wangle";
|
||||
@ -34,6 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
removeReferencesTo
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
@ -61,6 +68,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
||||
|
||||
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
|
||||
(lib.cmakeFeature "INCLUDE_INSTALL_DIR" "${placeholder "dev"}/include")
|
||||
(lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib")
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_DIR" "${placeholder "dev"}/lib/cmake/wangle")
|
||||
];
|
||||
|
||||
env.GTEST_FILTER =
|
||||
@ -98,6 +109,18 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Sanitize header paths to avoid runtime dependencies leaking in
|
||||
# through `__FILE__`.
|
||||
(
|
||||
shopt -s globstar
|
||||
for header in "$dev/include"/**/*.h; do
|
||||
sed -i "1i#line 1 \"$header\"" "$header"
|
||||
remove-references-to -t "$dev" "$header"
|
||||
done
|
||||
)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Open-source C++ networking library";
|
||||
longDescription = ''
|
||||
|
Loading…
Reference in New Issue
Block a user