nixpkgs/pkgs/os-specific/linux/bpftrace/bcc-source.patch
2018-10-28 14:33:37 +10:00

32 lines
903 B
Diff

From fc0a5bd2ddb5827c5288ee284c1f2d834d79e432 Mon Sep 17 00:00:00 2001
From: Rodney Lorrimar <dev@rodney.id.au>
Date: Tue, 16 Oct 2018 09:55:59 +1000
Subject: [PATCH 1/3] Don't use ExternalProject for bcc sources
---
CMakeLists.txt | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eae850a..b20fb33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,15 @@ if (OFFLINE_BUILDS)
UPDATE_DISCONNECTED 1
BUILD_COMMAND ${CMAKE_COMMAND} --build . --target bcc-static
)
+elseif (NIX_BUILDS)
+ include(ExternalProject)
+ ExternalProject_Add(bcc
+ DOWNLOAD_COMMAND rmdir bcc && ln -sf $ENV{bccSrc} bcc
+ STEP_TARGETS build update
+ EXCLUDE_FROM_ALL 1
+ UPDATE_DISCONNECTED 1
+ BUILD_COMMAND ${CMAKE_COMMAND} --build . --target bcc-static
+ )
else()
include(ExternalProject)
ExternalProject_Add(bcc
--
2.17.1