Merge pull request #118725 from veehaitch/yubikey-manager-4.0.1

This commit is contained in:
Sandro 2021-04-08 11:29:00 +02:00 committed by GitHub
commit 65cb4ce042
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 7 deletions

View file

@ -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

View file

@ -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; {

View file

@ -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 ];
};
}

View file

@ -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;
};
}

View file

@ -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";

View file

@ -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 { };