summary refs log tree commit diff
path: root/pkgs/os-specific/linux/bpftrace/bcc-source.patch
blob: a4c9947f0c34c4c9e3d4b2452eaab40c2d0ee21a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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