Martin Weinelt ae4a1a485a
treewide: add explicit format attribute for Python packages
If a Python package does not come with either `format` or `pyproject` we
consider it a setuptools build, that calls `setup.py` directly, which is
deprecated.

This change, as a first step, migrates a large chunk of these packages to
set setuptools as their explicit format

This is so we can unify the problem space for the next step of the
migration.
2025-07-02 05:56:47 +02:00

54 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
webkitgtk_4_1,
wrapGAppsHook3,
glib-networking,
gobject-introspection,
openconnect,
pygobject3,
requests,
}:
buildPythonPackage rec {
pname = "gp-saml-gui";
version = "0.1+20240731-${lib.strings.substring 0 7 src.rev}";
format = "setuptools";
src = fetchFromGitHub {
owner = "dlenski";
repo = "gp-saml-gui";
rev = "c46af04b3a6325b0ecc982840d7cfbd1629b6d43";
sha256 = "sha256-4MFHad1cuCWawy2hrqdXOgud0pXpYiV9J3Jwqyg4Udk=";
};
buildInputs = lib.optional stdenv.hostPlatform.isLinux glib-networking;
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
glib-networking
];
propagatedBuildInputs = [
requests
pygobject3
openconnect
] ++ lib.optional stdenv.hostPlatform.isLinux webkitgtk_4_1;
preFixup = ''
gappsWrapperArgs+=(
--set WEBKIT_DISABLE_COMPOSITING_MODE "1"
)
'';
meta = with lib; {
description = "Interactively authenticate to GlobalProtect VPNs that require SAML";
mainProgram = "gp-saml-gui";
homepage = "https://github.com/dlenski/gp-saml-gui";
license = licenses.gpl3Only;
maintainers = [ maintainers.pallix ];
};
}