geph -> geph5 : 4.99.16 -> 0.2.61 (#398813)

authored by Arne Keller and committed by GitHub 8e468f55 43703b05

+152 -144
+10
maintainers/maintainer-list.nix
··· 15720 15720 name = "John McParland"; 15721 15721 keys = [ { fingerprint = "39D2 171D D733 C718 DD21 285E B326 E14B 05D8 7A4E"; } ]; 15722 15722 }; 15723 + MCSeekeri = { 15724 + email = "mcseekeri@outlook.com"; 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 + }; 15723 15733 McSinyx = { 15724 15734 email = "cnx@loang.net"; 15725 15735 github = "McSinyx";
-142
pkgs/applications/networking/geph/default.nix
··· 1 - { 2 - lib, 3 - stdenvNoCC, 4 - rustPlatform, 5 - fetchFromGitHub, 6 - buildGoModule, 7 - makeWrapper, 8 - nodejs, 9 - pnpm, 10 - esbuild, 11 - perl, 12 - pkg-config, 13 - glib, 14 - webkitgtk_4_0, 15 - libayatana-appindicator, 16 - cairo, 17 - openssl, 18 - }: 19 - 20 - let 21 - version = "4.99.16"; 22 - geph-meta = with lib; { 23 - description = "Modular Internet censorship circumvention system designed specifically to deal with national filtering"; 24 - homepage = "https://geph.io"; 25 - platforms = platforms.linux; 26 - maintainers = with maintainers; [ penalty1083 ]; 27 - }; 28 - in 29 - { 30 - cli = rustPlatform.buildRustPackage rec { 31 - pname = "geph4-client"; 32 - inherit version; 33 - 34 - src = fetchFromGitHub { 35 - owner = "geph-official"; 36 - repo = pname; 37 - rev = "v${version}"; 38 - hash = "sha256-6YWPsSRIZpvVCIGZ1z7srobDvVzLr0o2jBcB/7kbK7I="; 39 - }; 40 - 41 - useFetchCargoVendor = true; 42 - cargoHash = "sha256-igIYTlI3hqvlOTgdwouA9YussP9h0pOHUUTCjA2LE5U="; 43 - 44 - nativeBuildInputs = [ perl ]; 45 - 46 - meta = geph-meta // { 47 - license = with lib.licenses; [ gpl3Only ]; 48 - }; 49 - }; 50 - 51 - gui = stdenvNoCC.mkDerivation (finalAttrs: { 52 - pname = "geph-gui"; 53 - inherit version; 54 - 55 - src = fetchFromGitHub { 56 - owner = "geph-official"; 57 - repo = "gephgui-pkg"; 58 - rev = "9f0d5c689c2cae67a4750a68295676f449724a98"; 59 - hash = "sha256-/aHd1EDrFp1kXen5xRCCl8LVlMVH0pY8buILZri81II="; 60 - fetchSubmodules = true; 61 - }; 62 - 63 - gephgui-wry = rustPlatform.buildRustPackage { 64 - pname = "gephgui-wry"; 65 - inherit (finalAttrs) version src; 66 - 67 - sourceRoot = "${finalAttrs.src.name}/gephgui-wry"; 68 - 69 - useFetchCargoVendor = true; 70 - cargoHash = "sha256-pCj4SulUVEC4QTPBrPQBn5xJ+sHPs6KfjsdVRcsRapY="; 71 - 72 - pnpmDeps = pnpm.fetchDeps { 73 - inherit (finalAttrs) pname version src; 74 - sourceRoot = "${finalAttrs.src.name}/gephgui-wry/gephgui"; 75 - hash = "sha256-0MGlsLEgugQ1wEz07ROIwkanTa8PSKwIaxNahyS1014="; 76 - }; 77 - 78 - nativeBuildInputs = [ 79 - pkg-config 80 - pnpm.configHook 81 - makeWrapper 82 - nodejs 83 - ]; 84 - 85 - buildInputs = [ 86 - glib 87 - webkitgtk_4_0 88 - libayatana-appindicator 89 - cairo 90 - openssl 91 - ]; 92 - 93 - ESBUILD_BINARY_PATH = "${lib.getExe ( 94 - esbuild.override { 95 - buildGoModule = 96 - args: 97 - buildGoModule ( 98 - args 99 - // rec { 100 - version = "0.15.10"; 101 - src = fetchFromGitHub { 102 - owner = "evanw"; 103 - repo = "esbuild"; 104 - rev = "v${version}"; 105 - hash = "sha256-DebmLtgPrla+1UcvOHMnWmxa/ZqrugeRRKXIiJ9LYDk="; 106 - }; 107 - vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ="; 108 - } 109 - ); 110 - } 111 - )}"; 112 - 113 - pnpmRoot = "gephgui"; 114 - 115 - preBuild = '' 116 - pushd gephgui 117 - pnpm build 118 - popd 119 - ''; 120 - }; 121 - 122 - dontBuild = true; 123 - 124 - installPhase = '' 125 - install -Dt $out/bin ${finalAttrs.gephgui-wry}/bin/gephgui-wry 126 - install -d $out/share/icons/hicolor 127 - for i in '16' '32' '64' '128' '256' 128 - do 129 - name=''${i}x''${i} 130 - dir=$out/share/icons/hicolor 131 - mkdir -p $dir 132 - mv flatpak/icons/$name $dir 133 - done 134 - install -Dt $out/share/applications flatpak/icons/io.geph.GephGui.desktop 135 - sed -i -e '/StartupWMClass/s/=.*/=gephgui-wry/' $out/share/applications/io.geph.GephGui.desktop 136 - ''; 137 - 138 - meta = geph-meta // { 139 - license = with lib.licenses; [ unfree ]; 140 - }; 141 - }); 142 - }
+115
pkgs/by-name/ge/geph/package.nix
··· 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 + })
+27
pkgs/by-name/ge/geph/test-fix.patch
··· 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) {
-2
pkgs/top-level/all-packages.nix
··· 8138 8138 gecode_6 = qt5.callPackage ../development/libraries/gecode { }; 8139 8139 gecode = gecode_6; 8140 8140 8141 - geph = recurseIntoAttrs (callPackages ../applications/networking/geph { pnpm = pnpm_8; }); 8142 - 8143 8141 gegl = callPackage ../development/libraries/gegl { 8144 8142 openexr = openexr_2; 8145 8143 };