From b08d6a664f548c86446439a1e24e484b0ee140ea Mon Sep 17 00:00:00 2001 From: Rahul Rameshbabu Date: Sat, 1 Jun 2024 10:49:32 -0700 Subject: globalprotect-openconnect: remove deprecated 1.x package The 1.x iteration of globalprotect-openconnect is no longer being developed. Remove related components from nixpkgs. Signed-off-by: Rahul Rameshbabu --- nixos/doc/manual/release-notes/rl-2411.section.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nixos/doc/manual') diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 6600679ad168f..607fc44eb690e 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -472,6 +472,9 @@ - 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. + ## Other Notable Changes {#sec-release-24.11-notable-changes} -- cgit 1.4.1 From 156fe9a8981b45dc5af47b7bef8ac501f6c6f599 Mon Sep 17 00:00:00 2001 From: Rahul Rameshbabu Date: Sat, 1 Jun 2024 14:31:11 -0700 Subject: 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 --- nixos/doc/manual/release-notes/rl-2411.section.md | 5 ++- pkgs/by-name/gp/gpauth/package.nix | 50 +++++++++++++++++++++++ pkgs/by-name/gp/gpclient/package.nix | 41 +++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 pkgs/by-name/gp/gpauth/package.nix create mode 100644 pkgs/by-name/gp/gpclient/package.nix (limited to 'nixos/doc/manual') diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 607fc44eb690e..12372c0a3a587 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -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} diff --git a/pkgs/by-name/gp/gpauth/package.nix b/pkgs/by-name/gp/gpauth/package.nix new file mode 100644 index 0000000000000..e1199c9ed372b --- /dev/null +++ b/pkgs/by-name/gp/gpauth/package.nix @@ -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 ]; + }; +} diff --git a/pkgs/by-name/gp/gpclient/package.nix b/pkgs/by-name/gp/gpclient/package.nix new file mode 100644 index 0000000000000..786123e74d443 --- /dev/null +++ b/pkgs/by-name/gp/gpclient/package.nix @@ -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 + ''; +} -- cgit 1.4.1