2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, nlohmann_json
|
|
|
|
, libtoxcore
|
|
|
|
, libsodium
|
|
|
|
, libcap
|
|
|
|
, zeromq
|
|
|
|
, systemd
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "toxvpn";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "unstable-2024-08-21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-08-05 21:33:18 +00:00
|
|
|
owner = "cleverca22";
|
|
|
|
repo = "toxvpn";
|
2024-10-04 16:56:33 +00:00
|
|
|
rev = "c727451eb871b43855b825ff93dc48fa0d3320b6";
|
|
|
|
sha256 = "sha256-UncU0cpoyy9Z0TCChGmaHpyhW9ctz32gU7n3hgpOEwU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ libtoxcore nlohmann_json libsodium zeromq ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [ libcap systemd ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-DSYSTEMD=1" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
postInstall = "cp ${./bootstrap.json} $out/share/toxvpn/";
|
|
|
|
|
|
|
|
installCheckPhase = "$out/bin/toxvpn -h";
|
|
|
|
doInstallCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Powerful tool that allows one to make tunneled point to point connections over Tox";
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://github.com/cleverca22/toxvpn";
|
|
|
|
license = licenses.gpl3;
|
2024-10-04 16:56:33 +00:00
|
|
|
maintainers = with maintainers; [ cleverca22 craigem obadz toonn ];
|
2021-08-05 21:33:18 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|