diff --git a/pkgs/by-name/gp/gpauth/package.nix b/pkgs/by-name/gp/gpauth/package.nix index 37f4afd5aa29..0ebd8cb93433 100644 --- a/pkgs/by-name/gp/gpauth/package.nix +++ b/pkgs/by-name/gp/gpauth/package.nix @@ -12,19 +12,19 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "gpauth"; - version = "2.5.0"; + version = "2.5.1"; src = fetchFromGitHub { owner = "yuezk"; repo = "GlobalProtect-openconnect"; tag = "v${finalAttrs.version}"; - hash = "sha256-dxRqf5iOlgJegeAqtTwoVqNHXU3eOse5eMYFknhAh2M="; + hash = "sha256-rux2rToqs5GZEDTryPAkm62yGdhWfEqapTMQOGyqCRI="; fetchSubmodules = true; }; buildAndTestSubdir = "apps/gpauth"; - cargoHash = "sha256-VkDq98Y6uBSal7m4V9vjW1XermOPOWulo3Jo34QFRsA="; + cargoHash = "sha256-xza7AfuOcSUkDyliGHUx9bEd+M94d23xVrVVvZo2nas="; nativeBuildInputs = [ perl diff --git a/pkgs/by-name/gp/gpclient/package.nix b/pkgs/by-name/gp/gpclient/package.nix index 14c334bb4a5e..bdd6c40375ac 100644 --- a/pkgs/by-name/gp/gpclient/package.nix +++ b/pkgs/by-name/gp/gpclient/package.nix @@ -1,43 +1,43 @@ { lib, rustPlatform, - glib-networking, stdenv, - gpauth, - makeWrapper, + atk, autoconf, automake, + cairo, + glib, + glib-networking, + gnutls, + gpauth, + gtk3, libtool, + libxml2, + lz4, + makeBinaryWrapper, openssl, + p11-kit, + pango, perl, pkg-config, vpnc-scripts, - glib, - pango, - cairo, - atk, - gtk3, - libxml2, - p11-kit, - lz4, - gnutls, }: rustPlatform.buildRustPackage { pname = "gpclient"; inherit (gpauth) - src - version cargoHash meta + src + version ; buildAndTestSubdir = "apps/gpclient"; nativeBuildInputs = [ + makeBinaryWrapper perl - makeWrapper pkg-config # used to build vendored openconnect @@ -46,37 +46,49 @@ rustPlatform.buildRustPackage { libtool ]; buildInputs = [ + glib + glib-networking gpauth openssl - glib-networking - glib - pango - cairo - atk - gtk3 # used for vendored openconnect + gnutls libxml2 lz4 p11-kit - gnutls + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + atk + cairo + gtk3 + pango ]; postPatch = '' - substituteInPlace crates/common/src/constants.rs \ - --replace-fail /usr/bin/gpauth ${gpauth}/bin/gpauth substituteInPlace crates/openconnect/src/vpn_utils.rs \ - --replace-fail /usr/sbin/vpnc-script ${vpnc-scripts}/bin/vpnc-script - substituteInPlace packaging/files/usr/share/applications/gpgui.desktop \ - --replace-fail /usr/bin/gpclient gpclient + --replace-fail /etc/vpnc/vpnc-script ${vpnc-scripts}/bin/vpnc-script \ + --replace-fail /usr/libexec/gpclient/hipreport.sh $out/libexec/gpclient/hipreport.sh + + substituteInPlace crates/common/src/constants.rs \ + --replace-fail /usr/bin/gpclient $out/bin/gpclient \ + --replace-fail /usr/bin/gpservice $out/bin/gpservice \ + --replace-fail /usr/bin/gpauth ${gpauth}/bin/gpauth \ + --replace-fail /opt/homebrew/ $out/ ''; - postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' - mkdir -p $out/share/applications - cp packaging/files/usr/share/applications/gpgui.desktop $out/share/applications/gpgui.desktop + postInstall = '' + cp -r packaging/files/usr/libexec $out/libexec + + substituteInPlace $out/libexec/gpclient/hipreport.sh \ + --replace-fail /usr/bin/gpclient $out/bin/gpclient + '' + + lib.optionalString stdenv.hostPlatform.isLinux '' + cp -r packaging/files/usr/lib $out/lib + substituteInPlace $out/lib/NetworkManager/dispatcher.d/pre-down.d/gpclient.down \ + --replace-fail /usr/bin/gpclient $out/bin/gpclient ''; - preFixup = '' + postFixup = '' wrapProgram "$out/bin/gpclient" \ --prefix GIO_EXTRA_MODULES : ${glib-networking}/lib/gio/modules '';