Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd63daa
commit bb16bce
Showing
2 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
{ stdenv, fetchFromGitHub, cmake, lib | ||
, libtoxcore, jsoncpp, libsodium, systemd, libcap }: | ||
{ stdenv, fetchFromGitHub, cmake, nlohmann_json, | ||
libtoxcore, libsodium, systemd, libcap, zeromq }: | ||
|
||
with lib; | ||
with stdenv.lib; | ||
|
||
stdenv.mkDerivation rec { | ||
let | ||
systemdOrNull = if stdenv.system == "x86_64-darwin" then null else systemd; | ||
if_systemd = optional (systemdOrNull != null); | ||
in stdenv.mkDerivation rec { | ||
name = "toxvpn-${version}"; | ||
version = "20161230"; | ||
version = "2017-06-25"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "cleverca22"; | ||
repo = "toxvpn"; | ||
rev = "4b7498a5fae680484cb5779ac01fb08ad3089bdd"; | ||
sha256 = "0bazdspiym9xyzms7pd6i1f2gph13rnf764nm3jc27fbfwmc98rp"; | ||
rev = "7bd6f169d69c511affa8c9672e8f794e4e205a44"; | ||
sha256 = "1km8hkrxmrnca1b49vbw5kyldayaln5plvz78vhf8325r6c5san0"; | ||
}; | ||
|
||
buildInputs = [ libtoxcore jsoncpp libsodium libcap ] ++ optional stdenv.isLinux systemd; | ||
buildInputs = [ libtoxcore nlohmann_json libsodium zeromq ] | ||
++ if_systemd systemd | ||
++ optional (stdenv.system != "x86_64-darwin") libcap; | ||
nativeBuildInputs = [ cmake ]; | ||
|
||
cmakeFlags = optional stdenv.isLinux [ "-DSYSTEMD=1" ]; | ||
|
||
postInstall = "$out/bin/toxvpn -h"; | ||
|
||
meta = with stdenv.lib; { | ||
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; | ||
maintainers = with maintainers; [ cleverca22 obadz ]; | ||
platforms = platforms.linux; | ||
platforms = platforms.linux ++ platforms.darwin; | ||
}; | ||
} |