1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 pythonAtLeast, 7 setuptools, 8 matplotlib, 9 networkx, 10 nose, 11 numpy, 12 scipy, 13 pytest7CheckHook, 14}: 15 16buildPythonPackage rec { 17 pname = "scikit-fuzzy"; 18 version = "unstable-2022-11-07"; 19 pyproject = true; 20 21 # code depends on distutils 22 disabled = pythonAtLeast "3.12"; 23 24 src = fetchFromGitHub { 25 owner = pname; 26 repo = pname; 27 rev = "d8c45c259d62955004379592e45bc64c8e002fc3"; 28 hash = "sha256-kS48aHC719wUdc2WcJa9geoMUcLHSj7ZsoRZYAhF2a0="; 29 }; 30 31 patches = [ 32 # https://github.com/scikit-fuzzy/scikit-fuzzy/pull/299 33 (fetchpatch { 34 name = "numpy-1.25-test-compatibility-1.patch"; 35 url = "https://github.com/scikit-fuzzy/scikit-fuzzy/commit/d7d114cff002e2edf9361a55cb985615e91797b5.patch"; 36 hash = "sha256-udF/z94tVGRHq7gcOko4BSkvVnqe/A/bAARfCPrc06M="; 37 }) 38 (fetchpatch { 39 name = "numpy-1.25-test-compatibility-2.patch"; 40 url = "https://github.com/scikit-fuzzy/scikit-fuzzy/commit/f1612f6aeff34dc9329dbded7cee098fcd22ffd9.patch"; 41 hash = "sha256-Le1ECR4+RjWCkfqjVrd471GD7tuVaQlZ7RZd3zvFdHU="; 42 }) 43 (fetchpatch { 44 name = "numpy-1.25-test-compatibility-3.patch"; 45 url = "https://github.com/scikit-fuzzy/scikit-fuzzy/commit/459b9602cf182b7b42f93aad8bcf3bda6f20bfb5.patch"; 46 hash = "sha256-gKrhNpGt6XoAlMwQW70OPFZj/ZC8NhQq6dEaBpGE8yY="; 47 }) 48 ]; 49 50 build-system = [ setuptools ]; 51 52 propagatedBuildInputs = [ 53 networkx 54 numpy 55 scipy 56 ]; 57 58 nativeCheckInputs = [ 59 matplotlib 60 nose 61 pytest7CheckHook 62 ]; 63 64 pythonImportsCheck = [ "skfuzzy" ]; 65 66 meta = with lib; { 67 homepage = "https://github.com/scikit-fuzzy/scikit-fuzzy"; 68 description = "Fuzzy logic toolkit for scientific Python"; 69 license = licenses.bsd3; 70 maintainers = [ maintainers.bcdarwin ]; 71 }; 72}