1{ buildPythonPackage, fetchFromGitHub, isPy27, lib, mock, numpy, pytestCheckHook 2}: 3 4buildPythonPackage rec { 5 pname = "mnist"; 6 version = "0.2.2"; 7 8 src = fetchFromGitHub { 9 owner = "datapythonista"; 10 repo = "mnist"; 11 rev = "${pname}-${version}"; 12 sha256 = "17r37pbxiv5dw857bmg990x836gq6sgww069w3q5jjg9m3xdm7dh"; 13 }; 14 15 propagatedBuildInputs = [ numpy ] ++ lib.optional isPy27 mock; 16 17 nativeCheckInputs = [ pytestCheckHook ]; 18 19 dontUseSetuptoolsCheck = true; 20 21 # disable tests which fail due to socket related errors 22 disabledTests = [ 23 "test_test_images_has_right_size" 24 "test_test_labels_has_right_size" 25 "test_train_images_has_right_size" 26 "test_train_labels_has_right_size" 27 ]; 28 29 meta = with lib; { 30 description = "Python utilities to download and parse the MNIST dataset"; 31 homepage = "https://github.com/datapythonista/mnist"; 32 license = licenses.bsd3; 33 maintainers = with maintainers; [ dmrauh ]; 34 }; 35} 36