diff --git a/pkgs/development/python-modules/aws-adfs/default.nix b/pkgs/development/python-modules/aws-adfs/default.nix index 2f9cd1a0b19..461ce9d90d9 100644 --- a/pkgs/development/python-modules/aws-adfs/default.nix +++ b/pkgs/development/python-modules/aws-adfs/default.nix @@ -44,7 +44,9 @@ buildPythonPackage rec { # Relax version constraint postPatch = '' - sed -i 's/coverage < 4/coverage/' setup.py + substituteInPlace setup.py \ + --replace 'coverage < 4' 'coverage' \ + --replace 'fido2>=0.8.1,<0.9.0' 'fido2>=0.8.1,<1.0.0' ''; # Test suite writes files to $HOME/.aws/, or /homeless-shelter if unset diff --git a/pkgs/development/python-modules/fido2/default.nix b/pkgs/development/python-modules/fido2/default.nix index ac8e912ba3d..1e1af8e9591 100644 --- a/pkgs/development/python-modules/fido2/default.nix +++ b/pkgs/development/python-modules/fido2/default.nix @@ -9,17 +9,27 @@ buildPythonPackage rec { pname = "fido2"; - version = "0.8.1"; + version = "0.9.1"; src = fetchPypi { inherit pname version; - sha256 = "1hzprnd407g2xh9kyv8j8pq949hwr1snmg3fp65pqfbghzv6i424"; + hash = "sha256-hoDuJSOOIwdZbrOQCg+MDZzJEYkUbtgDlUTxo6ad/m4="; }; propagatedBuildInputs = [ six cryptography ]; checkInputs = [ mock pyfakefs ]; + # Testing with `python setup.py test` doesn't work: + # https://github.com/Yubico/python-fido2/issues/108#issuecomment-763513576 + checkPhase = '' + runHook preCheck + + python -m unittest discover -v + + runHook postCheck + ''; + pythonImportsCheck = [ "fido2" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/makefun/default.nix b/pkgs/development/python-modules/makefun/default.nix new file mode 100644 index 00000000000..1f5596a46cc --- /dev/null +++ b/pkgs/development/python-modules/makefun/default.nix @@ -0,0 +1,32 @@ +{ lib +, fetchPypi +, buildPythonPackage +, setuptools_scm +}: + +buildPythonPackage rec { + pname = "makefun"; + version = "1.11.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-2qNQpILtWLVyREPGUUMhkem5ewyDdDh50JExccaigIU="; + }; + + nativeBuildInputs = [ setuptools_scm ]; + + # Disabling tests for now due to various (transitive) dependencies on modules + # from @smarie which are, as of yet, not part of nixpkgs. Also introduces + # a tricky dependency: makefun tests depend on pytest-cases, installing + # pytest-cases depends on makefun. + doCheck = false; + + pythonImportsCheck = [ "makefun" ]; + + meta = with lib; { + homepage = "https://github.com/smarie/python-makefun"; + description = "Small library to dynamically create python functions"; + license = licenses.bsd2; + maintainers = with maintainers; [ veehaitch ]; + }; +} diff --git a/pkgs/development/python-modules/solo-python/default.nix b/pkgs/development/python-modules/solo-python/default.nix index 72546642009..8d84ce34eb9 100644 --- a/pkgs/development/python-modules/solo-python/default.nix +++ b/pkgs/development/python-modules/solo-python/default.nix @@ -60,5 +60,8 @@ homepage = "https://github.com/solokeys/solo-python"; maintainers = with maintainers; [ wucke13 ]; license = with licenses; [ asl20 mit ]; + # solo-python v0.0.27 does not support fido2 >= v0.9 + # https://github.com/solokeys/solo-python/issues/110 + broken = true; }; } diff --git a/pkgs/tools/misc/yubikey-manager/default.nix b/pkgs/tools/misc/yubikey-manager/default.nix index 07218d054df..12b3aa0f05f 100644 --- a/pkgs/tools/misc/yubikey-manager/default.nix +++ b/pkgs/tools/misc/yubikey-manager/default.nix @@ -3,11 +3,11 @@ python3Packages.buildPythonPackage rec { pname = "yubikey-manager"; - version = "3.1.2"; + version = "4.0.1"; srcs = fetchurl { url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz"; - hash = "sha256-dwnIOuu0QyWRl6RSdyQw7dGsAZ4xpXpx6jOpCkp4efE="; + hash = "sha256-OxbKo5vwOBabU6/2hO4RMWiifo4IVIxz+DlcwP9xO/E="; }; propagatedBuildInputs = @@ -42,8 +42,7 @@ python3Packages.buildPythonPackage rec { --replace 'compdef _ykman_completion ykman;' '_ykman_completion "$@"' ''; - # See https://github.com/NixOS/nixpkgs/issues/29169 - doCheck = false; + checkInputs = with python3Packages; [ pytestCheckHook makefun ]; meta = with lib; { homepage = "https://developers.yubico.com/yubikey-manager"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5ab645a6a22..00d1934a070 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4115,6 +4115,8 @@ in { mail-parser = callPackage ../development/python-modules/mail-parser { }; + makefun = callPackage ../development/python-modules/makefun { }; + Mako = callPackage ../development/python-modules/Mako { }; managesieve = callPackage ../development/python-modules/managesieve { };