mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 15:06:14 -05:00
Prefer Native Shell on supported Linux installations
This commit is contained in:
37 files changed
+869
-250
No files matched your search
+5
-9
@@ -1,23 +1,19 @@
|
||||
{ pkgs, archive, checksum, binaryName, version }:
|
||||
{ pkgs, src, binaryName, version }:
|
||||
let
|
||||
nativeShell = binaryName == "gpgui-nsh";
|
||||
in
|
||||
assert builtins.elem binaryName [ "gpgui" "gpgui-nsh" ];
|
||||
assert pkgs.lib.assertMsg (!nativeShell || pkgs.lib.versionAtLeast pkgs.gtk4.version "4.14")
|
||||
"Native Shell requires GTK 4.14 or later.";
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = binaryName;
|
||||
inherit version;
|
||||
src = builtins.path {
|
||||
path = builtins.toPath archive;
|
||||
name = "${binaryName}.tar.xz";
|
||||
recursive = false;
|
||||
sha256 = checksum;
|
||||
};
|
||||
inherit src version;
|
||||
dontBuild = true;
|
||||
nativeBuildInputs = [ pkgs.autoPatchelfHook ] ++ (
|
||||
if nativeShell then [ pkgs.wrapGAppsHook4 ] else [ pkgs.wrapGAppsHook3 ]
|
||||
);
|
||||
buildInputs = with pkgs;
|
||||
[ gnutls ] ++ (if nativeShell then [ gtk4 ] else [
|
||||
[ gnutls ] ++ (if nativeShell then [ gtk4 dbus ] else [
|
||||
gtk3 webkitgtk_4_1 libsoup_3 glib-networking libsecret
|
||||
]);
|
||||
runtimeDependencies = [ pkgs.libglvnd ] ++ pkgs.lib.optionals (!nativeShell) [
|
||||
|
||||
Reference in new issue
Block a user