2022-06-16 17:23:12 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, nose, psutil, mock }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "2.0.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "selectors2";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "1f1bbaac203a23fbc851dc1b5a6e92c50698cc8cefa5873eb5b89eef53d1d82b";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
patches = [
|
|
|
|
./mapping-import.patch
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nose psutil mock ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/46186#issuecomment-419450064
|
|
|
|
# Trick to disable certain tests that depend on timing which
|
|
|
|
# will always fail on hydra
|
|
|
|
export TRAVIS=""
|
2020-07-18 16:06:22 +00:00
|
|
|
nosetests tests/test_selectors2.py \
|
|
|
|
--exclude=test_above_fd_setsize
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.github.com/SethMichaelLarson/selectors2";
|
|
|
|
description = "Back-ported, durable, and portable selectors";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|