Files
nixpkgs/pkgs/development/python-modules/sklearn-deap/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

56 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 ];
};
}