19 stdenv.mkDerivation rec {
23 src = fetchFromGitHub {
27 sha256 = "sha256-c/0OxUH8iw8nRuVg4Fszf6Z/JiEV+m0B2ofzy81uFu8=";
46 pythonBuildInputs = with python3Packages; [
52 # https://github.com/gjedeer/tuntox/pull/67
54 url = "https://github.com/gjedeer/tuntox/compare/a646402f42e120c7148d4de29dbdf5b09027a80a..365d2e5cbc0e3655fb64c204db0515f5f4cdf5a4.patch";
55 sha256 = "sha256-P3uIRnV+pBi3s3agGYUMt2PZU4CRxx/DUR8QPVQ+UN8=";
61 substituteInPlace gitversion.h --replace '7d45afdf7d00a95a8c3687175e2b1669fa1f7745' '365d2e5cbc0e3655fb64c204db0515f5f4cdf5a4'
63 + lib.optionalString stdenv.hostPlatform.isLinux ''
64 substituteInPlace Makefile --replace ' -static ' ' '
65 substituteInPlace Makefile --replace 'CC=gcc' ' '
67 + lib.optionalString stdenv.hostPlatform.isDarwin ''
68 substituteInPlace Makefile.mac --replace '.git/HEAD .git/index' ' '
69 substituteInPlace Makefile.mac --replace '/usr/local/lib/libtoxcore.a' '${libtoxcore}/lib/libtoxcore.a'
70 substituteInPlace Makefile.mac --replace '/usr/local/lib/libsodium.a' '${libsodium}/lib/libsodium.dylib'
71 substituteInPlace Makefile.mac --replace 'CC=gcc' ' '
76 + lib.optionalString stdenv.hostPlatform.isLinux ''
79 + lib.optionalString stdenv.hostPlatform.isDarwin ''
80 make -f Makefile.mac tuntox
91 description = "Tunnel TCP connections over the Tox protocol";
92 mainProgram = "tuntox";
93 homepage = "https://github.com/gjedeer/tuntox";
94 license = licenses.gpl3;
95 maintainers = with maintainers; [
98 platforms = platforms.unix;