Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 59 lines 1.2 kB view raw
1{ buildPythonPackage 2, fetchFromGitHub 3, imageio 4, imagecorruptions 5, numpy 6, opencv3 7, pytest 8, scikitimage 9, scipy 10, shapely 11, six 12, stdenv 13}: 14 15buildPythonPackage rec { 16 pname = "imgaug"; 17 version = "0.4.0"; 18 19 src = fetchFromGitHub { 20 owner = "aleju"; 21 repo = "imgaug"; 22 rev = version; 23 sha256 = "17hbxndxphk3bfnq35y805adrfa6gnm5x7grjxbwdw4kqmbbqzah"; 24 }; 25 26 postPatch = '' 27 substituteInPlace requirements.txt \ 28 --replace "opencv-python-headless" "" 29 substituteInPlace setup.py \ 30 --replace "opencv-python-headless" "" 31 substituteInPlace pytest.ini \ 32 --replace "--xdoctest --xdoctest-global-exec=\"import imgaug as ia\nfrom imgaug import augmenters as iaa\"" "" 33 ''; 34 35 propagatedBuildInputs = [ 36 imageio 37 imagecorruptions 38 numpy 39 opencv3 40 scikitimage 41 scipy 42 shapely 43 six 44 ]; 45 46 checkPhase = '' 47 pytest ./test 48 ''; 49 50 checkInputs = [ opencv3 pytest ]; 51 52 meta = with stdenv.lib; { 53 homepage = "https://github.com/aleju/imgaug"; 54 description = "Image augmentation for machine learning experiments"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ cmcdragonkai rakesh4g ]; 57 platforms = platforms.linux; 58 }; 59}