From e81bb99e10cb1b9ace02e651cb3cd732aa3ee02b Mon Sep 17 00:00:00 2001 From: MCSeekeri Date: Fri, 20 Mar 2026 10:45:17 +0800 Subject: [PATCH] geph: fix scripts and dependencies in env --- pkgs/by-name/ge/geph/package.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ge/geph/package.nix b/pkgs/by-name/ge/geph/package.nix index 26c45b43dce3..554193f78713 100644 --- a/pkgs/by-name/ge/geph/package.nix +++ b/pkgs/by-name/ge/geph/package.nix @@ -2,16 +2,21 @@ lib, rustPlatform, fetchFromGitHub, + makeBinaryWrapper, pkg-config, openssl, rust-jemalloc-sys-unprefixed, sqlite, + bash, + coreutils, iproute2, iptables, nix-update-script, }: let binPath = lib.makeBinPath [ + bash + coreutils iproute2 iptables ]; @@ -32,9 +37,16 @@ rustPlatform.buildRustPackage (finalAttrs: { postPatch = '' substituteInPlace binaries/geph5-client/src/vpn/*.sh \ --replace-fail 'PATH=' 'PATH=${binPath}:' + + substituteInPlace binaries/geph5-client/src/vpn/linux.rs \ + --replace-fail 'Command::new("sh")' 'Command::new("${bash}/bin/sh")' \ + --replace-fail '/usr/bin/env ' '${lib.getExe' coreutils "env"} ' ''; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + makeBinaryWrapper + pkg-config + ]; buildInputs = [ openssl @@ -64,6 +76,12 @@ rustPlatform.buildRustPackage (finalAttrs: { "--skip=tests::ping_pong" ]; + postFixup = '' + for program in $out/bin/*; do + wrapProgram "$program" --prefix PATH : ${binPath} + done + ''; + passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex"