Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.2 kB view raw
1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder 2, click, ecdsa, fido2, intelhex, pyserial, pyusb, requests}: 3 4 buildPythonPackage rec { 5 pname = "solo-python"; 6 version = "0.0.26"; 7 format = "flit"; 8 disabled = pythonOlder "3.6"; # only python>=3.6 is supported 9 10 src = fetchFromGitHub { 11 owner = "solokeys"; 12 repo = pname; 13 rev = version; 14 sha256 = "05rwqrhr1as6zqhg63d6wga7l42jm2azbav5w6ih8mx5zbxf61yz"; 15 }; 16 17 # replaced pinned fido, with unrestricted fido version 18 patchPhase = '' 19 sed -i '/fido2/c\"fido2",' pyproject.toml 20 ''; 21 22 propagatedBuildInputs = [ 23 click 24 ecdsa 25 fido2 26 intelhex 27 pyserial 28 pyusb 29 requests 30 ]; 31 32 # allow for writable directory for darwin 33 preBuild = '' 34 export HOME=$TMPDIR 35 ''; 36 37 # repo doesn't contain tests, ensure imports aren't broken 38 pythonImportsCheck = [ 39 "solo" 40 "solo.cli" 41 "solo.commands" 42 "solo.fido2" 43 "solo.operations" 44 ]; 45 46 meta = with lib; { 47 description = "Python tool and library for SoloKeys"; 48 homepage = "https://github.com/solokeys/solo-python"; 49 maintainers = with maintainers; [ wucke13 ]; 50 license = with licenses; [ asl20 mit ]; 51 }; 52}