nixpkgs/pkgs/development/libraries/srt/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.4 KiB
Nix
Raw Normal View History

2023-11-29 20:43:26 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, openssl
, windows
2019-01-20 17:46:06 +00:00
}:
stdenv.mkDerivation rec {
pname = "srt";
2023-09-11 06:20:48 +00:00
version = "1.5.3";
2019-01-20 17:46:06 +00:00
src = fetchFromGitHub {
owner = "Haivision";
repo = "srt";
rev = "v${version}";
2023-09-11 06:20:48 +00:00
sha256 = "sha256-HmfbBPyR+z5d9/XBvNhosk8pSSPToNtM+V0hEyb2G2w=";
2019-01-20 17:46:06 +00:00
};
nativeBuildInputs = [ cmake ];
2023-11-29 20:43:26 +00:00
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
windows.mingw_w64_pthreads
];
patches = lib.optionals stdenv.hostPlatform.isMinGW [
./no-msvc-compat-headers.patch
];
2019-01-20 17:46:06 +00:00
cmakeFlags = [
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
# (setting it to an absolute path causes include files to go to $out/$out/include,
# because the absolute path is interpreted with root at $out).
"-DCMAKE_INSTALL_INCLUDEDIR=include"
2023-12-20 14:09:02 +00:00
"-DENABLE_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
2019-01-20 17:46:06 +00:00
# TODO Remove this when https://github.com/Haivision/srt/issues/538 is fixed and available to nixpkgs
# Workaround for the fact that srt incorrectly disables GNUInstallDirs when LIBDIR is specified,
# see https://github.com/NixOS/nixpkgs/pull/54463#discussion_r249878330
"-UCMAKE_INSTALL_LIBDIR"
];
meta = with lib; {
2019-01-20 17:46:06 +00:00
description = "Secure, Reliable, Transport";
2023-11-29 20:43:26 +00:00
homepage = "https://github.com/Haivision/srt";
license = licenses.mpl20;
2019-01-20 17:46:06 +00:00
maintainers = with maintainers; [ nh2 ];
2023-11-29 20:43:26 +00:00
platforms = platforms.all;
2019-01-20 17:46:06 +00:00
};
}