about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/pa
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-03-22 16:41:59 +0100
committerAlyssa Ross <hi@alyssa.is>2024-03-22 16:41:59 +0100
commit46a88117a05c3469af5d99433af140c3de8ca088 (patch)
treed7f0557756d8f07a3081b3498c05ddc5a8ad429d /nixpkgs/pkgs/by-name/pa
parente97457545cea0b2ca421da257c83d8f1ef451d85 (diff)
parenta343533bccc62400e8a9560423486a3b6c11a23b (diff)
downloadnixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.gz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.bz2
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.lz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.xz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.zst
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.zip
Merge commit 'a343533bccc62400e8a9560423486a3b6c11a23b'
Diffstat (limited to 'nixpkgs/pkgs/by-name/pa')
-rw-r--r--nixpkgs/pkgs/by-name/pa/pan-bindings/package.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/pa/pan-bindings/package.nix b/nixpkgs/pkgs/by-name/pa/pan-bindings/package.nix
new file mode 100644
index 000000000000..66fea9b58740
--- /dev/null
+++ b/nixpkgs/pkgs/by-name/pa/pan-bindings/package.nix
@@ -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;
+  };
+}