geph.{cli,gui}: 4.7.8 -> 4.10.1

This commit is contained in:
penalty1083 2023-11-02 17:52:33 +08:00
parent ef0fa8ffdc
commit 8f68c2d142
3 changed files with 4519 additions and 3683 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,19 +2,23 @@
, stdenvNoCC , stdenvNoCC
, rustPlatform , rustPlatform
, fetchFromGitHub , fetchFromGitHub
, buildNpmPackage , buildGoModule
, makeWrapper
, nodePackages
, esbuild
, jq
, moreutils
, perl , perl
, pkg-config , pkg-config
, glib , glib
, webkitgtk , webkitgtk
, libappindicator-gtk3
, libayatana-appindicator , libayatana-appindicator
, cairo , cairo
, openssl , openssl
}: }:
let let
version = "4.7.8"; version = "4.10.1";
geph-meta = with lib; { geph-meta = with lib; {
description = "A modular Internet censorship circumvention system designed specifically to deal with national filtering."; description = "A modular Internet censorship circumvention system designed specifically to deal with national filtering.";
homepage = "https://geph.io"; homepage = "https://geph.io";
@ -31,10 +35,10 @@ in
owner = "geph-official"; owner = "geph-official";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-DVGbLyFgraQMSIUAqDehF8DqbnvcaeWbuLVgiSQY3KE="; hash = "sha256-e0Pdg4pQ5s1wvTnFm1rKuAwkYtCtu2Uacd7yH3EHeCo=";
}; };
cargoHash = "sha256-uBq6rjUnKEscwhu60HEZffLvuXcArz+AiR52org+qKw="; cargoHash = "sha256-Kwc+EOH2pJJVvIcTUfL39Xrv/7YmTPUDge7mmjDs9pQ=";
nativeBuildInputs = [ perl ]; nativeBuildInputs = [ perl ];
@ -50,52 +54,91 @@ in
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "geph-official"; owner = "geph-official";
repo = "gephgui-pkg"; repo = "gephgui-pkg";
rev = "85a55bfc2f4314d9c49608f252080696b1f8e2a9"; rev = "4163e12188dd679ba548e127fc9771cb5e87bab0";
hash = "sha256-id/sfaQsF480kUXg//O5rBIciuuhDuXY19FQe1E3OQs="; hash = "sha256-wBvhfgp5sZTRCBR9HZqs1G0VaIt9DW2e9CWMAp/T5WI=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
gephgui = buildNpmPackage { pnpm-deps = stdenvNoCC.mkDerivation {
pname = "gephgui"; pname = "${pname}-pnpm-deps";
inherit version src; inherit src version;
sourceRoot = "${src.name}/gephgui-wry/gephgui"; sourceRoot = "source/gephgui-wry/gephgui";
postPatch = "ln -s ${./package-lock.json} ./package-lock.json"; nativeBuildInputs = [
jq
npmDepsHash = "sha256-5y6zpMF4M56DiWVhMvjJGsYpVdlJSoWoWyPgLc7hJoo="; moreutils
nodePackages.pnpm
];
installPhase = '' installPhase = ''
runHook preInstall export HOME=$(mktemp -d)
pnpm config set store-dir $out
pnpm install --ignore-scripts
mkdir -p $out # Remove timestamp and sort the json files
mv dist $out rm -rf $out/v3/tmp
for f in $(find $out -name "*.json"); do
runHook postInstall sed -i -E -e 's/"checkedAt":[0-9]+,//g' $f
jq --sort-keys . $f | sponge $f
done
''; '';
dontFixup = true;
outputHashMode = "recursive";
outputHash = "sha256-OKPx5xRI7DWd6m31nYx1biP0k6pcZ7fq7dfVlHda4O0=";
}; };
gephgui-wry = rustPlatform.buildRustPackage rec { gephgui-wry = rustPlatform.buildRustPackage {
pname = "gephgui-wry"; pname = "gephgui-wry";
inherit version src; inherit version src;
sourceRoot = "${src.name}/gephgui-wry"; sourceRoot = "source/gephgui-wry";
cargoHash = "sha256-lidlUUfHXKPUlICdaVv/SFlyyWsZ7cYHyTJ3kkMn3L4="; cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"tao-0.5.2" = "sha256-HyQyPRoAHUcgtYgaAW7uqrwEMQ45V+xVSxmlAZJfhv0=";
"wry-0.12.2" = "sha256-kTMXvignEF3FlzL0iSlF6zn1YTOCpyRUDN8EHpUS+yI=";
};
};
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [
pkg-config
nodePackages.pnpm
makeWrapper
];
buildInputs = [ buildInputs = [
glib glib
webkitgtk webkitgtk
libappindicator-gtk3
libayatana-appindicator libayatana-appindicator
cairo cairo
openssl openssl
]; ];
ESBUILD_BINARY_PATH = "${lib.getExe (esbuild.override {
buildGoModule = args: buildGoModule (args // rec {
version = "0.15.10";
src = fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
hash = "sha256-DebmLtgPrla+1UcvOHMnWmxa/ZqrugeRRKXIiJ9LYDk=";
};
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
});
})}";
preBuild = '' preBuild = ''
ln -s ${gephgui}/dist ./gephgui cd gephgui
export HOME=$(mktemp -d)
pnpm config set store-dir ${pnpm-deps}
pnpm install --ignore-scripts --offline
chmod -R +w node_modules
pnpm rebuild
pnpm build
cd ..
''; '';
}; };

File diff suppressed because it is too large Load Diff