1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 setuptools,
5 pytestCheckHook,
6 stdenv,
7 lib,
8}:
9buildPythonPackage rec {
10 pname = "essentials";
11 version = "1.1.5";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "Neoteroi";
16 repo = "essentials";
17 rev = "v${version}";
18 hash = "sha256-WMHjBVkeSoQ4Naj1U7Bg9j2hcoErH1dx00BPKiom9T4=";
19 };
20
21 nativeBuildInputs = [ setuptools ];
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
26 # time.sleep(0.01) can be up to 0.05s on darwin
27 "test_stopwatch"
28 "test_stopwatch_with_context_manager"
29 ];
30
31 pythonImportsCheck = [ "essentials" ];
32
33 meta = with lib; {
34 homepage = "https://github.com/Neoteroi/essentials";
35 description = "General purpose classes and functions";
36 changelog = "https://github.com/Neoteroi/essentials/releases/v${version}";
37 license = licenses.mit;
38 maintainers = with maintainers; [
39 aldoborrero
40 zimbatm
41 ];
42 };
43}