nixpkgs/pkgs/development/python-modules/sklearn-deap/default.nix
natsukium 4a65ac398b
python310Packages.sklearn-deap: refactor
- add format
- add unittestCheckHook to nativeCheckInputs
- enable pythonImportsCheck
- change the license to MIT from LGPL3
2023-09-03 12:50:47 +09:00

53 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, deap
, numpy
, scikit-learn
, scipy
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "sklearn-deap";
version = "0.3.0";
format = "setuptools";
# No tests in Pypi
src = fetchFromGitHub {
owner = "rsteca";
repo = "sklearn-deap";
rev = version;
hash = "sha256-bXBHlv1pIOyDLKCBeffyHaTZ7gNiZNl0soa73e8E4/M=";
};
patches = [
# Fix for scikit-learn v1.1. See: https://github.com/rsteca/sklearn-deap/pull/80
(fetchpatch {
url = "https://github.com/rsteca/sklearn-deap/commit/3b84bd905796378dd845f99e083da17284c9ff6f.patch";
hash = "sha256-YYLw0uzecyIbdNAy/CxxWDV67zJbZZhUMypnDm/zNGs=";
})
(fetchpatch {
url = "https://github.com/rsteca/sklearn-deap/commit/2f60e215c834f60966b4e51df25e91939a72b952.patch";
hash = "sha256-vn5nLPwwkjsQrp3q7C7Z230lkgRiyJN0TQxO8Apizg8=";
})
];
propagatedBuildInputs = [ numpy scipy deap scikit-learn ];
nativeCheckInputs = [
unittestCheckHook
];
pythonImportsCheck = [ "evolutionary_search" ];
meta = with lib; {
description = "Use evolutionary algorithms instead of gridsearch in scikit-learn";
homepage = "https://github.com/rsteca/sklearn-deap";
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
};
}