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