about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-10-24 08:27:04 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-10-24 08:27:04 +0200
commit32389de159a0983f4daf7de446da6439a92a29a2 (patch)
treed670ccdd2e24a6a6f0dee7ff3c252b593377deb4 /pkgs/development
parent09c9a2de7e75191bebfb3397364809f94195224c (diff)
parent7044058ef779e8050aa4684a8f73114fdf39b849 (diff)
downloadnixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar
nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.gz
nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.bz2
nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.lz
nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.xz
nixlib-32389de159a0983f4daf7de446da6439a92a29a2.tar.zst
nixlib-32389de159a0983f4daf7de446da6439a92a29a2.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/coq-modules/ltac2/default.nix16
-rw-r--r--pkgs/development/libraries/libfsm/default.nix16
-rw-r--r--pkgs/development/libraries/librsync/default.nix4
-rw-r--r--pkgs/development/libraries/libstrophe/default.nix16
-rw-r--r--pkgs/development/libraries/openmpi/default.nix22
-rw-r--r--pkgs/development/libraries/packr/default.nix4
-rw-r--r--pkgs/development/libraries/science/math/magma/default.nix4
-rw-r--r--pkgs/development/python-modules/Logbook/default.nix4
-rw-r--r--pkgs/development/python-modules/colored/default.nix4
-rw-r--r--pkgs/development/python-modules/cupy/default.nix4
-rw-r--r--pkgs/development/python-modules/django-extensions/default.nix4
-rw-r--r--pkgs/development/python-modules/flask-jwt-extended/default.nix4
-rw-r--r--pkgs/development/python-modules/imageio/default.nix4
-rw-r--r--pkgs/development/python-modules/keras/default.nix4
-rw-r--r--pkgs/development/python-modules/lark-parser/default.nix4
-rw-r--r--pkgs/development/python-modules/peewee/default.nix4
-rw-r--r--pkgs/development/python-modules/pex/default.nix4
-rw-r--r--pkgs/development/python-modules/pyGithub/default.nix4
-rw-r--r--pkgs/development/python-modules/pyaxmlparser/default.nix4
-rw-r--r--pkgs/development/python-modules/pytorch/default.nix183
-rw-r--r--pkgs/development/python-modules/rasterio/default.nix4
-rw-r--r--pkgs/development/python-modules/shodan/default.nix4
-rw-r--r--pkgs/development/python-modules/soco/default.nix4
-rw-r--r--pkgs/development/python-modules/ssdeep/default.nix4
-rw-r--r--pkgs/development/python-modules/yamllint/default.nix4
-rw-r--r--pkgs/development/tools/conftest/default.nix9
-rw-r--r--pkgs/development/web/nodejs/v10.nix4
27 files changed, 249 insertions, 97 deletions
diff --git a/pkgs/development/coq-modules/ltac2/default.nix b/pkgs/development/coq-modules/ltac2/default.nix
index 80b167aaa98a..67441e9cdd8d 100644
--- a/pkgs/development/coq-modules/ltac2/default.nix
+++ b/pkgs/development/coq-modules/ltac2/default.nix
@@ -11,11 +11,16 @@ let params = {
     rev = "0.1";
     sha256 = "1zz26cyv99whj7rrpgnhhm9dfqnpmrx5pqizn8ihf8jkq8d4drz7";
   };
-  "8.9" = {
-    version = "0.1";
-    rev = "a69551a49543b22a7d4e6a2484356b56bd05068e";
+  "8.9" = rec {
+    version = "0.2";
+    rev = version;
     sha256 = "0xby1kb26r9gcvk5511wqj05fqm9paynwfxlfqkmwkgnfmzk0x73";
   };
+  "8.10" = rec {
+    version = "0.3";
+    rev = version;
+    sha256 = "0pzs5nsakh4l8ffwgn4ryxbnxdv2x0r1i7bc598ij621haxdirrr";
+  };
 };
   param = params.${coq.coq-version};
 in
@@ -31,7 +36,10 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ which ];
-  buildInputs = [ coq ] ++ (with coq.ocamlPackages; [ ocaml findlib camlp5 ]);
+  buildInputs = [ coq ] ++ (with coq.ocamlPackages; [ ocaml findlib ])
+  ++ stdenv.lib.optional (!stdenv.lib.versionAtLeast coq.coq-version "8.10")
+     coq.ocamlPackages.camlp5
+  ;
 
   installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/";
 
diff --git a/pkgs/development/libraries/libfsm/default.nix b/pkgs/development/libraries/libfsm/default.nix
index ce7d615f4d31..78f1f66623a4 100644
--- a/pkgs/development/libraries/libfsm/default.nix
+++ b/pkgs/development/libraries/libfsm/default.nix
@@ -4,13 +4,13 @@
 
 stdenv.mkDerivation rec {
   pname = "libfsm";
-  version = "0.1pre1869_${builtins.substring 0 7 src.rev}";
+  version = "0.1pre1905_${builtins.substring 0 8 src.rev}";
 
   src = fetchFromGitHub {
     owner  = "katef";
-    repo   = "libfsm";
-    rev    = "f70c3c5778a79eeecb52f9fd35c7cbc241db0ed6";
-    sha256 = "1hgv272jdv6dwnsdjajyky537z84q0cwzspw9br46qj51h8gkwvx";
+    repo   = pname;
+    rev    = "bd5937fad42b26a86bac1fe3ec49eff73581bd1d";
+    sha256 = "1q3grbmvjnnvc2sshswbd40cc2j2hnwibmljcqx9jqgda0wd6pgv";
     fetchSubmodules = true;
   };
 
@@ -22,12 +22,16 @@ stdenv.mkDerivation rec {
   # if we use stdenv vs clangStdenv, we don't know which, and CC=cc in all
   # cases.) it's unclear exactly what should be done if we want those flags,
   # but the defaults work fine.
-  buildPhase = "PREFIX=$out bmake -r install";
+  buildPhase = "PREFIX=$out bmake -r -j$NIX_BUILD_CORES";
+  installPhase = ''
+    PREFIX=$out bmake -r install
+    runHook postInstall
+  '';
 
   # fix up multi-output install. we also have to fix the pkgconfig libdir
   # file; it uses prefix=$out; libdir=${prefix}/lib, which is wrong in
   # our case; libdir should really be set to the $lib output.
-  installPhase = ''
+  postInstall = ''
     mkdir -p $lib $dev/lib
 
     mv $out/lib             $lib/lib
diff --git a/pkgs/development/libraries/librsync/default.nix b/pkgs/development/libraries/librsync/default.nix
index 6c958feab77f..02a8abb7c856 100644
--- a/pkgs/development/libraries/librsync/default.nix
+++ b/pkgs/development/libraries/librsync/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "librsync";
-  version = "2.1.0";
+  version = "2.2.1";
 
   src = fetchFromGitHub {
     owner = "librsync";
     repo = "librsync";
     rev = "v${version}";
-    sha256 = "03ncx7a2zd93b3jaq7b62nwn8qcwmf04jfvljnpxj5wsxl2agkp7";
+    sha256 = "08wdlxsa9zg2pyasz1lwg70d5psi4amv81v4yxwffx67ndzb9yp5";
   };
 
   nativeBuildInputs = [ cmake ];
diff --git a/pkgs/development/libraries/libstrophe/default.nix b/pkgs/development/libraries/libstrophe/default.nix
index 0ef96f675055..b48bd15909de 100644
--- a/pkgs/development/libraries/libstrophe/default.nix
+++ b/pkgs/development/libraries/libstrophe/default.nix
@@ -2,17 +2,17 @@
 
 stdenv.mkDerivation rec {
   pname = "libstrophe";
-  version = "0.9.2";
+  version = "0.9.3";
 
   src = fetchFromGitHub {
     owner = "strophe";
-    repo = "libstrophe";
+    repo = pname;
     rev = version;
-    sha256 = "1milna92h8wzxax8ll362zvb70091nmfks5lmd105vk0478zraca";
+    sha256 = "1g1l0w9z9hdy5ncdvd9097gi7k7783did6py5h9camlpb2fnk5mk";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ automake autoconf openssl expat libtool check ];
+  nativeBuildInputs = [ automake autoconf pkgconfig libtool check ];
+  buildInputs = [ openssl expat ];
 
   dontDisableStatic = true;
 
@@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
       minimal dependencies and is configurable for various environments. It
       runs well on both Linux, Unix, and Windows based platforms.
     '';
-    homepage = http://strophe.im/libstrophe/;
-    license = with stdenv.lib.licenses; [gpl3 mit];
+    homepage = "http://strophe.im/libstrophe/";
+    license = with stdenv.lib.licenses; [ gpl3 mit ];
     platforms = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [devhell flosse];
+    maintainers = with stdenv.lib.maintainers; [ devhell flosse ];
   };
 }
diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix
index 2a293e0b8562..5996dda1e74e 100644
--- a/pkgs/development/libraries/openmpi/default.nix
+++ b/pkgs/development/libraries/openmpi/default.nix
@@ -1,5 +1,8 @@
 { stdenv, fetchurl, fetchpatch, gfortran, perl, libnl
-, rdma-core, zlib, numactl, libevent, hwloc, pkgsTargetTarget
+, rdma-core, zlib, numactl, libevent, hwloc, pkgsTargetTarget, symlinkJoin
+
+# Enable CUDA support
+, cudaSupport ? false, cudatoolkit ? null
 
 # Enable the Sun Grid Engine bindings
 , enableSGE ? false
@@ -8,9 +11,15 @@
 , enablePrefix ? false
 }:
 
+assert !cudaSupport || cudatoolkit != null;
+
 let
   version = "4.0.2";
 
+  cudatoolkit_joined = symlinkJoin {
+    name = "${cudatoolkit.name}-unsplit";
+    paths = [ cudatoolkit.out cudatoolkit.lib ];
+  };
 in stdenv.mkDerivation rec {
   pname = "openmpi";
   inherit version;
@@ -33,15 +42,20 @@ in stdenv.mkDerivation rec {
 
   buildInputs = with stdenv; [ gfortran zlib ]
     ++ lib.optionals isLinux [ libnl numactl ]
+    ++ lib.optionals cudaSupport [ cudatoolkit ]
     ++ [ libevent hwloc ]
     ++ lib.optional (isLinux || isFreeBSD) rdma-core;
 
   nativeBuildInputs = [ perl ];
 
-  configureFlags = with stdenv; [ "--disable-mca-dso" ]
+  configureFlags = with stdenv; lib.optional (!cudaSupport) "--disable-mca-dso"
     ++ lib.optional isLinux  "--with-libnl=${libnl.dev}"
     ++ lib.optional enableSGE "--with-sge"
     ++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
+    # TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build
+    # https://github.com/openucx/ucx
+    # https://www.open-mpi.org/faq/?category=buildcuda
+    ++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ]
     ;
 
   enableParallelBuilding = true;
@@ -69,6 +83,10 @@ in stdenv.mkDerivation rec {
 
   doCheck = true;
 
+  passthru = {
+    inherit cudaSupport cudatoolkit;
+  };
+
   meta = with stdenv.lib; {
     homepage = https://www.open-mpi.org/;
     description = "Open source MPI-3 implementation";
diff --git a/pkgs/development/libraries/packr/default.nix b/pkgs/development/libraries/packr/default.nix
index e2be8ded31cb..4482a9cd312d 100644
--- a/pkgs/development/libraries/packr/default.nix
+++ b/pkgs/development/libraries/packr/default.nix
@@ -5,13 +5,13 @@
 
 buildGoModule rec {
   pname = "packr";
-  version = "2.6.0";
+  version = "2.7.1";
 
   src = fetchFromGitHub {
     owner = "gobuffalo";
     repo = pname;
     rev = "v${version}";
-    sha256 = "11bd0s3hyzvhcg1q0iahv2w9f0w1k57jfxgswhz7dyndxvvr2b8i";
+    sha256 = "0m5kl2fq8gf1v4vllgag2xl8fd382sdgqrcdb8f5alsnrdn08kb9";
   };
 
   subPackages = [ "packr" "v2/packr2" ];
diff --git a/pkgs/development/libraries/science/math/magma/default.nix b/pkgs/development/libraries/science/math/magma/default.nix
index ef4e89aecb84..6a07ebdb862f 100644
--- a/pkgs/development/libraries/science/math/magma/default.nix
+++ b/pkgs/development/libraries/science/math/magma/default.nix
@@ -24,6 +24,10 @@ in stdenv.mkDerivation {
 
   MKLROOT = optionalString mklSupport mkl;
 
+  preConfigure = ''
+    export CC=${cudatoolkit.cc}/bin/gcc CXX=${cudatoolkit.cc}/bin/g++
+  '';
+
   enableParallelBuilding=true;
   buildFlags = [ "magma" "magma_sparse" ];
 
diff --git a/pkgs/development/python-modules/Logbook/default.nix b/pkgs/development/python-modules/Logbook/default.nix
index 74a3ffdfcc82..97befe7190ac 100644
--- a/pkgs/development/python-modules/Logbook/default.nix
+++ b/pkgs/development/python-modules/Logbook/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "Logbook";
-  version = "1.5.2";
+  version = "1.5.3";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0mvsig6sk4dywpw5naah1npf6h621qzhg0sd427j5znr06a2ksqs";
+    sha256 = "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36";
   };
 
   checkInputs = [ pytest ] ++ lib.optionals (!isPy3k) [ mock ];
diff --git a/pkgs/development/python-modules/colored/default.nix b/pkgs/development/python-modules/colored/default.nix
index 42443c873d7d..5b03f8ce9cc2 100644
--- a/pkgs/development/python-modules/colored/default.nix
+++ b/pkgs/development/python-modules/colored/default.nix
@@ -5,11 +5,11 @@
 
 buildPythonPackage rec {
   pname = "colored";
-  version = "1.3.93";
+  version = "1.4.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0xbhq9nd9xz3b6w0c4q33jfgnv8jid023v2fyhi7hsrz1scym5l2";
+    sha256 = "0wlsg7z406q31r5fpwkqfpyfpigazbmq9qm856wfbn861k2773zf";
   };
 
   # No proper test suite
diff --git a/pkgs/development/python-modules/cupy/default.nix b/pkgs/development/python-modules/cupy/default.nix
index 407988b6c73a..f949120db0cf 100644
--- a/pkgs/development/python-modules/cupy/default.nix
+++ b/pkgs/development/python-modules/cupy/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "cupy";
-  version = "6.3.0";
+  version = "6.4.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1q38riv63110ch170c1pyhq5jfbg8y0qmcdsqn8vb9sb79amvg93";
+    sha256 = "126waa1jiynq00glr1hq86sgwwmakq009crfsn8qqgrj4c4clw6a";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/django-extensions/default.nix b/pkgs/development/python-modules/django-extensions/default.nix
index 1e9a6ac764d3..911a313aefd6 100644
--- a/pkgs/development/python-modules/django-extensions/default.nix
+++ b/pkgs/development/python-modules/django-extensions/default.nix
@@ -7,13 +7,13 @@
 
 buildPythonPackage rec {
   pname = "django-extensions";
-  version = "2.1.9";
+  version = "2.2.3";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = version;
-    sha256 = "08vggm6wrn5cbf8brfprif0rjrkqz06wddsw0ir1skkk8q2sp1b2";
+    sha256 = "19bln9z25dmz1waqcxivlwg20dlm033c7f4z3h3mkhzkbk928y71";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/flask-jwt-extended/default.nix b/pkgs/development/python-modules/flask-jwt-extended/default.nix
index 693e733e73a8..23c5c5d3a372 100644
--- a/pkgs/development/python-modules/flask-jwt-extended/default.nix
+++ b/pkgs/development/python-modules/flask-jwt-extended/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "Flask-JWT-Extended";
-  version = "3.23.0";
+  version = "3.24.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "05nf94dp80i68gs61pf67qj1y6i56jgdxmibqmns5wz6z33fi7wj";
+    sha256 = "1znqjp780nrp94hjcrcx0945izzl3zsrqkmdac44d2fmlnbdp2by";
   };
 
   propagatedBuildInputs = [ dateutil flask pyjwt werkzeug ];
diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix
index f7b3ff63c53c..0e5134eeb26b 100644
--- a/pkgs/development/python-modules/imageio/default.nix
+++ b/pkgs/development/python-modules/imageio/default.nix
@@ -15,10 +15,10 @@
 
 buildPythonPackage rec {
   pname = "imageio";
-  version = "2.5.0";
+  version = "2.6.1";
 
   src = fetchPypi {
-    sha256 = "1bdcrr5190jvk0msw2lswj4pbdhrcggjpj8m6q2a2mrxzjnmmrj2";
+    sha256 = "1bk7pijmrspdfj9nnlbnw1yiww9w1kyjvlpzy9s5hj6zp4qv4kpl";
     inherit pname version;
   };
 
diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix
index b772d820a8b3..a5b6cc6cda0b 100644
--- a/pkgs/development/python-modules/keras/default.nix
+++ b/pkgs/development/python-modules/keras/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "Keras";
-  version = "2.2.5";
+  version = "2.3.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "0fb448b95643a708d25d2394183a2f3a84eefb55fb64917152a46826990113ea";
+    sha256 = "0m5kj6jd1jkxv3npr2s6bczp5m592iryl9ysl5gbil0wszqyrmm0";
   };
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/lark-parser/default.nix b/pkgs/development/python-modules/lark-parser/default.nix
index 79bf4636b500..abd3a491b20a 100644
--- a/pkgs/development/python-modules/lark-parser/default.nix
+++ b/pkgs/development/python-modules/lark-parser/default.nix
@@ -5,13 +5,13 @@
 
 buildPythonPackage rec {
   pname = "lark-parser";
-  version = "0.7.5";
+  version = "0.7.7";
 
   src = fetchFromGitHub {
     owner = "lark-parser";
     repo = "lark";
     rev = version;
-    sha256 = "1k9s62ddv6pghzp1yak2ld6sk92zm4sz1xqp8zkzyh3xqdsmfa0f";
+    sha256 = "1b0dvvqqasir8dfpqj4jch7wxxk43csbv0wa80fiqsdlymxxj2dj";
   };
 
   # tests of Nearley support require js2py
diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix
index d2cd79419a4b..2c7832f6ab4b 100644
--- a/pkgs/development/python-modules/peewee/default.nix
+++ b/pkgs/development/python-modules/peewee/default.nix
@@ -10,14 +10,14 @@
 buildPythonPackage rec {
 
   pname = "peewee";
-  version = "3.11.1";
+  version = "3.11.2";
 
   # pypi release does not provide tests
   src = fetchFromGitHub {
     owner = "coleifer";
     repo = pname;
     rev = version;
-    sha256 = "0q84r9x99h9a3kqs3i12bgk8rz5my8vpjngg8yaqd2kzsb6gynp8";
+    sha256 = "097cafqgk46bf0innwm7xnmsfs6z37hv3alyvrfz6d0iy4scshm5";
   };
 
 
diff --git a/pkgs/development/python-modules/pex/default.nix b/pkgs/development/python-modules/pex/default.nix
index 30631e06b5fe..fec9de45f681 100644
--- a/pkgs/development/python-modules/pex/default.nix
+++ b/pkgs/development/python-modules/pex/default.nix
@@ -6,11 +6,11 @@
 
 buildPythonPackage rec {
   pname = "pex";
-  version = "1.6.11";
+  version = "1.6.12";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "034170w0qh20qkfaha2rpnccm31f7snhb4r9cd079v4v2x2swybk";
+    sha256 = "13q83yba01hzm9mlk5y1klqirxdmsm2yx1yll5zdik9fd8hg0rf6";
   };
 
   nativeBuildInputs = [ setuptools ];
diff --git a/pkgs/development/python-modules/pyGithub/default.nix b/pkgs/development/python-modules/pyGithub/default.nix
index a4e3cada1fc1..895a06ce558a 100644
--- a/pkgs/development/python-modules/pyGithub/default.nix
+++ b/pkgs/development/python-modules/pyGithub/default.nix
@@ -3,13 +3,13 @@
 
 buildPythonPackage rec {
   pname = "PyGithub";
-  version = "1.43.8";
+  version = "1.44";
 
   src = fetchFromGitHub {
     owner = "PyGithub";
     repo = "PyGithub";
     rev = "v${version}";
-    sha256 = "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw";
+    sha256 = "067iyarllgdp40bzjxskzrixvmz350yj1qf8wvbddka504bcbh9r";
   };
 
   propagatedBuildInputs = [ python-jose pyjwt requests deprecated httpretty ];
diff --git a/pkgs/development/python-modules/pyaxmlparser/default.nix b/pkgs/development/python-modules/pyaxmlparser/default.nix
index 1034c9d844d9..c6c1afdcc95f 100644
--- a/pkgs/development/python-modules/pyaxmlparser/default.nix
+++ b/pkgs/development/python-modules/pyaxmlparser/default.nix
@@ -1,7 +1,7 @@
 { buildPythonPackage, stdenv, lxml, click, fetchFromGitHub, pytest, isPy3k }:
 
 buildPythonPackage rec {
-  version = "0.3.15";
+  version = "0.3.21";
   pname = "pyaxmlparser";
 
   # the PyPI tarball doesn't ship tests.
@@ -9,7 +9,7 @@ buildPythonPackage rec {
     owner = "appknox";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0p4x21rg8h7alrg2zk6rbgc3fj77fiyky4zzvziz2bp5jpx1pvzp";
+    sha256 = "1bphd2vl9akk78yqvvxcz36wmr47hp3nh6xyrdc8w1avy1aby1ij";
   };
 
   disabled = !isPy3k;
diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix
index 92afa80852af..d55be70ae490 100644
--- a/pkgs/development/python-modules/pytorch/default.nix
+++ b/pkgs/development/python-modules/pytorch/default.nix
@@ -1,18 +1,101 @@
-{ stdenv, fetchurl, buildPythonPackage, pythonOlder,
-  cudaSupport ? false, cudatoolkit ? null, cudnn ? null,
-  fetchFromGitHub, lib, numpy, pyyaml, cffi, typing, cmake, hypothesis, numactl,
+{ stdenv, fetchurl, fetchgit, buildPythonPackage, python, pythonOlder,
+  cudaSupport ? false, cudatoolkit ? null, cudnn ? null, nccl ? null, magma ? null,
+  mklSupport ? false, mkl ? null,
+  openMPISupport ? false, openmpi ? null,
+  buildNamedTensor ? false,
+  buildBinaries ? false,
+  cudaArchList ? null,
+  fetchFromGitHub, lib, numpy, pyyaml, cffi, click, typing, cmake, hypothesis, numactl,
   linkFarm, symlinkJoin,
+
+  # ninja (https://ninja-build.org) must be available to run C++ extensions tests,
+  ninja,
+
+  # dependencies for torch.utils.tensorboard
+  tensorboardSupport ? true, pillow, six, future, tensorflow-tensorboard,
+
   utillinux, which, isPy3k }:
 
-assert cudnn == null || cudatoolkit != null;
+assert !openMPISupport || openmpi != null;
+assert !tensorboardSupport || tensorflow-tensorboard != null;
+
+# assert that everything needed for cuda is present and that the correct cuda versions are used
 assert !cudaSupport || cudatoolkit != null;
+assert cudnn == null || cudatoolkit != null;
+assert !cudaSupport || (let majorIs = lib.versions.major cudatoolkit.version;
+                        in majorIs == "9" || majorIs == "10");
+
+let
+  hasDependency = dep: pkg: lib.lists.any (inp: inp == dep) pkg.buildInputs;
+  matchesCudatoolkit = hasDependency cudatoolkit;
+  matchesMkl = hasDependency mkl;
+in
+# confirm that cudatoolkits are sync'd across dependencies
+assert !(openMPISupport && cudaSupport) || matchesCudatoolkit openmpi;
+assert !cudaSupport || matchesCudatoolkit magma;
+
+# confirm that mkl is sync'd across dependencies
+assert !mklSupport || mkl != null;
+assert !(mklSupport && cudaSupport) || matchesMkl magma;
+assert !mklSupport || (numpy.blasImplementation == "mkl" && numpy.blas == mkl);
 
 let
   cudatoolkit_joined = symlinkJoin {
     name = "${cudatoolkit.name}-unsplit";
-    paths = [ cudatoolkit.out cudatoolkit.lib ];
+    # nccl is here purely for semantic grouping it could be moved to nativeBuildInputs
+    paths = [ cudatoolkit.out cudatoolkit.lib nccl.dev nccl.out ];
   };
 
+  # Give an explicit list of supported architectures for the build, See:
+  # - pytorch bug report: https://github.com/pytorch/pytorch/issues/23573
+  # - pytorch-1.2.0 build on nixpks: https://github.com/NixOS/nixpkgs/pull/65041
+  #
+  # This list was selected by omitting the TORCH_CUDA_ARCH_LIST parameter,
+  # observing the fallback option (which selected all architectures known
+  # from cudatoolkit_10_0, pytorch-1.2, and python-3.6), and doing a binary
+  # searching to find offending architectures.
+  #
+  # NOTE: Because of sandboxing, this derivation can't auto-detect the hardware's
+  # cuda architecture, so there is also now a problem around new architectures
+  # not being supported until explicitly added to this derivation.
+  #
+  # FIXME: CMake is throwing the following warning on python-1.2:
+  #
+  # ```
+  # CMake Warning at cmake/public/utils.cmake:172 (message):
+  #   In the future we will require one to explicitly pass TORCH_CUDA_ARCH_LIST
+  #   to cmake instead of implicitly setting it as an env variable.  This will
+  #   become a FATAL_ERROR in future version of pytorch.
+  # ```
+  # If this is causing problems for your build, this derivation may have to strip
+  # away the standard `buildPythonPackage` and use the
+  # [*Adjust Build Options*](https://github.com/pytorch/pytorch/tree/v1.2.0#adjust-build-options-optional)
+  # instructions. This will also add more flexibility around configurations
+  # (allowing FBGEMM to be built in pytorch-1.1), and may future proof this
+  # derivation.
+  brokenArchs = [ "3.0" ]; # this variable is only used as documentation.
+  cuda9ArchList = [
+    "3.5"
+    "5.0"
+    "5.2"
+    "6.0"
+    "6.1"
+    "7.0"
+    "7.0+PTX"  # I am getting a "undefined architecture compute_75" on cuda 9
+               # which leads me to believe this is the final cuda-9-compatible architecture.
+  ];
+  cuda10ArchList = cuda9ArchList ++ [
+    "7.5"
+    "7.5+PTX"  # < most recent architecture as of cudatoolkit_10_0 and pytorch-1.2.0
+  ];
+  final_cudaArchList =
+    if !cudaSupport || cudaArchList != null
+    then cudaArchList
+    else
+      if lib.versions.major cudatoolkit.version == "9"
+      then cuda9ArchList
+      else cuda10ArchList; # the assert above removes any ambiguity here.
+
   # Normally libcuda.so.1 is provided at runtime by nvidia-x11 via
   # LD_LIBRARY_PATH=/run/opengl-driver/lib.  We only use the stub
   # libcuda.so from cudatoolkit for running tests, so that we don’t have
@@ -25,28 +108,27 @@ let
     "LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ";
 
 in buildPythonPackage rec {
-  version = "1.0.0";
+  version = "1.2.0";
   pname = "pytorch";
   disabled = !isPy3k;
 
+  outputs = [
+    "out"   # output standard python package
+    "dev"   # output libtorch only
+  ];
+
   src = fetchFromGitHub {
     owner  = "pytorch";
     repo   = "pytorch";
     rev    = "v${version}";
     fetchSubmodules = true;
-    sha256 = "076cpbig4sywn9vv674c0xdg832sdrd5pk1d0725pjkm436kpvlm";
+    sha256 = "1biyq2p48chakf2xw7hazzqmr5ps1nx475ql8vkmxjg5zaa071cz";
   };
 
-  patches =
-    [ # Skips two tests that are only meant to run on multi GPUs
-      (fetchurl {
-        url = "https://github.com/pytorch/pytorch/commit/bfa666eb0deebac21b03486e26642fd70d66e478.patch";
-        sha256 = "1fgblcj02gjc0y62svwc5gnml879q3x2z7m69c9gax79dpr37s9i";
-      })
-    ];
-
   dontUseCmakeConfigure = true;
+
   preConfigure = lib.optionalString cudaSupport ''
+    export TORCH_CUDA_ARCH_LIST="${lib.strings.concatStringsSep ";" final_cudaArchList}"
     export CC=${cudatoolkit.cc}/bin/gcc CXX=${cudatoolkit.cc}/bin/g++
   '' + lib.optionalString (cudaSupport && cudnn != null) ''
     export CUDNN_INCLUDE_DIR=${cudnn}/include
@@ -61,7 +143,6 @@ in buildPythonPackage rec {
       RP_NEW=$(join_by : ''${RP[@]:2})
       patchelf --set-rpath \$ORIGIN:''${RP_NEW} "$1"
     }
-
     for f in $(find ''${out} -name 'libcaffe2*.so')
     do
       strip2 $f
@@ -74,38 +155,84 @@ in buildPythonPackage rec {
   PYTORCH_BUILD_VERSION = version;
   PYTORCH_BUILD_NUMBER = 0;
 
+  BUILD_NAMEDTENSOR = buildNamedTensor;  # experimental feature
+  USE_SYSTEM_NCCL=true;                  # don't build pytorch's third_party NCCL
+
   # Suppress a weird warning in mkl-dnn, part of ideep in pytorch
   # (upstream seems to have fixed this in the wrong place?)
   # https://github.com/intel/mkl-dnn/commit/8134d346cdb7fe1695a2aa55771071d455fae0bc
-  NIX_CFLAGS_COMPILE = lib.optionals (numpy.blasImplementation == "mkl") [ "-Wno-error=array-bounds" ];
+  # https://github.com/pytorch/pytorch/issues/22346
+  #
+  # Also of interest: pytorch ignores CXXFLAGS uses CFLAGS for both C and C++:
+  # https://github.com/pytorch/pytorch/blob/v1.2.0/setup.py#L17
+  NIX_CFLAGS_COMPILE = lib.optionals (numpy.blas == mkl) [ "-Wno-error=array-bounds" ];
 
   nativeBuildInputs = [
-     cmake
-     utillinux
-     which
+    cmake
+    utillinux
+    which
+    ninja
   ] ++ lib.optionals cudaSupport [ cudatoolkit_joined ];
 
   buildInputs = [
-     numpy.blas
-  ] ++ lib.optionals cudaSupport [ cudnn ]
+    numpy.blas
+  ] ++ lib.optionals cudaSupport [ cudnn magma nccl ]
     ++ lib.optionals stdenv.isLinux [ numactl ];
 
   propagatedBuildInputs = [
     cffi
+    click
     numpy
     pyyaml
-  ] ++ lib.optional (pythonOlder "3.5") typing;
+  ] ++ lib.optionals openMPISupport [ openmpi ]
+    ++ lib.optional (pythonOlder "3.5") typing
+    ++ lib.optionals tensorboardSupport [pillow six future tensorflow-tensorboard];
+
+  checkInputs = [ hypothesis ninja ];
+
+  doCheck = false; # tests take a long time for channel release, so doCheck should be overridden only when developing
+  checkPhase = "${cudaStubEnv}python test/run_test.py"
+    + " --exclude utils" # utils requires git, which is not allowed in the check phase
+
+    # Other tests which have been disabled in previous nix derivations of pytorch.
+    # --exclude dataloader sparse torch utils thd_distributed distributed cpp_extensions
+    ;
+  postInstall = ''
+    mkdir $dev
+    cp -r $out/${python.sitePackages}/torch/lib     $dev/lib
+    cp -r $out/${python.sitePackages}/torch/include $dev/include
+  '';
+
+  postFixup = stdenv.lib.optionalString stdenv.isDarwin ''
+    for f in $(ls $dev/lib/*.dylib); do
+        install_name_tool -id $dev/lib/$(basename $f) $f || true
+    done
+
+    install_name_tool -change @rpath/libshm.dylib $dev/lib/libshm.dylib $dev/lib/libtorch_python.dylib
+    install_name_tool -change @rpath/libtorch.dylib $dev/lib/libtorch.dylib $dev/lib/libtorch_python.dylib
+    install_name_tool -change @rpath/libc10.dylib $dev/lib/libc10.dylib $dev/lib/libtorch_python.dylib
 
-  checkInputs = [ hypothesis ];
-  checkPhase = ''
-    ${cudaStubEnv}python test/run_test.py --exclude dataloader sparse torch utils thd_distributed distributed cpp_extensions
+    install_name_tool -change @rpath/libc10.dylib $dev/lib/libc10.dylib $dev/lib/libtorch.dylib
+
+    install_name_tool -change @rpath/libtorch.dylib $dev/lib/libtorch.dylib $dev/lib/libcaffe2_observers.dylib
+    install_name_tool -change @rpath/libc10.dylib $dev/lib/libc10.dylib $dev/lib/libcaffe2_observers.dylib
+
+    install_name_tool -change @rpath/libtorch.dylib $dev/lib/libtorch.dylib $dev/lib/libcaffe2_module_test_dynamic.dylib
+    install_name_tool -change @rpath/libc10.dylib $dev/lib/libc10.dylib $dev/lib/libcaffe2_module_test_dynamic.dylib
+
+    install_name_tool -change @rpath/libtorch.dylib $dev/lib/libtorch.dylib $dev/lib/libcaffe2_detectron_ops.dylib
+    install_name_tool -change @rpath/libc10.dylib $dev/lib/libc10.dylib $dev/lib/libcaffe2_detectron_ops.dylib
+
+    install_name_tool -change @rpath/libtorch.dylib $dev/lib/libtorch.dylib $dev/lib/libshm.dylib
+    install_name_tool -change @rpath/libc10.dylib $dev/lib/libc10.dylib $dev/lib/libshm.dylib
   '';
 
+
   meta = {
     description = "Open source, prototype-to-production deep learning platform";
     homepage    = https://pytorch.org/;
     license     = lib.licenses.bsd3;
-    platforms   = lib.platforms.linux;
-    maintainers = with lib.maintainers; [ teh thoughtpolice ];
+    platforms   = with lib.platforms; linux ++ lib.optionals (!cudaSupport) darwin;
+    maintainers = with lib.maintainers; [ teh thoughtpolice stites tscholak ]; # tscholak esp. for darwin-related builds
   };
 }
diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix
index 143b5bea1558..42b03849283b 100644
--- a/pkgs/development/python-modules/rasterio/default.nix
+++ b/pkgs/development/python-modules/rasterio/default.nix
@@ -6,14 +6,14 @@
 
 buildPythonPackage rec {
   pname = "rasterio";
-  version = "1.0.28";
+  version = "1.1.0";
 
   # Pypi doesn't ship the tests, so we fetch directly from GitHub
   src = fetchFromGitHub {
     owner = "mapbox";
     repo = "rasterio";
     rev = version;
-    sha256 = "05rn2ijjv64a765gkpwcq3bb933gzp35zj4l9sk0agh19462myjx";
+    sha256 = "0xa9jazsgsf7is4dbf2bbnfga8q8nmqy0qq4i7jj3riiccwlm6xw";
   };
 
   checkInputs = [ boto3 pytest pytestcov packaging hypothesis ] ++ lib.optional (!isPy3k) mock;
diff --git a/pkgs/development/python-modules/shodan/default.nix b/pkgs/development/python-modules/shodan/default.nix
index ae9f9e42ecf0..7202b3cf70e2 100644
--- a/pkgs/development/python-modules/shodan/default.nix
+++ b/pkgs/development/python-modules/shodan/default.nix
@@ -10,11 +10,11 @@
 
 buildPythonPackage rec {
   pname = "shodan";
-  version = "1.17.0";
+  version = "1.19.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1sh7a2dsal3kzcl4s9xbpl7hxhm9k55s5hiqdqqnafhvhnh0vmbz";
+    sha256 = "1i4zrzamvgy3g117a2x66gyi7pzh27slc2w9pqysc0ldfcibi2wx";
   };
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/soco/default.nix b/pkgs/development/python-modules/soco/default.nix
index 3f0d16cc8a86..cb38711ff91d 100644
--- a/pkgs/development/python-modules/soco/default.nix
+++ b/pkgs/development/python-modules/soco/default.nix
@@ -7,11 +7,11 @@
 
 buildPythonPackage rec {
   pname = "soco";
-  version = "0.17";
+  version = "0.18";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "15zw6i5z5p8vsa3lp20rjizhv4lzz935r73im0xm6zsl71bsgvj8";
+    sha256 = "0bf55mqnz3l3ii26dvx33d35fv7jn7p5kmfwnr0xbpj38sxvhfr4";
   };
 
   postPatch = ''
diff --git a/pkgs/development/python-modules/ssdeep/default.nix b/pkgs/development/python-modules/ssdeep/default.nix
index f41452b4b61d..f33143a0f020 100644
--- a/pkgs/development/python-modules/ssdeep/default.nix
+++ b/pkgs/development/python-modules/ssdeep/default.nix
@@ -10,11 +10,11 @@
 
 buildPythonPackage rec {
   pname = "ssdeep";
-  version = "3.3";
+  version = "3.4";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "255de1f034652b3ed21920221017e70e570b1644f9436fea120ae416175f4ef5";
+    sha256 = "0px8k4fjbkjb717bg2v7rjhm4iclrxzq7sh0hfqs55f4ddqi0m8v";
   };
 
   buildInputs = [ pkgs.ssdeep pytestrunner ];
diff --git a/pkgs/development/python-modules/yamllint/default.nix b/pkgs/development/python-modules/yamllint/default.nix
index 5c738c11f84c..0406f6fe5a0c 100644
--- a/pkgs/development/python-modules/yamllint/default.nix
+++ b/pkgs/development/python-modules/yamllint/default.nix
@@ -3,11 +3,11 @@
 
 buildPythonPackage rec {
   pname = "yamllint";
-  version = "1.17.0";
+  version = "1.18.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "04xarlbh59f9ah53jxrcpqpzladyfxaw6cb2g8clw9aid0qzi9kh";
+    sha256 = "076hqf189ww95n9vcbkkn8an42nx79cy8pf2qnl251yjncsvnbfl";
   };
 
   checkInputs = [ nose ];
diff --git a/pkgs/development/tools/conftest/default.nix b/pkgs/development/tools/conftest/default.nix
index a4a6a7998b06..17dbcc7ff1f1 100644
--- a/pkgs/development/tools/conftest/default.nix
+++ b/pkgs/development/tools/conftest/default.nix
@@ -4,15 +4,6 @@ buildGoModule rec {
   pname = "conftest";
   version = "0.14.0";
 
-  # Something subtle in the go sum db is causing every download to
-  # get a new sum (and thus breaking the hash). This disables the
-  # fetching of the sum from the go sum database.
-  modBuildPhase = ''
-    runHook preBuild
-    GONOSUMDB=* go mod download
-    runHook postBuild
-  '';
-
   src = fetchFromGitHub {
     owner = "instrumenta";
     repo = "conftest";
diff --git a/pkgs/development/web/nodejs/v10.nix b/pkgs/development/web/nodejs/v10.nix
index 939b065a55c2..22887a44aff1 100644
--- a/pkgs/development/web/nodejs/v10.nix
+++ b/pkgs/development/web/nodejs/v10.nix
@@ -5,6 +5,6 @@ let
 in
   buildNodejs {
     inherit enableNpm;
-    version = "10.16.3";
-    sha256 = "1gbblbmvx7a0wkgp3fs2pf5c1hymdpnfc7zqp1slg5hmfhyi5wbv";
+    version = "10.17.0";
+    sha256 = "13n5cvb340ba7vwm8il7bjrmpz89h6cibhk9rc3kq9ymdgbnf9j1";
   }