2019-11-01 16:33:21 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2019-09-25 15:56:45 +01:00
|
|
|
, click, ecdsa, fido2, intelhex, pyserial, pyusb, requests}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "solo-python";
|
2020-09-01 16:40:32 +01:00
|
|
|
version = "0.0.26";
|
2019-09-25 15:56:45 +01:00
|
|
|
format = "flit";
|
2019-11-01 16:33:21 +00:00
|
|
|
disabled = pythonOlder "3.6"; # only python>=3.6 is supported
|
2019-09-25 15:56:45 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "solokeys";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-09-01 16:40:32 +01:00
|
|
|
sha256 = "05rwqrhr1as6zqhg63d6wga7l42jm2azbav5w6ih8mx5zbxf61yz";
|
2019-09-25 15:56:45 +01:00
|
|
|
};
|
|
|
|
|
2019-11-01 16:33:21 +00:00
|
|
|
# replaced pinned fido, with unrestricted fido version
|
2019-09-25 15:56:45 +01:00
|
|
|
patchPhase = ''
|
2019-11-01 16:33:21 +00:00
|
|
|
sed -i '/fido2/c\"fido2",' pyproject.toml
|
2019-09-25 15:56:45 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
ecdsa
|
|
|
|
fido2
|
|
|
|
intelhex
|
|
|
|
pyserial
|
|
|
|
pyusb
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2019-11-01 16:33:21 +00:00
|
|
|
# allow for writable directory for darwin
|
|
|
|
preBuild = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
# repo doesn't contain tests, ensure imports aren't broken
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"solo"
|
|
|
|
"solo.cli"
|
|
|
|
"solo.commands"
|
|
|
|
"solo.fido2"
|
|
|
|
"solo.operations"
|
|
|
|
];
|
|
|
|
|
2019-09-25 15:56:45 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python tool and library for SoloKeys";
|
|
|
|
homepage = "https://github.com/solokeys/solo-python";
|
|
|
|
maintainers = with maintainers; [ wucke13 ];
|
|
|
|
license = with licenses; [ asl20 mit ];
|
|
|
|
};
|
|
|
|
}
|