2019-11-01 17:33:21 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2019-09-25 16:56:45 +02:00
|
|
|
, click, ecdsa, fido2, intelhex, pyserial, pyusb, requests}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "solo-python";
|
2019-11-01 17:33:21 +01:00
|
|
|
version = "0.0.18";
|
2019-09-25 16:56:45 +02:00
|
|
|
format = "flit";
|
2019-11-01 17:33:21 +01:00
|
|
|
disabled = pythonOlder "3.6"; # only python>=3.6 is supported
|
2019-09-25 16:56:45 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "solokeys";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2019-11-01 17:33:21 +01:00
|
|
|
sha256 = "01mgppjvxlr93vrgz7bzisghpg1vqyaj4cg5wngk0h499iyx4d9q";
|
2019-09-25 16:56:45 +02:00
|
|
|
};
|
|
|
|
|
2019-11-01 17:33:21 +01:00
|
|
|
# replaced pinned fido, with unrestricted fido version
|
2019-09-25 16:56:45 +02:00
|
|
|
patchPhase = ''
|
2019-11-01 17:33:21 +01:00
|
|
|
sed -i '/fido2/c\"fido2",' pyproject.toml
|
2019-09-25 16:56:45 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
ecdsa
|
|
|
|
fido2
|
|
|
|
intelhex
|
|
|
|
pyserial
|
|
|
|
pyusb
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2019-11-01 17:33:21 +01: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 16:56:45 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|