mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
156fe9a898
The GUI of GlobalProtect-openconnect is unfree software, while the CLI is licensed as GPLv3-only. This packaging work focuses on the CLI, and components required for the CLI. Link: https://github.com/yuezk/GlobalProtect-openconnect Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>
42 lines
952 B
Nix
42 lines
952 B
Nix
{
|
|
rustPlatform,
|
|
gpauth,
|
|
openconnect,
|
|
openssl,
|
|
perl,
|
|
vpnc-scripts,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "gpclient";
|
|
|
|
inherit (gpauth) version src meta;
|
|
|
|
buildAndTestSubdir = "apps/gpclient";
|
|
cargoHash = "sha256-aJYFBvVrj1n2+9WLLBH5WTRRzTle19LsdJ2DielJYik=";
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
buildInputs = [
|
|
gpauth
|
|
openconnect
|
|
openssl
|
|
];
|
|
|
|
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
|
|
'';
|
|
|
|
postFixup = ''
|
|
substituteInPlace $out/share/applications/gpgui.desktop \
|
|
--replace-fail /usr/bin/gpclient $out/bin/gpclient
|
|
'';
|
|
}
|