Files
nixpkgs/pkgs/by-name/pa/pan-bindings/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

65 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
buildGoModule,
cmake,
ncurses,
asio,
}:
let
version = "unstable-2025-06-15";
src = fetchFromGitHub {
owner = "lschulz";
repo = "pan-bindings";
rev = "708d7f36a0a32816b2b0d8e2e5a4d79f2144f406";
hash = "sha256-wGHa8NV8M+9dHvn8UqejderyA1UgYQUcTOKocRFhg6U=";
};
goDeps = (
buildGoModule {
name = "pan-bindings-goDeps";
inherit src version;
modRoot = "go";
vendorHash = "sha256-3MybV76pHDnKgN2ENRgsyAvynXQctv0fJcRGzesmlww=";
}
);
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;
};
}