Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 835 B view raw
1{ stdenv, lib, fetchFromGitHub, buildPythonPackage, 2 six, mock, pyfakefs, unittest2, pytest 3}: 4 5buildPythonPackage rec { 6 pname = "pyu2f"; 7 version = "0.1.4"; 8 9 src = fetchFromGitHub { 10 owner = "google"; 11 repo = pname; 12 rev = version; 13 sha256 = "0waxdydvxn05a8ab9j235mz72x7p4pwa59pnxyk1zzbwxnpxb3p9"; 14 }; 15 16 # Platform detection for linux fails 17 postPatch = lib.optionalString stdenv.isLinux '' 18 rm pyu2f/tests/hid/macos_test.py 19 ''; 20 21 propagatedBuildInputs = [ six ]; 22 23 checkInputs = [ pytest six mock pyfakefs unittest2 ]; 24 25 checkPhase = '' 26 pytest pyu2f/tests 27 ''; 28 29 meta = with lib; { 30 description = "U2F host library for interacting with a U2F device over USB"; 31 homepage = https://github.com/google/pyu2f/; 32 license = licenses.asl20; 33 maintainers = with maintainers; [ prusnak ]; 34 }; 35}