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