Skip to content

Commit 8e468f5

Browse files
geph -> geph5 : 4.99.16 -> 0.2.61 (#398813)
2 parents 43703b0 + c8955ea commit 8e468f5

File tree

5 files changed

+152
-144
lines changed

5 files changed

+152
-144
lines changed

maintainers/maintainer-list.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15720,6 +15720,16 @@
1572015720
name = "John McParland";
1572115721
keys = [ { fingerprint = "39D2 171D D733 C718 DD21 285E B326 E14B 05D8 7A4E"; } ];
1572215722
};
15723+
MCSeekeri = {
15724+
email = "[email protected]";
15725+
github = "mcseekeri";
15726+
githubId = 20928094;
15727+
name = "MCSeekeri";
15728+
keys = [
15729+
{ fingerprint = "5922 79AB D9D6 85EB 9D16 754C ECDC AD89 5A38 4A12"; }
15730+
{ fingerprint = "0762 A387 F160 76F1 116C BF13 3276 6666 6666 6666"; }
15731+
];
15732+
};
1572315733
McSinyx = {
1572415734
email = "[email protected]";
1572515735
github = "McSinyx";

pkgs/applications/networking/geph/default.nix

Lines changed: 0 additions & 142 deletions
This file was deleted.

pkgs/by-name/ge/geph/package.nix

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
lib,
3+
rustPlatform,
4+
fetchFromGitHub,
5+
pkg-config,
6+
libxkbcommon,
7+
openssl,
8+
rust-jemalloc-sys-unprefixed,
9+
sqlite,
10+
vulkan-loader,
11+
wayland,
12+
iproute2,
13+
iptables,
14+
libglvnd,
15+
copyDesktopItems,
16+
makeDesktopItem,
17+
}:
18+
let
19+
binPath = lib.makeBinPath [
20+
iproute2
21+
iptables
22+
];
23+
in
24+
rustPlatform.buildRustPackage (finalAttrs: {
25+
pname = "geph5";
26+
version = "0.2.61";
27+
28+
src = fetchFromGitHub {
29+
owner = "geph-official";
30+
repo = "geph5";
31+
rev = "geph5-client-v${finalAttrs.version}";
32+
hash = "sha256-qy1E5x5Fn+xwS5st6HkMrJu9nksXQQIyJf97FvNOKO4=";
33+
};
34+
35+
cargoHash = "sha256-r97DsSsqp/KtgqtYQe92nz2qaOBcJF6w9ckfxpk8Cxg=";
36+
37+
patches = [ ./test-fix.patch ];
38+
39+
postPatch = ''
40+
substituteInPlace binaries/geph5-client/src/vpn/*.sh \
41+
--replace-fail 'PATH=' 'PATH=${binPath}:'
42+
'';
43+
44+
nativeBuildInputs = [
45+
pkg-config
46+
copyDesktopItems
47+
];
48+
49+
buildInputs = [
50+
openssl
51+
rust-jemalloc-sys-unprefixed
52+
sqlite
53+
];
54+
55+
env = {
56+
OPENSSL_NO_VENDOR = true;
57+
LIBSQLITE3_SYS_USE_PKG_CONFIG = "1";
58+
};
59+
60+
buildFeatures = [
61+
"aws_lambda"
62+
"windivert"
63+
];
64+
65+
checkFlags = [
66+
# Wrong test
67+
"--skip=traffcount::tests::test_traffic_cleanup"
68+
"--skip=traffcount::tests::test_traffic_count_basic"
69+
# Requires network
70+
"--skip=dns::tests::resolve_google"
71+
# Never finish
72+
"--skip=tests::test_blind_sign"
73+
"--skip=tests::test_generate_secret_key"
74+
];
75+
76+
desktopItems = [
77+
(makeDesktopItem {
78+
name = "Geph5";
79+
desktopName = "Geph5";
80+
icon = "geph5";
81+
exec = "geph5-client-gui";
82+
categories = [ "Network" ];
83+
comment = "Modular Internet censorship circumvention system designed specifically to deal with national filtering";
84+
})
85+
];
86+
87+
postInstall = ''
88+
install -m 444 -D binaries/geph5-client-gui/icon.png $out/share/icons/hicolor/512x512/apps/geph5.png
89+
'';
90+
91+
postFixup = ''
92+
# Add required but not explicitly requested libraries
93+
patchelf --add-rpath '${
94+
lib.makeLibraryPath [
95+
wayland
96+
libxkbcommon
97+
vulkan-loader
98+
libglvnd
99+
]
100+
}' "$out/bin/geph5-client-gui"
101+
'';
102+
103+
meta = {
104+
description = "Modular Internet censorship circumvention system designed specifically to deal with national filtering";
105+
homepage = "https://github.com/geph-official/geph5";
106+
changelog = "https://github.com/geph-official/geph5/releases/tag/geph5-client-v${finalAttrs.version}";
107+
mainProgram = "geph5-client";
108+
platforms = lib.platforms.unix;
109+
license = lib.licenses.mpl20;
110+
maintainers = with lib.maintainers; [
111+
penalty1083
112+
MCSeekeri
113+
];
114+
};
115+
})
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/binaries/geph5-client/src/traffcount.rs b/binaries/geph5-client/src/traffcount.rs
2+
index 5c91a27..61c0b3b 100644
3+
--- a/binaries/geph5-client/src/traffcount.rs
4+
+++ b/binaries/geph5-client/src/traffcount.rs
5+
@@ -28,14 +28,14 @@ impl TraffCount {
6+
}
7+
8+
// /// Create a new traffic counter with custom history length
9+
- // pub fn with_history(max_seconds: usize) -> Self {
10+
- // let now = Instant::now();
11+
- // Self {
12+
- // bins: VecDeque::with_capacity(max_seconds),
13+
- // window_start: now,
14+
- // max_history_seconds: max_seconds,
15+
- // }
16+
- // }
17+
+ pub fn with_history(max_seconds: usize) -> Self {
18+
+ let now = Instant::now();
19+
+ Self {
20+
+ bins: VecDeque::with_capacity(max_seconds),
21+
+ window_start: now,
22+
+ max_history_seconds: max_seconds,
23+
+ }
24+
+ }
25+
26+
/// Increment the traffic count with the given number of bytes
27+
pub fn incr(&mut self, bytes: f64) {

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8138,8 +8138,6 @@ with pkgs;
81388138
gecode_6 = qt5.callPackage ../development/libraries/gecode { };
81398139
gecode = gecode_6;
81408140

8141-
geph = recurseIntoAttrs (callPackages ../applications/networking/geph { pnpm = pnpm_8; });
8142-
81438141
gegl = callPackage ../development/libraries/gegl {
81448142
openexr = openexr_2;
81458143
};

0 commit comments

Comments
 (0)