lol

srt: Add mingw32 build support

+28 -5
+18 -5
pkgs/development/libraries/srt/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, cmake, openssl 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + , openssl 6 + , windows 2 7 }: 3 8 4 9 stdenv.mkDerivation rec { ··· 14 19 15 20 nativeBuildInputs = [ cmake ]; 16 21 17 - buildInputs = [ openssl ]; 22 + buildInputs = [ 23 + openssl 24 + ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ 25 + windows.mingw_w64_pthreads 26 + ]; 27 + 28 + patches = lib.optionals stdenv.hostPlatform.isMinGW [ 29 + ./no-msvc-compat-headers.patch 30 + ]; 18 31 19 32 cmakeFlags = [ 20 33 # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly ··· 29 42 30 43 meta = with lib; { 31 44 description = "Secure, Reliable, Transport"; 32 - homepage = "https://github.com/Haivision/srt"; 33 - license = licenses.mpl20; 45 + homepage = "https://github.com/Haivision/srt"; 46 + license = licenses.mpl20; 34 47 maintainers = with maintainers; [ nh2 ]; 35 - platforms = platforms.all; 48 + platforms = platforms.all; 36 49 }; 37 50 }
+10
pkgs/development/libraries/srt/no-msvc-compat-headers.patch
··· 1 + --- srt-1.3.2/common/filelist_win32.maf.orig 2018-06-15 21:44:11.000000000 +0200 2 + +++ srt-1.3.2/common/filelist_win32.maf 2018-09-25 20:26:36.903688700 +0200 3 + @@ -4,7 +4,6 @@ 4 + # 5 + # These are included by platform_sys.h header contained in ../srtcore/filelist.maf 6 + # 7 + -win/unistd.h 8 + 9 + SOURCES 10 + win_time.cpp