blob: bb535e7c10f5908c9a5209aa7beafe3a5a851800 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, matplotlib
, numpy
, pytestCheckHook
, pythonOlder
, scipy
, seaborn
, requests
}:
buildPythonPackage rec {
pname = "simpful";
version = "2.11.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "aresio";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-1CU/Iz83CKRx7dsOTGfdJm98TUfc2kxCHKIEUXP36HQ=";
};
# patch dated use of private matplotlib interface
# https://github.com/aresio/simpful/issues/22
postPatch = ''
substituteInPlace simpful/simpful.py \
--replace \
"next(ax._get_lines.prop_cycler)['color']" \
"ax._get_lines.get_next_color()"
'';
propagatedBuildInputs = [
numpy
scipy
requests
];
passthru.optional-dependencies = {
plotting = [
matplotlib
seaborn
];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
pythonImportsCheck = [
"simpful"
];
meta = with lib; {
broken = stdenv.isDarwin;
description = "Library for fuzzy logic";
homepage = "https://github.com/aresio/simpful";
changelog = "https://github.com/aresio/simpful/releases/tag/${version}";
license = with licenses; [ lgpl3Only ];
maintainers = with maintainers; [ fab ];
};
}
|