18 stdenv.mkDerivation rec {
22 src = fetchFromGitHub {
26 sha256 = "sha256-c/0OxUH8iw8nRuVg4Fszf6Z/JiEV+m0B2ofzy81uFu8=";
29 nativeBuildInputs = [ cscope git pkg-config ];
31 buildInputs = [ libopus libtoxcore libsodium libevent libvpx msgpack python3 ];
33 pythonBuildInputs = with python3Packages; [
39 # https://github.com/gjedeer/tuntox/pull/67
41 url = "https://github.com/gjedeer/tuntox/compare/a646402f42e120c7148d4de29dbdf5b09027a80a..365d2e5cbc0e3655fb64c204db0515f5f4cdf5a4.patch";
42 sha256 = "sha256-P3uIRnV+pBi3s3agGYUMt2PZU4CRxx/DUR8QPVQ+UN8=";
47 substituteInPlace gitversion.h --replace '7d45afdf7d00a95a8c3687175e2b1669fa1f7745' '365d2e5cbc0e3655fb64c204db0515f5f4cdf5a4'
48 '' + lib.optionalString stdenv.isLinux ''
49 substituteInPlace Makefile --replace ' -static ' ' '
50 substituteInPlace Makefile --replace 'CC=gcc' ' '
51 '' + lib.optionalString stdenv.isDarwin ''
52 substituteInPlace Makefile.mac --replace '.git/HEAD .git/index' ' '
53 substituteInPlace Makefile.mac --replace '/usr/local/lib/libtoxcore.a' '${libtoxcore}/lib/libtoxcore.a'
54 substituteInPlace Makefile.mac --replace '/usr/local/lib/libsodium.a' '${libsodium}/lib/libsodium.dylib'
55 substituteInPlace Makefile.mac --replace 'CC=gcc' ' '
59 '' + lib.optionalString stdenv.isLinux ''
61 '' + lib.optionalString stdenv.isDarwin ''
62 make -f Makefile.mac tuntox
73 description = "Tunnel TCP connections over the Tox protocol";
74 homepage = "https://github.com/gjedeer/tuntox";
75 license = licenses.gpl3;
76 maintainers = with maintainers; [
79 platforms = platforms.unix;