2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, nlohmann_json,
|
2018-04-19 12:21:25 +02:00
|
|
|
libtoxcore, libsodium, libcap, zeromq,
|
|
|
|
systemd ? null }:
|
2016-05-30 00:07:54 +02:00
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
with lib;
|
2016-05-30 00:07:54 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-09-09 19:12:48 +02:00
|
|
|
name = "toxvpn-2019-09-09";
|
2016-05-30 00:07:54 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cleverca22";
|
|
|
|
repo = "toxvpn";
|
2019-09-09 19:12:48 +02:00
|
|
|
rev = "45083dec172ce167f7ed84d571ec2822ebe4d51a";
|
|
|
|
sha256 = "193crarrx6q0zd2p6dn67pzv8kngwi440zm1y54njgcz0v3fpxmb";
|
2016-05-30 00:07:54 +02:00
|
|
|
};
|
|
|
|
|
2017-06-26 01:17:20 +02:00
|
|
|
buildInputs = [ libtoxcore nlohmann_json libsodium zeromq ]
|
2018-04-19 12:21:25 +02:00
|
|
|
++ optionals stdenv.isLinux [ libcap systemd ];
|
|
|
|
|
2017-02-14 07:59:59 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
2016-05-30 00:07:54 +02:00
|
|
|
|
2017-02-14 07:59:59 +01:00
|
|
|
cmakeFlags = optional stdenv.isLinux [ "-DSYSTEMD=1" ];
|
2016-05-30 00:07:54 +02:00
|
|
|
|
2017-06-26 01:17:20 +02:00
|
|
|
postInstall = "$out/bin/toxvpn -h";
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-05-30 00:07:54 +02:00
|
|
|
description = "A powerful tool that allows one to make tunneled point to point connections over Tox";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/cleverca22/toxvpn";
|
2016-05-30 00:07:54 +02:00
|
|
|
license = licenses.gpl3;
|
2019-09-09 19:12:48 +02:00
|
|
|
maintainers = with maintainers; [ cleverca22 obadz toonn ];
|
2017-06-26 01:17:20 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2016-05-30 00:07:54 +02:00
|
|
|
};
|
|
|
|
}
|