pan-bindings: init at unstable-2024-03-03

This commit is contained in:
matthewcroughan 2024-02-28 07:54:16 +00:00 committed by Emery Hemingway
parent 8e19126885
commit f3e48a477e

View file

@ -0,0 +1,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;
};
}