1{ buildPythonPackage
2, fetchPypi
3, numpy
4, scikit-image
5, lib
6, opencv3
7}:
8
9buildPythonPackage rec {
10 pname = "imagecorruptions";
11 version = "1.1.2";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "044e173f24d5934899bdbf3596bfbec917e8083e507eed583ab217abebbe084d";
16 };
17
18 postPatch = ''
19 substituteInPlace setup.py \
20 --replace "'opencv-python >= 3.4.5'," ""
21 '';
22
23 propagatedBuildInputs = [
24 numpy
25 scikit-image
26 opencv3
27 ];
28
29 doCheck = false;
30 pythonImportsCheck = [ "imagecorruptions" ];
31
32 meta = with lib; {
33 homepage = "https://github.com/bethgelab/imagecorruptions";
34 description = "This package provides a set of image corruptions";
35 license = licenses.asl20;
36 maintainers = with maintainers; [ rakesh4g ];
37 };
38}