2024-09-26 11:04:55 +00:00
|
|
|
{
|
|
|
|
rustPlatform,
|
2024-10-23 06:41:50 +00:00
|
|
|
glib-networking,
|
2024-09-26 11:04:55 +00:00
|
|
|
gpauth,
|
2024-10-23 06:41:50 +00:00
|
|
|
makeWrapper,
|
2024-09-26 11:04:55 +00:00
|
|
|
openconnect,
|
|
|
|
openssl,
|
|
|
|
perl,
|
|
|
|
vpnc-scripts,
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "gpclient";
|
|
|
|
|
|
|
|
inherit (gpauth) version src meta;
|
|
|
|
|
|
|
|
buildAndTestSubdir = "apps/gpclient";
|
|
|
|
cargoHash = "sha256-aJYFBvVrj1n2+9WLLBH5WTRRzTle19LsdJ2DielJYik=";
|
|
|
|
|
2024-10-23 06:41:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
perl
|
|
|
|
makeWrapper
|
|
|
|
];
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = [
|
|
|
|
gpauth
|
|
|
|
openconnect
|
|
|
|
openssl
|
2024-10-23 06:41:50 +00:00
|
|
|
glib-networking
|
2024-09-26 11:04:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace crates/gpapi/src/lib.rs \
|
|
|
|
--replace-fail /usr/bin/gpauth ${gpauth}/bin/gpauth
|
|
|
|
substituteInPlace crates/common/src/vpn_utils.rs \
|
|
|
|
--replace-fail /usr/sbin/vpnc-script ${vpnc-scripts}/bin/vpnc-script
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
cp packaging/files/usr/share/applications/gpgui.desktop $out/share/applications/gpgui.desktop
|
|
|
|
'';
|
|
|
|
|
2024-10-23 06:41:50 +00:00
|
|
|
preFixup = ''
|
|
|
|
wrapProgram "$out/bin/gpclient" \
|
|
|
|
--prefix GIO_EXTRA_MODULES : ${glib-networking}/lib/gio/modules
|
|
|
|
'';
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/share/applications/gpgui.desktop \
|
|
|
|
--replace-fail /usr/bin/gpclient $out/bin/gpclient
|
|
|
|
'';
|
|
|
|
}
|