lol
1{ lib, stdenv, fetchFromGitHub, cmake, openssl
2}:
3
4with lib;
5stdenv.mkDerivation rec {
6 pname = "srt";
7 version = "1.4.3";
8
9 src = fetchFromGitHub {
10 owner = "Haivision";
11 repo = "srt";
12 rev = "v${version}";
13 sha256 = "1f60vlfxhh9bhafws82c3301whjlz5gy92jz9a9ymwfg5h53bv1j";
14 };
15
16 nativeBuildInputs = [ cmake ];
17
18 buildInputs = [ openssl ];
19
20 cmakeFlags = [
21 # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
22 # (setting it to an absolute path causes include files to go to $out/$out/include,
23 # because the absolute path is interpreted with root at $out).
24 "-DCMAKE_INSTALL_INCLUDEDIR=include"
25 # TODO Remove this when https://github.com/Haivision/srt/issues/538 is fixed and available to nixpkgs
26 # Workaround for the fact that srt incorrectly disables GNUInstallDirs when LIBDIR is specified,
27 # see https://github.com/NixOS/nixpkgs/pull/54463#discussion_r249878330
28 "-UCMAKE_INSTALL_LIBDIR"
29 ];
30
31 meta = {
32 description = "Secure, Reliable, Transport";
33 homepage = "https://github.com/Haivision/srt";
34 license = licenses.mpl20;
35 maintainers = with maintainers; [ nh2 ];
36 platforms = platforms.all;
37 };
38}