2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, zlib
|
|
|
|
, openssl
|
|
|
|
, cmake
|
|
|
|
, SystemConfiguration
|
|
|
|
}:
|
2023-03-08 16:32:21 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "3.8.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libre";
|
2022-01-07 04:07:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "baresip";
|
|
|
|
repo = "re";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-zKoK5GsgNnmQrEZ5HAse2e1Gy7fPO42DEvVAL5ZTNhc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
SystemConfiguration
|
|
|
|
];
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-04-24 23:36:52 +00:00
|
|
|
makeFlags = [ "USE_ZLIB=1" "USE_OPENSSL=1" "PREFIX=$(out)" ]
|
2022-01-07 04:07:37 +00:00
|
|
|
++ lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
|
|
|
|
++ lib.optional (stdenv.cc.libc != null) "SYSROOT=${lib.getDev stdenv.cc.libc}"
|
2020-04-24 23:36:52 +00:00
|
|
|
;
|
2023-03-04 12:14:45 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "A library for real-time communications with async IO support and a complete SIP stack";
|
2022-01-07 04:07:37 +00:00
|
|
|
homepage = "https://github.com/baresip/re";
|
|
|
|
maintainers = with lib.maintainers; [ elohmeier raskin ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|