nixpkgs/pkgs/development/python-modules/python3-saml/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

69 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
freezegun,
isodate,
lxml,
pytestCheckHook,
poetry-core,
xmlsec,
}:
buildPythonPackage rec {
pname = "python3-saml";
version = "1.16.0";
pyproject = true;
src = fetchFromGitHub {
owner = "onelogin";
repo = "python3-saml";
tag = "v${version}";
hash = "sha256-KyDGmqhg/c29FaXPKK8rWKSBP6BOCpKKpOujCavXUcc=";
};
patches = [
# Fix build system, https://github.com/SAML-Toolkits/python3-saml/pull/341
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/231a7e19543138fdd7424c01435dfe3f82bbe9ce.patch";
hash = "sha256-MvX1LXhf3LJUy3O7L0/ySyVY4KDGc/GKJud4pOkwVIk=";
})
];
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
isodate
lxml
xmlsec
];
nativeCheckInputs = [
freezegun
pytestCheckHook
];
pythonImportsCheck = [ "onelogin.saml2" ];
disabledTests = [
# Tests require network access or additions files
"OneLogin_Saml2_Metadata_Test"
"OneLogin_Saml2_Response_Test"
"OneLogin_Saml2_Utils_Test"
"OneLogin_Saml2_Settings_Test"
"OneLogin_Saml2_Auth_Test"
"OneLogin_Saml2_Authn_Request_Test"
"OneLogin_Saml2_IdPMetadataParser_Test"
"OneLogin_Saml2_Logout_Request_Test"
];
meta = {
description = "OneLogin's SAML Python Toolkit";
homepage = "https://github.com/onelogin/python3-saml";
changelog = "https://github.com/SAML-Toolkits/python3-saml/blob/v${version}/changelog.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ zhaofengli ];
};
}