1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 lttng-tools,
7 libatomic_ops,
8 perl,
9 coreutils,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "libmsquic";
14 version = "2.4.14";
15
16 src = fetchFromGitHub {
17 owner = "microsoft";
18 repo = "msquic";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-hsdtRxvAbo7pfsM6ioG3CiGJhgRilrydA6zvAcoux4c=";
21 fetchSubmodules = true;
22 };
23
24 nativeBuildInputs = [
25 cmake
26 perl
27 ];
28
29 buildInputs = [
30 libatomic_ops
31 ]
32 ++ lib.optionals stdenv.hostPlatform.isLinux [
33 lttng-tools
34 ];
35
36 postUnpack = ''
37 for f in "$(find . -type f -name "*.pl")"; do
38 patchShebangs --build $f 2>&1 > /dev/null
39 done
40
41 for g in $(find . -type f -name "*" ); do
42 if test -f $g; then
43 sed -i "s|/usr/bin/env|${coreutils}/bin/env|g" $g
44 fi
45 done
46 '';
47
48 meta = {
49 description = "Cross-platform, C implementation of the IETF QUIC protocol, exposed to C, C++, C# and Rust";
50 homepage = "https://github.com/microsoft/msquic";
51 changelog = "https://github.com/microsoft/msquic/releases/tag/v${finalAttrs.version}";
52 license = lib.licenses.mit;
53 platforms = lib.platforms.all;
54 maintainers = with lib.maintainers; [ SohamG ];
55 };
56})