@@ -0,0 +1,45 @@
1+{ stdenvNoCC, fetchurl }:
2+let
3+ srcs = {
4+ train-images = fetchurl {
5+ url = "http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz";
6+ sha256 = "029na81z5a1c9l1a8472dgshami6f2iixs3m2ji6ym6cffzwl3s4";
7+ };
8+ train-labels = fetchurl {
9+ url = "http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz";
10+ sha256 = "0p152200wwx0w65sqb65grb3v8ncjp230aykmvbbx2sm19556lim";
11+ };
12+ test-images = fetchurl {
13+ url = "http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz";
14+ sha256 = "1rn4vfigaxn2ms24bf4jwzzflgp3hvz0gksvb8j7j70w19xjqhld";
15+ };
16+ test-labels = fetchurl {
17+ url = "http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz";
18+ sha256 = "1imf0i194ndjxzxdx87zlgn728xx3p1qhq1ssbmnvv005vwn1bpp";
19+ };
20+ };
21+in
22+ stdenvNoCC.mkDerivation rec {
23+ name = "mnist-${version}";
24+ version = "2018-11-16";
25+ installPhase = ''
26+ mkdir -p $out
27+ ln -s "${srcs.train-images}" "$out/${srcs.train-images.name}"
28+ ln -s "${srcs.train-labels}" "$out/${srcs.train-labels.name}"
29+ ln -s "${srcs.test-images}" "$out/${srcs.test-images.name}"
30+ ln -s "${srcs.test-labels}" "$out/${srcs.test-labels.name}"
31+ '';
32+ phases = [ "installPhase" ];
33+ meta = with stdenvNoCC.lib; {
34+ description = "A large database of handwritten digits";
35+ longDescription = ''
36+ The MNIST database (Modified National Institute of Standards and
37+ Technology database) is a large database of handwritten digits that is
38+ commonly used for training various image processing systems.
39+ '';
40+ homepage = http://yann.lecun.com/exdb/mnist/index.html;
41+ license = licenses.cc-by-sa-30;
42+ platforms = platforms.all;
43+ maintainers = with maintainers; [ cmcdragonkai ];
44+ };
45+ }