mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
globalprotect-openconnect: add core logic and packages for 2.x releases
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>
This commit is contained in:
parent
b6a158f7e4
commit
156fe9a898
@ -473,7 +473,10 @@
|
||||
- The `isync` package has been updated to version `1.5.0`, which introduces some breaking changes. See the [compatibility concerns](https://sourceforge.net/projects/isync/files/isync/1.5.0/) for more details.
|
||||
|
||||
- Legacy package `globalprotect-openconnect` 1.x and related module
|
||||
`globalprotect-vpn` were dropped.
|
||||
`globalprotect-vpn` were dropped. Two new packages `gpauth` and `gpclient`
|
||||
from the 2.x version of the GlobalProtect-openconnect project are added in its
|
||||
place. The GUI components related to the project are non-free and not
|
||||
packaged.
|
||||
|
||||
## Other Notable Changes {#sec-release-24.11-notable-changes}
|
||||
|
||||
|
50
pkgs/by-name/gp/gpauth/package.nix
Normal file
50
pkgs/by-name/gp/gpauth/package.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
rustPlatform,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
libsoup,
|
||||
openssl,
|
||||
pkg-config,
|
||||
perl,
|
||||
webkitgtk,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "gpauth";
|
||||
version = "2.3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yuezk";
|
||||
repo = "GlobalProtect-openconnect";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Zr888II65bUjrbStZfD0AYCXKY6VdKVJHQhbKwaY3is=";
|
||||
};
|
||||
|
||||
buildAndTestSubdir = "apps/gpauth";
|
||||
cargoHash = "sha256-AuYw8CC0bMJzIJJQXhcQajQ4SACz4aKv6rG4HMq7U18=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
perl
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
libsoup
|
||||
openssl
|
||||
webkitgtk
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/${src.owner}/${src.repo}/blob/${src.rev}/changelog.md";
|
||||
description = "A CLI for GlobalProtect VPN, based on OpenConnect, supports the SSO authentication method";
|
||||
longDescription = ''
|
||||
A CLI for GlobalProtect VPN, based on OpenConnect, supports the SSO
|
||||
authentication method. Inspired by gp-saml-gui.
|
||||
|
||||
The CLI version is always free and open source in this repo. It has almost
|
||||
the same features as the GUI version.
|
||||
'';
|
||||
homepage = "https://github.com/${src.owner}/${src.repo}";
|
||||
license = with licenses; [ gpl3Only ];
|
||||
maintainers = with maintainers; [ binary-eater ];
|
||||
};
|
||||
}
|
41
pkgs/by-name/gp/gpclient/package.nix
Normal file
41
pkgs/by-name/gp/gpclient/package.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
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
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user