2021-01-11 10:27:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, openssl
|
|
|
|
, libevent
|
|
|
|
, pkg-config
|
|
|
|
, libprom
|
|
|
|
, libpromhttp
|
|
|
|
, libmicrohttpd
|
2022-08-30 03:51:38 +00:00
|
|
|
, sqlite
|
2021-07-03 07:33:39 +00:00
|
|
|
, nixosTests
|
2021-01-11 10:27:59 +00:00
|
|
|
}:
|
2016-06-21 10:59:29 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "coturn";
|
2022-09-16 07:25:52 +00:00
|
|
|
version = "4.6.0";
|
2016-06-21 10:59:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coturn";
|
|
|
|
repo = "coturn";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2022-09-16 07:25:52 +00:00
|
|
|
sha256 = "sha256-QXApGJme/uteeKS8oiVLPOYUKzxTKdSC4WMlKS0VW5Q=";
|
2016-06-21 10:59:29 +00:00
|
|
|
};
|
|
|
|
|
2021-01-11 10:27:59 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
libevent
|
|
|
|
libprom
|
|
|
|
libpromhttp
|
|
|
|
libmicrohttpd
|
2022-08-30 03:51:38 +00:00
|
|
|
sqlite.dev
|
2021-01-11 10:27:59 +00:00
|
|
|
];
|
2016-06-21 10:59:29 +00:00
|
|
|
|
2020-04-28 23:11:43 +00:00
|
|
|
patches = [
|
|
|
|
./pure-configure.patch
|
|
|
|
];
|
2016-06-21 10:59:29 +00:00
|
|
|
|
2022-06-05 17:51:08 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: ...-libprom-0.1.1/include/prom_collector_registry.h:37: multiple definition of
|
|
|
|
# `PROM_COLLECTOR_REGISTRY_DEFAULT'; ...-libprom-0.1.1/include/prom_collector_registry.h:37: first defined here
|
|
|
|
# Should be fixed in libprom-1.2.0 and later: https://github.com/digitalocean/prometheus-client-c/pull/25
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2021-07-03 07:33:39 +00:00
|
|
|
passthru.tests.coturn = nixosTests.coturn;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://coturn.net/";
|
2016-06-21 10:59:29 +00:00
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
description = "A TURN server";
|
|
|
|
platforms = platforms.all;
|
2018-10-21 20:29:02 +00:00
|
|
|
broken = stdenv.isDarwin; # 2018-10-21
|
2021-01-11 10:27:59 +00:00
|
|
|
maintainers = with maintainers; [ ralith _0x4A6F ];
|
2016-06-21 10:59:29 +00:00
|
|
|
};
|
|
|
|
}
|