mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
216b47c4c1
+ also fix for 78032
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
|
, click, ecdsa, fido2, intelhex, pyserial, pyusb, requests}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "solo-python";
|
|
version = "0.0.23";
|
|
format = "flit";
|
|
disabled = pythonOlder "3.6"; # only python>=3.6 is supported
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "solokeys";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0r9cq0sd8pqnavgwa5cqgdxzbgly2baq8fpclnnz6anb2974kg3f";
|
|
};
|
|
|
|
# replaced pinned fido, with unrestricted fido version
|
|
patchPhase = ''
|
|
sed -i '/fido2/c\"fido2",' pyproject.toml
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
click
|
|
ecdsa
|
|
fido2
|
|
intelhex
|
|
pyserial
|
|
pyusb
|
|
requests
|
|
];
|
|
|
|
# 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"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|