blob: 66fea9b587403bedba5ea1f12737b3cac43c1e2d (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
{ lib
, stdenv
, fetchFromGitHub
, buildGo122Module
, cmake
, ncurses
, asio
}:
let
version = "unstable-2024-03-03";
src = fetchFromGitHub {
owner = "lschulz";
repo = "pan-bindings";
rev = "4361d30f1c5145a70651c259f2d56369725b0d15";
hash = "sha256-0WxrgXTCM+BwGcjjWBBKiZawje2yxB5RRac6Sk5t3qc=";
};
goDeps = (buildGo122Module {
name = "pan-bindings-goDeps";
inherit src version;
modRoot = "go";
vendorHash = "sha256-7EitdEJTRtiM29qmVnZUM6w68vCBI8mxZhCA7SnAxLA=";
});
in
stdenv.mkDerivation {
name = "pan-bindings";
inherit src version;
cmakeFlags = [
"-DBUILD_SHARED_LIBS=1"
"-DBUILD_EXAMPLES=0"
];
patchPhase = ''
runHook prePatch
export HOME=$TMP
cp -r --reflink=auto ${goDeps.goModules} go/vendor
runHook postPatch
'';
buildInputs = [
ncurses
asio
];
nativeBuildInputs = [
cmake
goDeps.go
];
meta = with lib; {
description = "SCION PAN Bindings for C, C++, and Python";
homepage = "https://github.com/lschulz/pan-bindings";
license = licenses.asl20;
maintainers = with maintainers; [ matthewcroughan ];
mainProgram = "pan-bindings";
platforms = platforms.all;
};
}
|