1{ 2 stdenv, 3 lib, 4 buildPythonPackage, 5 fetchPypi, 6 nose, 7 psutil, 8 mock, 9}: 10 11buildPythonPackage rec { 12 version = "2.0.2"; 13 format = "setuptools"; 14 pname = "selectors2"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "1f1bbaac203a23fbc851dc1b5a6e92c50698cc8cefa5873eb5b89eef53d1d82b"; 19 }; 20 21 patches = [ ./mapping-import.patch ]; 22 23 nativeCheckInputs = [ 24 nose 25 psutil 26 mock 27 ]; 28 29 checkPhase = '' 30 # https://github.com/NixOS/nixpkgs/pull/46186#issuecomment-419450064 31 # Trick to disable certain tests that depend on timing which 32 # will always fail on hydra 33 export TRAVIS="" 34 nosetests tests/test_selectors2.py \ 35 --exclude=test_above_fd_setsize 36 ''; 37 38 meta = with lib; { 39 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; 40 homepage = "https://www.github.com/SethMichaelLarson/selectors2"; 41 description = "Back-ported, durable, and portable selectors"; 42 license = licenses.mit; 43 maintainers = [ ]; 44 }; 45}