2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
flit,
|
|
|
|
click,
|
|
|
|
cryptography,
|
|
|
|
ecdsa,
|
|
|
|
fido2,
|
|
|
|
intelhex,
|
|
|
|
pyserial,
|
|
|
|
pyusb,
|
|
|
|
requests,
|
2021-02-17 17:02:09 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "solo-python";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "0.1.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "solokeys";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-XVPYr7JwxeZfZ68+vQ7a7MNiAfJ2bvMbM3R1ryVJ+OU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
2021-02-17 17:02:09 +00:00
|
|
|
cryptography
|
2020-04-24 23:36:52 +00:00
|
|
|
ecdsa
|
|
|
|
fido2
|
|
|
|
intelhex
|
|
|
|
pyserial
|
|
|
|
pyusb
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"solo"
|
|
|
|
"solo.cli"
|
|
|
|
"solo.commands"
|
|
|
|
"solo.fido2"
|
|
|
|
"solo.operations"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-10-21 18:38:19 +00:00
|
|
|
description = "Python tool and library for SoloKeys Solo 1";
|
|
|
|
homepage = "https://github.com/solokeys/solo1-cli";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ wucke13 ];
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
asl20
|
|
|
|
mit
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
# not compatible with fido2 >= 1.0.0
|
|
|
|
# https://github.com/solokeys/solo1-cli/issues/157
|
|
|
|
broken = versionAtLeast fido2.version "1.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|