summary refs log tree commit diff
path: root/pkgs/development/libraries/libserdes
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/libraries/libserdes
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/libraries/libserdes')
-rw-r--r--pkgs/development/libraries/libserdes/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libserdes/default.nix b/pkgs/development/libraries/libserdes/default.nix
new file mode 100644
index 00000000000..7b48f150c9a
--- /dev/null
+++ b/pkgs/development/libraries/libserdes/default.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, perl
+, boost
+, rdkafka
+, jansson
+, curl
+, avro-c
+, avro-cpp }:
+
+stdenv.mkDerivation rec {
+  pname = "libserdes";
+  version = "6.2.0";
+
+  src = fetchFromGitHub {
+    owner = "confluentinc";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "194ras18xw5fcnjgg1isnb24ydx9040ndciniwcbdb7w7wd901gc";
+  };
+
+  outputs = [ "dev" "out" ];
+
+  nativeBuildInputs = [ perl ];
+
+  buildInputs = [ boost rdkafka jansson curl avro-c avro-cpp ];
+
+  makeFlags = [ "GEN_PKG_CONFIG=y" ];
+
+  postPatch = ''
+    patchShebangs configure lds-gen.pl
+  '';
+
+  # Has a configure script but it’s not Autoconf so steal some bits from multiple-outputs.sh:
+  setOutputFlags = false;
+
+  preConfigure = ''
+    configureFlagsArray+=(
+      "--libdir=''${!outputLib}/lib"
+      "--includedir=''${!outputInclude}/include"
+    )
+  '';
+
+  preInstall = ''
+    installFlagsArray+=("pkgconfigdir=''${!outputDev}/lib/pkgconfig")
+  '';
+
+  # Header files get installed with executable bit for some reason; get rid of it.
+  postInstall = ''
+    chmod -x ''${!outputInclude}/include/libserdes/*.h
+  '';
+
+  meta = with lib; {
+    description = "A schema-based serializer/deserializer C/C++ library with support for Avro and the Confluent Platform Schema Registry";
+    homepage = "https://github.com/confluentinc/libserdes";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ liff ];
+    platforms = platforms.all;
+  };
+}