1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 freebsd,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "libipt";
11 version = "2.1.2";
12
13 src = fetchFromGitHub {
14 owner = "intel";
15 repo = "libipt";
16 rev = "v${version}";
17 sha256 = "sha256-rO2Mf2/BfKlPh1wHe0qTuyQAyqpSB/j3Q+JWpNDyNm0=";
18 };
19
20 nativeBuildInputs = [ cmake ];
21 buildInputs = lib.optional stdenv.hostPlatform.isFreeBSD freebsd.libstdthreads;
22
23 env = lib.optionalAttrs stdenv.hostPlatform.isFreeBSD {
24 NIX_LDFLAGS = "-lstdthreads";
25 };
26
27 meta = with lib; {
28 description = "Intel Processor Trace decoder library";
29 homepage = "https://github.com/intel/libipt";
30 license = licenses.bsd3;
31 platforms = platforms.unix;
32 maintainers = with maintainers; [ orivej ];
33 };
34}