tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
tuntox: init at 0.0.10
authored by
Will Cohen
and committed by
ehmry
4 years ago
4994cd3f
ed39a3ff
+82
2 changed files
expand all
collapse all
unified
split
pkgs
tools
networking
tuntox
default.nix
top-level
all-packages.nix
+80
pkgs/tools/networking/tuntox/default.nix
···
1
1
+
{ lib
2
2
+
, stdenv
3
3
+
, cscope
4
4
+
, fetchFromGitHub
5
5
+
, fetchpatch
6
6
+
, git
7
7
+
, libevent
8
8
+
, libopus
9
9
+
, libsodium
10
10
+
, libtoxcore
11
11
+
, libvpx
12
12
+
, pkg-config
13
13
+
, python3
14
14
+
, python3Packages
15
15
+
}:
16
16
+
17
17
+
stdenv.mkDerivation rec {
18
18
+
pname = "tuntox";
19
19
+
version = "0.0.10";
20
20
+
21
21
+
src = fetchFromGitHub {
22
22
+
owner = "gjedeer";
23
23
+
repo = pname;
24
24
+
rev = "${version}";
25
25
+
sha256 = "sha256-c/0OxUH8iw8nRuVg4Fszf6Z/JiEV+m0B2ofzy81uFu8=";
26
26
+
};
27
27
+
28
28
+
nativeBuildInputs = [ cscope git pkg-config ];
29
29
+
30
30
+
buildInputs = [ libopus libtoxcore libsodium libevent libvpx python3 ];
31
31
+
32
32
+
pythonBuildInputs = with python3Packages; [
33
33
+
jinja2
34
34
+
requests
35
35
+
];
36
36
+
37
37
+
patches = [
38
38
+
# https://github.com/gjedeer/tuntox/pull/67
39
39
+
(fetchpatch {
40
40
+
url = "https://github.com/gjedeer/tuntox/compare/a646402f42e120c7148d4de29dbdf5b09027a80a..365d2e5cbc0e3655fb64c204db0515f5f4cdf5a4.patch";
41
41
+
sha256 = "sha256-P3uIRnV+pBi3s3agGYUMt2PZU4CRxx/DUR8QPVQ+UN8=";
42
42
+
})
43
43
+
];
44
44
+
45
45
+
postPatch = ''
46
46
+
substituteInPlace gitversion.h --replace '7d45afdf7d00a95a8c3687175e2b1669fa1f7745' '365d2e5cbc0e3655fb64c204db0515f5f4cdf5a4'
47
47
+
'' + lib.optionalString stdenv.isLinux ''
48
48
+
substituteInPlace Makefile --replace ' -static ' ' '
49
49
+
substituteInPlace Makefile --replace 'CC=gcc' ' '
50
50
+
'' + lib.optionalString stdenv.isDarwin ''
51
51
+
substituteInPlace Makefile.mac --replace '.git/HEAD .git/index' ' '
52
52
+
substituteInPlace Makefile.mac --replace '/usr/local/lib/libtoxcore.a' '${libtoxcore}/lib/libtoxcore.a'
53
53
+
substituteInPlace Makefile.mac --replace '/usr/local/lib/libsodium.a' '${libsodium}/lib/libsodium.dylib'
54
54
+
substituteInPlace Makefile.mac --replace 'CC=gcc' ' '
55
55
+
'';
56
56
+
57
57
+
buildPhase = ''
58
58
+
'' + lib.optionalString stdenv.isLinux ''
59
59
+
make
60
60
+
'' + lib.optionalString stdenv.isDarwin ''
61
61
+
make -f Makefile.mac tuntox
62
62
+
'';
63
63
+
64
64
+
installPhase = ''
65
65
+
mkdir -p $out/bin
66
66
+
mv tuntox $out/bin/
67
67
+
'';
68
68
+
69
69
+
doCheck = false;
70
70
+
71
71
+
meta = with lib; {
72
72
+
description = "Tunnel TCP connections over the Tox protocol";
73
73
+
homepage = "https://github.com/gjedeer/tuntox";
74
74
+
license = licenses.gpl3;
75
75
+
maintainers = with maintainers; [
76
76
+
willcohen
77
77
+
];
78
78
+
platforms = platforms.unix;
79
79
+
};
80
80
+
}
+2
pkgs/top-level/all-packages.nix
···
10536
10536
10537
10537
trytond = with python3Packages; toPythonApplication trytond;
10538
10538
10539
10539
+
tuntox = callPackage ../tools/networking/tuntox { };
10540
10540
+
10539
10541
omapd = callPackage ../tools/security/omapd { };
10540
10542
10541
10543
ttf2pt1 = callPackage ../tools/misc/ttf2pt1 { };