1 { stdenv, lib, fetchFromGitHub, fetchpatch, cmake }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "10ndzkip8blgkw572n3dicl6mgjaa7kygwn3vls80liq92vf1sa9";
15 # usrsctp fails to build with clang 15+ due to set but unused variable and missing prototype
16 # errors. These issues are fixed in the master branch, but a new release with them has not
17 # been made. The following patch can be dropped once a release has been made.
18 ./clang-fix-build.patch
21 name = "freebsd-14.patch";
22 url = "https://github.com/sctplab/usrsctp/commit/ac559d2a95277e5e0827e9ee5a1d3b1b50e0822a.patch";
23 hash = "sha256-QBlzH37Xwwnn1y8pM941Zesz18p2EazfeD0lCU8n6nI=";
27 nativeBuildInputs = [ cmake ];
29 # https://github.com/sctplab/usrsctp/issues/662
31 substituteInPlace usrsctplib/CMakeLists.txt \
32 --replace '$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
33 --replace '$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
37 homepage = "https://github.com/sctplab/usrsctp";
38 description = "Portable SCTP userland stack";
39 maintainers = with maintainers; [ misuzu ];
40 license = licenses.bsd3;
41 platforms = platforms.unix;