mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-28 15:54:32 +00:00
mvfst: split outputs
(cherry picked from commit49ad47893e
) (cherry picked from commite2e183ea2a
)
This commit is contained in:
parent
54d1271125
commit
0258bacd24
@ -6,6 +6,7 @@
|
||||
|
||||
cmake,
|
||||
ninja,
|
||||
removeReferencesTo,
|
||||
|
||||
folly,
|
||||
gflags,
|
||||
@ -22,6 +23,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mvfst";
|
||||
version = "2024.11.18.00";
|
||||
|
||||
outputs = [
|
||||
"bin"
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = "mvfst";
|
||||
@ -32,6 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
removeReferencesTo
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
@ -60,6 +68,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "CMAKE_INSTALL_RPATH_USE_LINK_PATH" true)
|
||||
|
||||
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_PREFIX" (placeholder "dev"))
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Homebrew sets this, and the shared library build fails without
|
||||
@ -107,6 +117,21 @@ 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
|
||||
)
|
||||
|
||||
# TODO: Do this in `gtest` rather than downstream.
|
||||
remove-references-to -t ${gtest.dev} $out/lib/*
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Implementation of the QUIC transport protocol";
|
||||
homepage = "https://github.com/facebook/mvfst";
|
||||
|
Loading…
Reference in New Issue
Block a user