about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/usrsctp
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/usrsctp')
-rw-r--r--nixpkgs/pkgs/development/libraries/usrsctp/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/usrsctp/default.nix b/nixpkgs/pkgs/development/libraries/usrsctp/default.nix
new file mode 100644
index 000000000000..af8979c79d13
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/usrsctp/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "usrsctp";
+  version = "0.9.5.0";
+
+  src = fetchFromGitHub {
+    owner = "sctplab";
+    repo = "usrsctp";
+    rev = version;
+    sha256 = "10ndzkip8blgkw572n3dicl6mgjaa7kygwn3vls80liq92vf1sa9";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  # https://github.com/sctplab/usrsctp/issues/662
+  postPatch = ''
+    substituteInPlace usrsctplib/CMakeLists.txt \
+      --replace '$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
+      --replace '$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/sctplab/usrsctp";
+    description = "A portable SCTP userland stack";
+    maintainers = with maintainers; [ misuzu ];
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+  };
+}