Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / onlykey-solo-python / default.nix
blobad01e5b2f8201f4a9aea5f33c749552b222a1c45
1 { buildPythonPackage
2 , click
3 , ecdsa
4 , fetchpatch
5 , fetchPypi
6 , fido2
7 , intelhex
8 , lib
9 , pyserial
10 , pyusb
11 , requests
14 buildPythonPackage rec {
15   pname = "onlykey-solo-python";
16   version = "0.0.32";
17   format = "setuptools";
19   src = fetchPypi {
20     inherit pname version;
21     hash = "sha256-88DuhgX4FCwzIKzw4RqWgMtjRdf5huVlKEHAAEminuQ=";
22   };
24   postPatch = ''
25     substituteInPlace setup.py \
26       --replace "fido2 == 0.9.3" "fido2"
27   '';
29   patches = [
30     # https://github.com/trustcrypto/onlykey-solo-python/pull/2
31     (fetchpatch {
32       url = "https://github.com/trustcrypto/onlykey-solo-python/commit/c5a86506f940d4e8fbb670ed665ddca48779cbe9.patch";
33       hash = "sha256-LhCUR5QH9Je/Nr185HgQxfkCtat8W2Huv62zr5Mlrn4=";
34     })
35   ];
37   propagatedBuildInputs = [ click ecdsa fido2 intelhex pyserial pyusb requests ];
39   # no tests
40   doCheck = false;
41   pythonImportsCheck = [ "solo" ];
43   meta = with lib; {
44     homepage = "https://github.com/trustcrypto/onlykey-solo-python";
45     description = "Python library for OnlyKey with Solo FIDO2";
46     maintainers = with maintainers; [ kalbasit ];
47     license = licenses.asl20;
48   };