Merge pull request #148381 from Artturin/openconnectshafix

globalprotect-openconnect: use ver rev instead of commit & correct sh…
This commit is contained in:
Artturi 2021-12-04 01:06:59 +02:00 committed by GitHub
commit 80457f0dc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchFromGitHub
, qmake, qtwebsockets, qtwebengine, wrapQtAppsHook, openconnect
, cmake, qtwebsockets, qtwebengine, wrapQtAppsHook, openconnect
}:
stdenv.mkDerivation rec {
@ -9,26 +9,16 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "yuezk";
repo = "GlobalProtect-openconnect";
rev = "c14a6ad1d2b62f8d297bc4cfbcb1dcea4d99112f";
fetchSubmodules = true;
sha256 = "sha256-M3+YGdN7LuuFEP9n94YJ/UDVhti/VlX0FzYMGeYebP4=";
rev = "v${version}";
sha256 = "sha256-w2y6DOFgQ8Xpi1abibvRNpEUbBsdvwDMGqlJxQSCpVg=";
};
nativeBuildInputs = [ qmake wrapQtAppsHook ];
nativeBuildInputs = [ cmake wrapQtAppsHook ];
buildInputs = [ openconnect qtwebsockets qtwebengine ];
patchPhase = ''
for f in GPClient/GPClient.pro \
GPClient/com.yuezk.qt.gpclient.desktop \
GPService/GPService.pro \
GPService/dbus/com.yuezk.qt.GPService.service \
GPService/systemd/gpservice.service; do
substituteInPlace $f \
--replace /usr $out \
--replace /etc $out/lib;
done;
substituteInPlace GPService/gpservice.h \
--replace /usr/local/bin/openconnect ${openconnect}/bin/openconnect;
'';