Merge pull request #271031 from seanybaggins/add-srt-mingw-support
srt: Add mingw32 build support
This commit is contained in:
commit
e708441e51
2 changed files with 28 additions and 5 deletions
|
@ -1,4 +1,9 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, openssl
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, openssl
|
||||
, windows
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -14,7 +19,15 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
|
||||
windows.mingw_w64_pthreads
|
||||
];
|
||||
|
||||
patches = lib.optionals stdenv.hostPlatform.isMinGW [
|
||||
./no-msvc-compat-headers.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
|
||||
|
@ -29,9 +42,9 @@ stdenv.mkDerivation rec {
|
|||
|
||||
meta = with lib; {
|
||||
description = "Secure, Reliable, Transport";
|
||||
homepage = "https://github.com/Haivision/srt";
|
||||
license = licenses.mpl20;
|
||||
homepage = "https://github.com/Haivision/srt";
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ nh2 ];
|
||||
platforms = platforms.all;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
10
pkgs/development/libraries/srt/no-msvc-compat-headers.patch
Normal file
10
pkgs/development/libraries/srt/no-msvc-compat-headers.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- srt-1.3.2/common/filelist_win32.maf.orig 2018-06-15 21:44:11.000000000 +0200
|
||||
+++ srt-1.3.2/common/filelist_win32.maf 2018-09-25 20:26:36.903688700 +0200
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
# These are included by platform_sys.h header contained in ../srtcore/filelist.maf
|
||||
#
|
||||
-win/unistd.h
|
||||
|
||||
SOURCES
|
||||
win_time.cpp
|
Loading…
Reference in a new issue