git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #118725 from veehaitch/yubikey-manager-4.0.1
commit65cb4ce042651a7b4c5053a7d4fafc12ff928627 authorSandro <sandro.jaeckel@gmail.com> dateThu 8 Apr 2021, 11:29 (6 years ago) parent2db94be042b705
6 files changed+55−7
pkgs/development/python-modules/aws-adfs/default.nix+3−1 pkgs/development/python-modules/fido2/default.nix+12−2 pkgs/development/python-modules/makefun/default.nix+32 pkgs/development/python-modules/solo-python/default.nix+3 pkgs/tools/misc/yubikey-manager/default.nix+3−4 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/aws-adfs/default.nix+3−1
@@ -44,7 +44,9 @@ buildPythonPackage rec {
4444
4545 # Relax version constraint
4646 postPatch = ''
47− sed -i 's/coverage < 4/coverage/' setup.py
47+ substituteInPlace setup.py \
48+ --replace 'coverage < 4' 'coverage' \
49+ --replace 'fido2>=0.8.1,<0.9.0' 'fido2>=0.8.1,<1.0.0'
4850 '';
4951
5052 # Test suite writes files to $HOME/.aws/, or /homeless-shelter if unset
pkgs/development/python-modules/fido2/default.nix+12−2
@@ -9,17 +9,27 @@
99
1010buildPythonPackage rec {
1111 pname = "fido2";
12− version = "0.8.1";
12+ version = "0.9.1";
1313
1414 src = fetchPypi {
1515 inherit pname version;
16− sha256 = "1hzprnd407g2xh9kyv8j8pq949hwr1snmg3fp65pqfbghzv6i424";
16+ hash = "sha256-hoDuJSOOIwdZbrOQCg+MDZzJEYkUbtgDlUTxo6ad/m4=";
1717 };
1818
1919 propagatedBuildInputs = [ six cryptography ];
2020
2121 checkInputs = [ mock pyfakefs ];
2222
23+ # Testing with `python setup.py test` doesn't work:
24+ # https://github.com/Yubico/python-fido2/issues/108#issuecomment-763513576
25+ checkPhase = ''
26+ runHook preCheck
27+
28+ python -m unittest discover -v
29+
30+ runHook postCheck
31+ '';
32+
2333 pythonImportsCheck = [ "fido2" ];
2434
2535 meta = with lib; {
pkgs/development/python-modules/makefun/default.nixnew file+32
@@ -0,0 +1,32 @@
1+{ lib
2+, fetchPypi
3+, buildPythonPackage
4+, setuptools_scm
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "makefun";
9+ version = "1.11.2";
10+
11+ src = fetchPypi {
12+ inherit pname version;
13+ sha256 = "sha256-2qNQpILtWLVyREPGUUMhkem5ewyDdDh50JExccaigIU=";
14+ };
15+
16+ nativeBuildInputs = [ setuptools_scm ];
17+
18+ # Disabling tests for now due to various (transitive) dependencies on modules
19+ # from @smarie which are, as of yet, not part of nixpkgs. Also introduces
20+ # a tricky dependency: makefun tests depend on pytest-cases, installing
21+ # pytest-cases depends on makefun.
22+ doCheck = false;
23+
24+ pythonImportsCheck = [ "makefun" ];
25+
26+ meta = with lib; {
27+ homepage = "https://github.com/smarie/python-makefun";
28+ description = "Small library to dynamically create python functions";
29+ license = licenses.bsd2;
30+ maintainers = with maintainers; [ veehaitch ];
31+ };
32+}
pkgs/development/python-modules/solo-python/default.nix+3
@@ -60,5 +60,8 @@
6060 homepage = "https://github.com/solokeys/solo-python";
6161 maintainers = with maintainers; [ wucke13 ];
6262 license = with licenses; [ asl20 mit ];
63+ # solo-python v0.0.27 does not support fido2 >= v0.9
64+ # https://github.com/solokeys/solo-python/issues/110
65+ broken = true;
6366 };
6467}
pkgs/tools/misc/yubikey-manager/default.nix+3−4
@@ -3,11 +3,11 @@
33
44python3Packages.buildPythonPackage rec {
55 pname = "yubikey-manager";
6− version = "3.1.2";
6+ version = "4.0.1";
77
88 srcs = fetchurl {
99 url = "https://developers.yubico.com/${pname}/Releases/${pname}-${version}.tar.gz";
10− hash = "sha256-dwnIOuu0QyWRl6RSdyQw7dGsAZ4xpXpx6jOpCkp4efE=";
10+ hash = "sha256-OxbKo5vwOBabU6/2hO4RMWiifo4IVIxz+DlcwP9xO/E=";
1111 };
1212
1313 propagatedBuildInputs =
@@ -42,8 +42,7 @@ python3Packages.buildPythonPackage rec {
4242 --replace 'compdef _ykman_completion ykman;' '_ykman_completion "$@"'
4343 '';
4444
45− # See https://github.com/NixOS/nixpkgs/issues/29169
46− doCheck = false;
45+ checkInputs = with python3Packages; [ pytestCheckHook makefun ];
4746
4847 meta = with lib; {
4948 homepage = "https://developers.yubico.com/yubikey-manager";
pkgs/top-level/python-packages.nix+2
@@ -4115,6 +4115,8 @@ in {
41154115
41164116 mail-parser = callPackage ../development/python-modules/mail-parser { };
41174117
4118+ makefun = callPackage ../development/python-modules/makefun { };
4119+
41184120 Mako = callPackage ../development/python-modules/Mako { };
41194121
41204122 managesieve = callPackage ../development/python-modules/managesieve { };