summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/hhvm/default.nix1
-rw-r--r--pkgs/development/compilers/julia/0.7.nix6
-rw-r--r--pkgs/development/compilers/julia/1.0.nix6
-rw-r--r--pkgs/development/compilers/julia/shared.nix218
-rw-r--r--pkgs/development/compilers/mezzo/default.nix4
-rw-r--r--pkgs/development/compilers/vala/default.nix19
-rw-r--r--pkgs/development/libraries/glib-networking/default.nix2
-rw-r--r--pkgs/development/libraries/gvfs/default.nix6
-rw-r--r--pkgs/development/libraries/libfm/default.nix11
-rw-r--r--pkgs/development/libraries/libwnck/3.x.nix4
-rw-r--r--pkgs/development/libraries/opencolorio/default.nix31
-rw-r--r--pkgs/development/libraries/pipewire/default.nix2
-rw-r--r--pkgs/development/libraries/science/math/sympow/default.nix6
-rw-r--r--pkgs/development/libraries/spice-gtk/default.nix2
-rw-r--r--pkgs/development/libraries/umockdev/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/bin_prot/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/bolt/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/camlimages/4.1.nix4
-rw-r--r--pkgs/development/ocaml-modules/cil/default.nix5
-rw-r--r--pkgs/development/ocaml-modules/cryptgps/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/dypgen/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/enumerate/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/erm_xml/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/faillib/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/fieldslib/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/frontc/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/gtktop/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/lwt/legacy.nix1
-rw-r--r--pkgs/development/ocaml-modules/magick/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocaml-cairo/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocamlsdl/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/odn/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ojquery/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/pa_ounit/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/sqlite3EZ/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ulex/0.8/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/variantslib/default.nix6
-rw-r--r--pkgs/development/python-modules/backports_lzma/default.nix5
-rw-r--r--pkgs/development/python-modules/buttersink/default.nix28
-rw-r--r--pkgs/development/python-modules/docker-registry-core/default.nix26
-rw-r--r--pkgs/development/python-modules/folium/default.nix6
-rw-r--r--pkgs/development/python-modules/httpsig/default.nix32
-rw-r--r--pkgs/development/python-modules/plotly/default.nix2
-rw-r--r--pkgs/development/python-modules/pytorch/default.nix6
-rw-r--r--pkgs/development/python-modules/pywatchman/default.nix26
-rw-r--r--pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch12
-rw-r--r--pkgs/development/tools/analysis/kcov/default.nix6
-rw-r--r--pkgs/development/tools/corgi/default.nix28
-rw-r--r--pkgs/development/tools/corgi/deps.nix47
-rw-r--r--pkgs/development/tools/kythe/default.nix47
-rw-r--r--pkgs/development/tools/minizinc/default.nix4
-rw-r--r--pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix5
-rw-r--r--pkgs/development/tools/rust/bindgen/default.nix49
-rwxr-xr-xpkgs/development/tools/rust/bindgen/wrapper.sh36
54 files changed, 641 insertions, 142 deletions
diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix
index 749e4125a0b3..010dacd0c71a 100644
--- a/pkgs/development/compilers/hhvm/default.nix
+++ b/pkgs/development/compilers/hhvm/default.nix
@@ -63,5 +63,6 @@ stdenv.mkDerivation rec {
     license     = "PHP/Zend";
     platforms   = [ "x86_64-linux" ];
     maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    broken = true; # Since 2018-04-21, see https://hydra.nixos.org/build/73059373
   };
 }
diff --git a/pkgs/development/compilers/julia/0.7.nix b/pkgs/development/compilers/julia/0.7.nix
new file mode 100644
index 000000000000..99c6b245ba67
--- /dev/null
+++ b/pkgs/development/compilers/julia/0.7.nix
@@ -0,0 +1,6 @@
+import ./shared.nix {
+  majorVersion = "0";
+  minorVersion = "7";
+  maintenanceVersion = "0";
+  src_sha256 = "1j57569qm2ii8ddzsp08hds2navpk7acdz83kh27dvk44axhwj6f";
+}
diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix
new file mode 100644
index 000000000000..2301d0c1f437
--- /dev/null
+++ b/pkgs/development/compilers/julia/1.0.nix
@@ -0,0 +1,6 @@
+import ./shared.nix {
+  majorVersion = "1";
+  minorVersion = "0";
+  maintenanceVersion = "0";
+  src_sha256 = "083277z90m1jxr2d1ysb96rgjj9h5q97l6h54mx3pb3f38ykshz2";
+}
diff --git a/pkgs/development/compilers/julia/shared.nix b/pkgs/development/compilers/julia/shared.nix
new file mode 100644
index 000000000000..41c9c57bd034
--- /dev/null
+++ b/pkgs/development/compilers/julia/shared.nix
@@ -0,0 +1,218 @@
+{ majorVersion
+, minorVersion
+, maintenanceVersion
+, src_sha256
+}:
+{ stdenv, fetchurl, fetchzip
+# build tools
+, gfortran, m4, makeWrapper, patchelf, perl, which, python2, paxctl
+, llvm, cmake
+# libjulia dependencies
+, libunwind, readline, utf8proc, zlib
+# standard library dependencies
+, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
+# linear algebra
+, openblas, arpack
+# Darwin frameworks
+, CoreServices, ApplicationServices
+}:
+
+with stdenv.lib;
+
+# All dependencies must use the same OpenBLAS.
+let
+  arpack_ = arpack;
+in
+let
+  arpack = arpack_.override { inherit openblas; };
+in
+
+let
+  dsfmtVersion = "2.2.3";
+  dsfmt = fetchurl {
+    url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmtVersion}.tar.gz";
+    sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42";
+  };
+
+  libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e";
+  libuv = fetchurl {
+    url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}";
+    sha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs";
+  };
+
+  rmathVersion = "0.1";
+  rmath-julia = fetchurl {
+    url = "https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v${rmathVersion}";
+    sha256 = "1qyps217175qhid46l8f5i1v8i82slgp23ia63x2hzxwfmx8617p";
+  };
+
+  virtualenvVersion = "15.0.0";
+  virtualenv = fetchurl {
+    url = "mirror://pypi/v/virtualenv/virtualenv-${virtualenvVersion}.tar.gz";
+    sha256 = "06fw4liazpx5vf3am45q2pdiwrv0id7ckv7n6zmpml29x6vkzmkh";
+  };
+
+  libwhichVersion = "81e9723c0273d78493dc8c8ed570f68d9ce7e89e";
+  libwhich = fetchurl {
+    url = "https://api.github.com/repos/vtjnash/libwhich/tarball/${libwhichVersion}";
+    sha256 = "1p7zg31kpmpbmh1znrk1xrbd074agx13b9q4dcw8n2zrwwdlbz3b";
+  };
+
+  llvmVersion = "6.0.0";
+  llvm = fetchurl {
+    url = "http://releases.llvm.org/6.0.0/llvm-${llvmVersion}.src.tar.xz";
+    sha256 = "0224xvfg6h40y5lrbnb9qaq3grmdc5rg00xq03s1wxjfbf8krx8z";
+  };
+
+  suitesparseVersion = "4.4.5";
+  suitesparse = fetchurl {
+    url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${suitesparseVersion}.tar.gz";
+    sha256 = "1jcbxb8jx5wlcixzf6n5dca2rcfx6mlcms1k2rl5gp67ay3bix43";
+  };
+  version = "${majorVersion}.${minorVersion}.${maintenanceVersion}";
+in
+
+stdenv.mkDerivation rec {
+  pname = "julia";
+  inherit version;
+  name = "${pname}-${version}";
+
+  src = fetchzip {
+    url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${name}.tar.gz";
+    sha256 = src_sha256;
+  };
+  prePatch = ''
+    export PATH=$PATH:${cmake}/bin
+    mkdir deps/srccache
+    cp "${dsfmt}" "./deps/srccache/dsfmt-${dsfmtVersion}.tar.gz"
+    cp "${rmath-julia}" "./deps/srccache/Rmath-julia-${rmathVersion}.tar.gz"
+    cp "${libuv}" "./deps/srccache/libuv-${libuvVersion}.tar.gz"
+    cp "${virtualenv}" "./deps/srccache/virtualenv-${virtualenvVersion}.tar.gz"
+    cp "${libwhich}" "./deps/srccache/libwhich-${libwhichVersion}.tar.gz"
+    cp "${llvm}" "./deps/srccache/llvm-${llvmVersion}.src.tar.xz"
+    cp "${suitesparse}" "./deps/srccache/SuiteSparse-${suitesparseVersion}.tar.gz"
+  '';
+
+  patches = [
+    ./0001.1-use-system-utf8proc.patch
+  ] ++ stdenv.lib.optional stdenv.needsPax ./0004-hardened.patch;
+
+  postPatch = ''
+    patchShebangs . contrib
+    for i in backtrace cmdlineargs; do
+      mv test/$i.jl{,.off}
+      touch test/$i.jl
+    done
+    rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl
+    sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl
+    sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl
+  '';
+
+  buildInputs = [
+    arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr
+    pcre2.dev openblas openlibm openspecfun readline utf8proc
+    zlib
+  ]
+  ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices]
+  ;
+
+  nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ]
+    ++ stdenv.lib.optional stdenv.needsPax paxctl;
+
+  makeFlags =
+    let
+      arch = head (splitString "-" stdenv.system);
+      march = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
+              or (throw "unsupported architecture: ${arch}");
+      # Julia requires Pentium 4 (SSE2) or better
+      cpuTarget = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
+                  or (throw "unsupported architecture: ${arch}");
+    in [
+      "ARCH=${arch}"
+      "MARCH=${march}"
+      "JULIA_CPU_TARGET=${cpuTarget}"
+      "PREFIX=$(out)"
+      "prefix=$(out)"
+      "SHELL=${stdenv.shell}"
+
+      "USE_SYSTEM_BLAS=1"
+      "USE_BLAS64=${if openblas.blas64 then "1" else "0"}"
+      "LIBBLAS=-lopenblas"
+      "LIBBLASNAME=libopenblas"
+
+      "USE_SYSTEM_LAPACK=1"
+      "LIBLAPACK=-lopenblas"
+      "LIBLAPACKNAME=libopenblas"
+
+      "USE_SYSTEM_ARPACK=1"
+      "USE_SYSTEM_FFTW=1"
+      "USE_SYSTEM_GMP=1"
+      "USE_SYSTEM_LIBGIT2=1"
+      "USE_SYSTEM_LIBUNWIND=1"
+
+      #"USE_SYSTEM_LLVM=1"
+      "LLVM_VER=6.0.0"
+
+      "USE_SYSTEM_MPFR=1"
+      "USE_SYSTEM_OPENLIBM=1"
+      "USE_SYSTEM_OPENSPECFUN=1"
+      "USE_SYSTEM_PATCHELF=1"
+      "USE_SYSTEM_PCRE=1"
+      "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config"
+      "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
+      "USE_SYSTEM_READLINE=1"
+      "USE_SYSTEM_UTF8PROC=1"
+      "USE_SYSTEM_ZLIB=1"
+    ];
+
+  NIX_CFLAGS_COMPILE = [ "-fPIC" ];
+
+  LD_LIBRARY_PATH = makeLibraryPath [
+    arpack fftw fftwSinglePrec gmp libgit2 mpfr openblas openlibm
+    openspecfun pcre2
+  ];
+
+  dontStrip = true;
+  dontPatchELF = true;
+
+  enableParallelBuilding = true;
+
+  doCheck = !stdenv.isDarwin;
+  checkTarget = "testall";
+  # Julia's tests require read/write access to $HOME
+  preCheck = ''
+    export HOME="$NIX_BUILD_TOP"
+  '';
+
+  preBuild = ''
+    sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile
+    sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
+    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+  '';
+
+  postInstall = ''
+    # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
+    # as using a wrapper with LD_LIBRARY_PATH causes segmentation
+    # faults when program returns an error:
+    #   $ julia -e 'throw(Error())'
+    find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do
+      if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then
+        ln -sv $lib $out/lib/julia/$(basename $lib)
+      fi
+    done
+  '';
+
+  passthru = {
+    inherit majorVersion minorVersion maintenanceVersion;
+    site = "share/julia/site/v${majorVersion}.${minorVersion}";
+  };
+
+  meta = {
+    description = "High-level performance-oriented dynamical language for technical computing";
+    homepage = https://julialang.org/;
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ raskin rob ];
+    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
+    broken = stdenv.isi686;
+  };
+}
diff --git a/pkgs/development/compilers/mezzo/default.nix b/pkgs/development/compilers/mezzo/default.nix
index 79dc479fae83..c0b535747133 100644
--- a/pkgs/development/compilers/mezzo/default.nix
+++ b/pkgs/development/compilers/mezzo/default.nix
@@ -1,5 +1,9 @@
 { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, yojson, ulex, pprint, fix, functory }:
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "mezzo is not available for OCaml ${ocaml.version}"
+else
+
 let
   check-ocaml-version = with stdenv.lib; versionAtLeast (getVersion ocaml);
 in
diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix
index 510688ef4164..a4a8aa980b62 100644
--- a/pkgs/development/compilers/vala/default.nix
+++ b/pkgs/development/compilers/vala/default.nix
@@ -43,25 +43,6 @@ let
   };
 
 in rec {
-
-  vala_0_26 = generic {
-    major   = "0.26";
-    minor   = "2";
-    sha256  = "1i03ds1z5hivqh4nhf3x80fg7n0zd22908w5minkpaan1i1kzw9p";
-  };
-
-  vala_0_28 = generic {
-    major   = "0.28";
-    minor   = "1";
-    sha256  = "0isg327w6rfqqdjja6a8pc3xcdkj7pqrkdhw48bsyxab2fkaw3hw";
-  };
-
-  vala_0_32 = generic {
-    major   = "0.32";
-    minor   = "1";
-    sha256  = "1ab1l44abf9fj1wznzq5956431ia136rl5049cggnk5393jlf3fx";
-  };
-
   vala_0_34 = generic {
     major   = "0.34";
     minor   = "17";
diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix
index e0bbae69c4ff..3deaf28373dd 100644
--- a/pkgs/development/libraries/glib-networking/default.nix
+++ b/pkgs/development/libraries/glib-networking/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "lib/gio/modules";
+  PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "${placeholder "out"}/lib/gio/modules";
 
   postPatch = ''
     chmod +x meson_post_install.py # patchShebangs requires executable file
diff --git a/pkgs/development/libraries/gvfs/default.nix b/pkgs/development/libraries/gvfs/default.nix
index 86cbd01a6026..360c1fb41f4e 100644
--- a/pkgs/development/libraries/gvfs/default.nix
+++ b/pkgs/development/libraries/gvfs/default.nix
@@ -63,9 +63,9 @@ stdenv.mkDerivation rec {
 
   # Uncomment when switching back to meson
   # mesonFlags = [
-  #   "-Dgio_module_dir=lib/gio/modules"
-  #   "-Dsystemduserunitdir=lib/systemd/user"
-  #   "-Ddbus_service_dir=share/dbus-1/services"
+  #   "-Dgio_module_dir=${placeholder "out"}/lib/gio/modules"
+  #   "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user"
+  #   "-Ddbus_service_dir=${placeholder "out"}/share/dbus-1/services"
   #   "-Dtmpfilesdir=no"
   # ] ++ stdenv.lib.optionals (!gnomeSupport) [
   #   "-Dgcr=false" "-Dgoa=false" "-Dkeyring=false" "-Dhttp=false"
diff --git a/pkgs/development/libraries/libfm/default.nix b/pkgs/development/libraries/libfm/default.nix
index ce1d3b138f88..796c03dab5ee 100644
--- a/pkgs/development/libraries/libfm/default.nix
+++ b/pkgs/development/libraries/libfm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, glib, intltool, menu-cache, pango, pkgconfig, vala_0_34
+{ stdenv, fetchurl, glib, intltool, menu-cache, pango, pkgconfig, vala
 , extraOnly ? false
 , withGtk3 ? false, gtk2, gtk3 }:
 let
@@ -16,12 +16,11 @@ stdenv.mkDerivation rec {
     sha256 = "0wkwbi1nyvqza3r1dhrq846axiiq0fy0dqgngnagh76fjrwnzl0q";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ glib gtk intltool pango vala_0_34 ]
-                ++ optional (!extraOnly) menu-cache;
+  nativeBuildInputs = [ vala pkgconfig intltool ];
+  buildInputs = [ glib gtk pango ] ++ optional (!extraOnly) menu-cache;
 
-  configureFlags = [ (optional extraOnly "--with-extra-only")
-                     (optional withGtk3 "--with-gtk=3") ];
+  configureFlags = optional extraOnly "--with-extra-only"
+    ++ optional withGtk3 "--with-gtk=3";
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/development/libraries/libwnck/3.x.nix b/pkgs/development/libraries/libwnck/3.x.nix
index 8efd908584e1..f2d05d14d693 100644
--- a/pkgs/development/libraries/libwnck/3.x.nix
+++ b/pkgs/development/libraries/libwnck/3.x.nix
@@ -19,8 +19,8 @@ in stdenv.mkDerivation rec{
   nativeBuildInputs = [ pkgconfig intltool gobjectIntrospection ];
   propagatedBuildInputs = [ libX11 gtk3 ];
 
-  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "$(dev)/share/gir-1.0";
-  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "$(out)/lib/girepository-1.0";
+  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
+  PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
 
   passthru = {
     updateScript = gnome3.updateScript {
diff --git a/pkgs/development/libraries/opencolorio/default.nix b/pkgs/development/libraries/opencolorio/default.nix
index 751d845f773e..42c0de4d493c 100644
--- a/pkgs/development/libraries/opencolorio/default.nix
+++ b/pkgs/development/libraries/opencolorio/default.nix
@@ -1,22 +1,39 @@
-{ stdenv, lib, fetchurl, cmake, unzip, boost }:
+{ stdenv, lib, fetchFromGitHub, cmake, boost, pkgconfig, lcms2, tinyxml, git }:
+
+with lib;
 
 stdenv.mkDerivation rec {
   name = "opencolorio-${version}";
   version = "1.1.0";
 
-  src = fetchurl {
-    url = "https://github.com/imageworks/OpenColorIO/archive/v1.0.9.zip";
-    sha256 = "1vi5pcgj7gv8fp6cdnhszwfh7lh38rl2rk4c5yzsvmgcb7xf48bx";
+  src = fetchFromGitHub {
+    owner = "imageworks";
+    repo = "OpenColorIO";
+    rev = "v${version}";
+    sha256 = "0cjsyn681xsg89lirlll5pqlsqg2vnk1278iiicmzjy2a2v8x7zq";
   };
 
   outputs = [ "bin" "out" "dev" ];
 
-  buildInputs = [ cmake unzip ] ++ lib.optional stdenv.isDarwin boost;
+  # TODO: Investigate whether git can be dropped: It's only used to apply patches
+  nativeBuildInputs = [ cmake pkgconfig git ];
+
+  buildInputs = [ lcms2 tinyxml ] ++ optional stdenv.isDarwin boost;
+
+  postPatch = ''
+    substituteInPlace src/core/CMakeLists.txt --replace "-Werror" ""
+    substituteInPlace src/pyglue/CMakeLists.txt --replace "-Werror" ""
+  '';
 
-  cmakeFlags = lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON";
+  cmakeFlags = [
+    "-DUSE_EXTERNAL_LCMS=ON"
+    "-DUSE_EXTERNAL_TINYXML=ON"
+    # External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
+    "-DUSE_EXTERNAL_YAML=OFF"
+  ] ++ optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
+    ++ optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF";
 
   postInstall = ''
-    rm $out/lib/*.a
     mkdir -p $bin/bin; mv $out/bin $bin/
   '';
 
diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix
index c50fc9fb35c8..e87ed8e48a98 100644
--- a/pkgs/development/libraries/pipewire/default.nix
+++ b/pkgs/development/libraries/pipewire/default.nix
@@ -34,7 +34,7 @@ in stdenv.mkDerivation rec {
     "-Denable_gstreamer=true"
   ];
 
-  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "lib/systemd/user";
+  PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user";
 
   FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file
 
diff --git a/pkgs/development/libraries/science/math/sympow/default.nix b/pkgs/development/libraries/science/math/sympow/default.nix
index c34701e3f913..f421755b6182 100644
--- a/pkgs/development/libraries/science/math/sympow/default.nix
+++ b/pkgs/development/libraries/science/math/sympow/default.nix
@@ -34,13 +34,11 @@ stdenv.mkDerivation rec {
     makeWrapper "$out/share/sympow/sympow" "$out/bin/sympow" \
       --run 'export SYMPOW_LOCAL="$HOME/.local/share/sympow"' \
       --run 'if [ ! -d "$SYMPOW_LOCAL" ]; then
-        mkdir -p "$SYMPOW_LOCAL"
-        cp -r @out@/share/sympow/* "$SYMPOW_LOCAL"
+        mkdir -p "$SYMPOW_LOCAL" 
+        cp -r ${placeholder "out"}/share/sympow/* "$SYMPOW_LOCAL"
         chmod -R +xw "$SYMPOW_LOCAL"
     fi' \
       --run 'cd "$SYMPOW_LOCAL"'
-    substituteInPlace $out/bin/sympow --subst-var out
-
     runHook postInstall
   '';
 
diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix
index f4f10978ec13..f5258c1cd6d8 100644
--- a/pkgs/development/libraries/spice-gtk/default.nix
+++ b/pkgs/development/libraries/spice-gtk/default.nix
@@ -52,7 +52,7 @@ in stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala gobjectIntrospection ];
 
-  PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "$(out)/share/polkit-1/actions";
+  PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions";
 
   configureFlags = [
     "--with-gtk3"
diff --git a/pkgs/development/libraries/umockdev/default.nix b/pkgs/development/libraries/umockdev/default.nix
index 1ff71fa18114..9ee2dadb8b09 100644
--- a/pkgs/development/libraries/umockdev/default.nix
+++ b/pkgs/development/libraries/umockdev/default.nix
@@ -3,13 +3,13 @@
 
 stdenv.mkDerivation rec {
   name = "umockdev-${version}";
-  version = "0.11.3";
+  version = "0.12";
 
   src = fetchFromGitHub {
     owner  = "martinpitt";
     repo   = "umockdev";
     rev    = version;
-    sha256 = "1z101yw7clxz39im3y435s3rj1gna3kp0fkj9wd62vxqvk68lhik";
+    sha256 = "1j7kkxpqs991w3qdlb779gzv38l1vpnlk3laabi2ndk83j1wl5k2";
   };
 
   # autoreconfHook complains if we try to build the documentation
diff --git a/pkgs/development/ocaml-modules/bin_prot/default.nix b/pkgs/development/ocaml-modules/bin_prot/default.nix
index 1acb17a8f7a3..bc075295cf33 100644
--- a/pkgs/development/ocaml-modules/bin_prot/default.nix
+++ b/pkgs/development/ocaml-modules/bin_prot/default.nix
@@ -1,4 +1,8 @@
-{stdenv, buildOcaml, fetchurl, type_conv}:
+{ stdenv, buildOcaml, fetchurl, ocaml, type_conv }:
+
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "bin_prot-112.24.00 is not available for OCaml ${ocaml.version}"
+else
 
 buildOcaml rec {
   name = "bin_prot";
diff --git a/pkgs/development/ocaml-modules/bolt/default.nix b/pkgs/development/ocaml-modules/bolt/default.nix
index 121f484ce419..b5a4f179b17a 100644
--- a/pkgs/development/ocaml-modules/bolt/default.nix
+++ b/pkgs/development/ocaml-modules/bolt/default.nix
@@ -5,6 +5,10 @@ let inherit (stdenv.lib) getVersion versionAtLeast; in
 assert versionAtLeast (getVersion ocaml) "4.00.0";
 assert versionAtLeast (getVersion findlib) "1.3.3";
 
+if versionAtLeast ocaml.version "4.06"
+then throw "bolt is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
 
   name = "bolt-1.4";
diff --git a/pkgs/development/ocaml-modules/camlimages/4.1.nix b/pkgs/development/ocaml-modules/camlimages/4.1.nix
index 77a252de52fd..31b4047efc81 100644
--- a/pkgs/development/ocaml-modules/camlimages/4.1.nix
+++ b/pkgs/development/ocaml-modules/camlimages/4.1.nix
@@ -2,6 +2,10 @@
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00";
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "camlimages-4.1.2 is not available for OCaml ${ocaml.version}"
+else
+
 let
   pname = "camlimages";
   version = "4.1.2";
diff --git a/pkgs/development/ocaml-modules/cil/default.nix b/pkgs/development/ocaml-modules/cil/default.nix
index 0394266353ce..5fbb141b6cce 100644
--- a/pkgs/development/ocaml-modules/cil/default.nix
+++ b/pkgs/development/ocaml-modules/cil/default.nix
@@ -1,4 +1,9 @@
 { stdenv, fetchurl, perl, ocaml, findlib, ocamlbuild }:
+
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "cil is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
   name = "ocaml-cil-1.7.3";
   src = fetchurl {
diff --git a/pkgs/development/ocaml-modules/cryptgps/default.nix b/pkgs/development/ocaml-modules/cryptgps/default.nix
index cb85ebce5016..f8eb80837a3e 100644
--- a/pkgs/development/ocaml-modules/cryptgps/default.nix
+++ b/pkgs/development/ocaml-modules/cryptgps/default.nix
@@ -1,5 +1,9 @@
 {stdenv, fetchurl, ocaml, findlib}:
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "cryptgps is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
   name = "ocaml-cryptgps-${version}";
   version = "0.2.1";
diff --git a/pkgs/development/ocaml-modules/dypgen/default.nix b/pkgs/development/ocaml-modules/dypgen/default.nix
index 1bdcae521dd8..1abf387bdd3f 100644
--- a/pkgs/development/ocaml-modules/dypgen/default.nix
+++ b/pkgs/development/ocaml-modules/dypgen/default.nix
@@ -4,6 +4,10 @@ let
   pname = "dypgen";
 in
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "${pname} is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   version = "20120619-1";
diff --git a/pkgs/development/ocaml-modules/enumerate/default.nix b/pkgs/development/ocaml-modules/enumerate/default.nix
index 557f2f88d8d2..4f0c182726de 100644
--- a/pkgs/development/ocaml-modules/enumerate/default.nix
+++ b/pkgs/development/ocaml-modules/enumerate/default.nix
@@ -2,6 +2,10 @@
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00";
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "enumerate-111.08.00 is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
   name = "ocaml-enumerate-111.08.00";
 
diff --git a/pkgs/development/ocaml-modules/erm_xml/default.nix b/pkgs/development/ocaml-modules/erm_xml/default.nix
index ae264b657d87..c944752ff6b6 100644
--- a/pkgs/development/ocaml-modules/erm_xml/default.nix
+++ b/pkgs/development/ocaml-modules/erm_xml/default.nix
@@ -1,5 +1,9 @@
 { stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "erm_xml is not available for OCaml ${ocaml.version}"
+else
+
 let version = "0.3"; in
 
 stdenv.mkDerivation {
diff --git a/pkgs/development/ocaml-modules/faillib/default.nix b/pkgs/development/ocaml-modules/faillib/default.nix
index 98acc8032e3f..9b80433b6d19 100644
--- a/pkgs/development/ocaml-modules/faillib/default.nix
+++ b/pkgs/development/ocaml-modules/faillib/default.nix
@@ -1,4 +1,8 @@
-{stdenv, buildOcaml, fetchurl, herelib, camlp4}:
+{ stdenv, buildOcaml, fetchurl, ocaml, herelib, camlp4 }:
+
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "faillib-111.17.00 is not available for OCaml ${ocaml.version}"
+else
 
 buildOcaml rec {
   minimumSupportedOcamlVersion = "4.00";
diff --git a/pkgs/development/ocaml-modules/fieldslib/default.nix b/pkgs/development/ocaml-modules/fieldslib/default.nix
index 6a8db9e62816..36c1342e61fa 100644
--- a/pkgs/development/ocaml-modules/fieldslib/default.nix
+++ b/pkgs/development/ocaml-modules/fieldslib/default.nix
@@ -2,6 +2,10 @@
 
 assert stdenv.lib.versionOlder "4.00" (stdenv.lib.getVersion ocaml);
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "fieldslib-109.20.03 is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
   name = "ocaml-fieldslib-109.20.03";
 
diff --git a/pkgs/development/ocaml-modules/frontc/default.nix b/pkgs/development/ocaml-modules/frontc/default.nix
index ecf1ddc8fbae..e5330789e262 100644
--- a/pkgs/development/ocaml-modules/frontc/default.nix
+++ b/pkgs/development/ocaml-modules/frontc/default.nix
@@ -1,4 +1,8 @@
-{lib, buildOcaml, fetchurl}:
+{ lib, buildOcaml, fetchurl, ocaml }:
+
+if lib.versionAtLeast ocaml.version "4.06"
+then throw "FrontC is not available for OCaml ${ocaml.version}"
+else
 
 buildOcaml rec {
   name = "FrontC";
diff --git a/pkgs/development/ocaml-modules/gtktop/default.nix b/pkgs/development/ocaml-modules/gtktop/default.nix
index de0334c2a183..07420693005d 100644
--- a/pkgs/development/ocaml-modules/gtktop/default.nix
+++ b/pkgs/development/ocaml-modules/gtktop/default.nix
@@ -2,6 +2,10 @@
 
 let pname = "gtktop-2.0"; in
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "${pname} is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
   name = "ocaml-${pname}";
 
diff --git a/pkgs/development/ocaml-modules/lwt/legacy.nix b/pkgs/development/ocaml-modules/lwt/legacy.nix
index 53ba904f628e..cd40a5051be9 100644
--- a/pkgs/development/ocaml-modules/lwt/legacy.nix
+++ b/pkgs/development/ocaml-modules/lwt/legacy.nix
@@ -6,6 +6,7 @@
 }:
 
 if !stdenv.lib.versionAtLeast ocaml.version "4"
+ || stdenv.lib.versionAtLeast ocaml.version "4.06"
 then throw "lwt is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/magick/default.nix b/pkgs/development/ocaml-modules/magick/default.nix
index 021962154bd0..ca6ab458fff2 100644
--- a/pkgs/development/ocaml-modules/magick/default.nix
+++ b/pkgs/development/ocaml-modules/magick/default.nix
@@ -1,5 +1,9 @@
 { stdenv, fetchurl, which, pkgconfig, ocaml, findlib, imagemagick }:
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "magick is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
   name = "ocaml-magick-0.34";
   src = fetchurl {
diff --git a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix
index e1590bb0c9ae..22215b8da0dc 100644
--- a/pkgs/development/ocaml-modules/ocaml-cairo/default.nix
+++ b/pkgs/development/ocaml-modules/ocaml-cairo/default.nix
@@ -4,6 +4,10 @@ let
   pname = "ocaml-cairo";
 in
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "${pname} is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   version = "1.2.0";
diff --git a/pkgs/development/ocaml-modules/ocamlsdl/default.nix b/pkgs/development/ocaml-modules/ocamlsdl/default.nix
index e8441cf6937c..8cfe43a5d322 100644
--- a/pkgs/development/ocaml-modules/ocamlsdl/default.nix
+++ b/pkgs/development/ocaml-modules/ocamlsdl/default.nix
@@ -4,6 +4,10 @@ let
   pname = "ocamlsdl";
 in
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "${pname} is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   version = "0.9.1";
diff --git a/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix
index f30fea2c4192..a56a6140f8ea 100644
--- a/pkgs/development/ocaml-modules/odn/default.nix
+++ b/pkgs/development/ocaml-modules/odn/default.nix
@@ -1,5 +1,9 @@
 { stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }:
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "ocaml-data-notation is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
   name = "ocaml-data-notation-0.0.11";
 
diff --git a/pkgs/development/ocaml-modules/ojquery/default.nix b/pkgs/development/ocaml-modules/ojquery/default.nix
index 2d697a285fd3..8cf5819c9002 100644
--- a/pkgs/development/ocaml-modules/ojquery/default.nix
+++ b/pkgs/development/ocaml-modules/ojquery/default.nix
@@ -1,5 +1,9 @@
 { stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, js_of_ocaml-camlp4, camlp4, lwt3, react }:
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "ojquery is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
   version = "0.1";
   name = "ocaml-ojquery-${version}";
diff --git a/pkgs/development/ocaml-modules/pa_ounit/default.nix b/pkgs/development/ocaml-modules/pa_ounit/default.nix
index fa4ecfcc28b2..2471c855cf54 100644
--- a/pkgs/development/ocaml-modules/pa_ounit/default.nix
+++ b/pkgs/development/ocaml-modules/pa_ounit/default.nix
@@ -1,4 +1,8 @@
-{stdenv, buildOcaml, fetchurl, ounit}:
+{ stdenv, buildOcaml, ocaml, fetchurl, ounit }:
+
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "pa_ounit is not available for OCaml ${ocaml.version}"
+else
 
 buildOcaml rec {
   name = "pa_ounit";
diff --git a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
index ef9c254aba14..e8f248ee4a1c 100644
--- a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
+++ b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
@@ -2,6 +2,10 @@
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12";
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "sqlite3EZ is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
   name = "ocaml-sqlite3EZ-0.1.0";
 
diff --git a/pkgs/development/ocaml-modules/ulex/0.8/default.nix b/pkgs/development/ocaml-modules/ulex/0.8/default.nix
index 288e9a6933e7..6c0cf9214f29 100644
--- a/pkgs/development/ocaml-modules/ulex/0.8/default.nix
+++ b/pkgs/development/ocaml-modules/ulex/0.8/default.nix
@@ -4,6 +4,10 @@ let
   pname = "ulex";
 in
 
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "ulex-0.8 is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation rec {
   name = "${pname}-${version}";
   version = "0.8";
diff --git a/pkgs/development/ocaml-modules/variantslib/default.nix b/pkgs/development/ocaml-modules/variantslib/default.nix
index cb25b844606d..425383a64854 100644
--- a/pkgs/development/ocaml-modules/variantslib/default.nix
+++ b/pkgs/development/ocaml-modules/variantslib/default.nix
@@ -1,4 +1,8 @@
-{stdenv, buildOcaml, fetchurl, type_conv}:
+{ stdenv, buildOcaml, ocaml, fetchurl, type_conv }:
+
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "variantslib-109.15.03 is not available for OCaml ${ocaml.version}"
+else
 
 buildOcaml rec {
   name = "variantslib";
diff --git a/pkgs/development/python-modules/backports_lzma/default.nix b/pkgs/development/python-modules/backports_lzma/default.nix
index c650076d4c00..64fcc2c0d5d4 100644
--- a/pkgs/development/python-modules/backports_lzma/default.nix
+++ b/pkgs/development/python-modules/backports_lzma/default.nix
@@ -20,9 +20,8 @@ if !(pythonOlder "3.3") then null else buildPythonPackage rec {
 
   buildInputs = [ lzma ];
 
-  # Needs the compiled module in $out
   checkPhase = ''
-    PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ${python.interpreter} -m unittest discover -s test
+    ${python.interpreter} test/test_lzma.py
   '';
 
   meta = {
@@ -30,4 +29,4 @@ if !(pythonOlder "3.3") then null else buildPythonPackage rec {
     homepage = https://github.com/peterjc/backports.lzma;
     license = lib.licenses.bsd3;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/development/python-modules/buttersink/default.nix b/pkgs/development/python-modules/buttersink/default.nix
deleted file mode 100644
index b13251e1ca75..000000000000
--- a/pkgs/development/python-modules/buttersink/default.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ stdenv, buildPythonPackage, fetchPypi, isPy3k, boto, crcmod, psutil }:
-
-buildPythonPackage rec {
-  pname = "buttersink";
-  version = "0.6.9";
-  disabled = isPy3k;
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "c9c05982c44fbb85f17b7ef0e8bee11f375c03d89bcba50cbc2520013512107a";
-  };
-
-  propagatedBuildInputs = [ boto crcmod psutil ];
-
-  meta = with stdenv.lib; {
-    description = "Synchronise btrfs snapshots";
-    longDescription = ''
-      ButterSink is like rsync, but for btrfs subvolumes instead of files,
-      which makes it much more efficient for things like archiving backup
-      snapshots. It is built on top of btrfs send and receive capabilities.
-      Sources and destinations can be local btrfs file systems, remote btrfs
-      file systems over SSH, or S3 buckets.
-    '';
-    homepage = https://github.com/AmesCornish/buttersink/wiki;
-    license = licenses.gpl3;
-    platforms = platforms.linux;
-  };
-}
diff --git a/pkgs/development/python-modules/docker-registry-core/default.nix b/pkgs/development/python-modules/docker-registry-core/default.nix
deleted file mode 100644
index ad9968af173c..000000000000
--- a/pkgs/development/python-modules/docker-registry-core/default.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ stdenv, buildPythonPackage, fetchPypi, isPy3k
-, boto, redis, setuptools, simplejson }:
-
-buildPythonPackage rec {
-  pname = "docker-registry-core";
-  version = "2.0.3";
-  disabled = isPy3k;
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0q036rr0b5734szkj883hkb2kjhgcc5pm3dz4yz8vcim3x7q0zil";
-  };
-
-  DEPS = "loose";
-
-  doCheck = false;
-  propagatedBuildInputs = [ boto redis setuptools simplejson ];
-
-  patchPhase = "> requirements/main.txt";
-
-  meta = with stdenv.lib; {
-    description = "Docker registry core package";
-    homepage = https://github.com/docker/docker-registry;
-    license = licenses.asl20;
-  };
-}
diff --git a/pkgs/development/python-modules/folium/default.nix b/pkgs/development/python-modules/folium/default.nix
index eeb787ea3c09..9cef17dc7724 100644
--- a/pkgs/development/python-modules/folium/default.nix
+++ b/pkgs/development/python-modules/folium/default.nix
@@ -14,15 +14,15 @@
 
 buildPythonPackage rec {
   pname = "folium";
-  version = "0.5.0";
+  version = "0.6.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "748944521146d85c6cd6230acf234e885864cd0f42fea3758d655488517e5e6e";
+    sha256 = "0yfb8ygq67m149n72bb8h7dk9mx8d3ivc5ygqwdj4q8qggj1ns08";
   };
 
   checkInputs = [ pytest numpy nbconvert pandas mock ];
-  propagatedBuildInputs = [ jinja2 branca six requests ];
+  propagatedBuildInputs = [ jinja2 branca six requests numpy ];
 
   # No tests in archive
   doCheck = false;
diff --git a/pkgs/development/python-modules/httpsig/default.nix b/pkgs/development/python-modules/httpsig/default.nix
new file mode 100644
index 000000000000..cff72de36077
--- /dev/null
+++ b/pkgs/development/python-modules/httpsig/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, setuptools_scm
+, pycryptodome
+, requests
+}:
+
+buildPythonPackage rec {
+  pname = "httpsig";
+  version = "1.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "19ng7y7blp13z081z5a6dxng1p8xlih7g6frmsg3q5ri8lvpybc7";
+  };
+
+  buildInputs = [ setuptools_scm ];
+  propagatedBuildInputs = [ pycryptodome requests ];
+
+  # Jailbreak pycryptodome
+  preBuild = ''
+    substituteInPlace setup.py --replace "==3.4.7" ""
+  '';
+
+  meta = with lib; {
+    description = "Sign HTTP requests with secure signatures";
+    license = licenses.mit;
+    maintainers = with maintainers; [ srhb ];
+    homepage = https://github.com/ahknight/httpsig;
+  };
+}
diff --git a/pkgs/development/python-modules/plotly/default.nix b/pkgs/development/python-modules/plotly/default.nix
index 9d2df2a89ebd..6e7147e4e12f 100644
--- a/pkgs/development/python-modules/plotly/default.nix
+++ b/pkgs/development/python-modules/plotly/default.nix
@@ -5,6 +5,7 @@
 , nbformat
 , pytz
 , requests
+, retrying
 , six
 }:
 
@@ -22,6 +23,7 @@ buildPythonPackage rec {
     nbformat
     pytz
     requests
+    retrying
     six
   ];
 
diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix
index 962ebbecbaaa..d31719efa172 100644
--- a/pkgs/development/python-modules/pytorch/default.nix
+++ b/pkgs/development/python-modules/pytorch/default.nix
@@ -25,7 +25,7 @@ let
     "LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ";
 
 in buildPythonPackage rec {
-  version = "0.4.0";
+  version = "0.4.1";
   pname = "pytorch";
 
   src = fetchFromGitHub {
@@ -33,7 +33,7 @@ in buildPythonPackage rec {
     repo   = "pytorch";
     rev    = "v${version}";
     fetchSubmodules = true;
-    sha256 = "12d5vqqaprk0igmih7fwa65ldmaawgijxl58h6dnw660wysc132j";
+    sha256 = "1cr8h47jxgfar5bamyvlayvqymnb2qvp7rr0ka2d2d4rdldf9lrp";
   };
 
   preConfigure = lib.optionalString cudaSupport ''
@@ -56,7 +56,7 @@ in buildPythonPackage rec {
   ] ++ lib.optional (pythonOlder "3.5") typing;
 
   checkPhase = ''
-    ${cudaStubEnv}python test/run_test.py --exclude distributed
+    ${cudaStubEnv}python test/run_test.py --exclude distributed autograd distributions jit sparse torch utils nn
   '';
 
   meta = {
diff --git a/pkgs/development/python-modules/pywatchman/default.nix b/pkgs/development/python-modules/pywatchman/default.nix
new file mode 100644
index 000000000000..40aaea9c01a7
--- /dev/null
+++ b/pkgs/development/python-modules/pywatchman/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, buildPythonPackage, fetchPypi, watchman }:
+
+buildPythonPackage rec {
+  pname = "pywatchman";
+  version = "1.4.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h";
+  };
+
+  postPatch = ''
+    substituteInPlace pywatchman/__init__.py \
+      --replace "'watchman'" "'${watchman}/bin/watchman'"
+  '';
+
+  # No tests in archive
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Watchman client for Python";
+    homepage = https://facebook.github.io/watchman/;
+    license = licenses.bsd3;
+  };
+
+}
diff --git a/pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch b/pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch
deleted file mode 100644
index d5c3662e9abf..000000000000
--- a/pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/src/engines/ptrace.cc b/src/engines/ptrace.cc
-index 59b615f..e02cddf 100644
---- a/src/engines/ptrace.cc
-+++ b/src/engines/ptrace.cc
-@@ -21,6 +21,7 @@
- 
- #if defined(__aarch64__)
- #  include <sys/uio.h>
-+#  include <elf.h>
- #endif
- 
- #include <map>
diff --git a/pkgs/development/tools/analysis/kcov/default.nix b/pkgs/development/tools/analysis/kcov/default.nix
index 7d75d9a34e1a..af20165d155f 100644
--- a/pkgs/development/tools/analysis/kcov/default.nix
+++ b/pkgs/development/tools/analysis/kcov/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   name = "kcov-${version}";
-  version = "35";
+  version = "36";
 
   src = fetchFromGitHub {
     owner = "SimonKagstrom";
     repo = "kcov";
     rev = "v${version}";
-    sha256 = "1da9vm87pi5m9ika0q1f1ai85w3vwlap8yln147yr9sc37jp5jcw";
+    sha256 = "1q1mw5mxz041lr6qc2v4280rmx13pg1bx5r3bxz9bzs941r405r3";
   };
 
   preConfigure = "patchShebangs src/bin-to-c-source.py";
@@ -16,8 +16,6 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ zlib curl elfutils python libiberty libopcodes ];
 
-  patches = [ ./aarch64_nt_prstatus.patch ];
-
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
diff --git a/pkgs/development/tools/corgi/default.nix b/pkgs/development/tools/corgi/default.nix
new file mode 100644
index 000000000000..94596ab68afa
--- /dev/null
+++ b/pkgs/development/tools/corgi/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  name = "corgi-${rev}";
+  rev = "v0.2.3";
+
+  goPackagePath = "github.com/DrakeW/corgi";
+
+  src = fetchFromGitHub {
+    owner = "DrakeW";
+    repo = "corgi";
+    inherit rev;
+    sha256 = "0ahwpyd6dac04qw2ak51xfbwkr42sab1gkhh52i7hlcy12jpwl8q";
+  };
+
+  goDeps = ./deps.nix;
+
+  meta = with stdenv.lib; {
+    description = "CLI workflow manager";
+    longDescription = ''
+      Corgi is a command-line tool that helps with your repetitive command usages by organizing them into reusable snippet.
+    '';
+    homepage = https://github.com/DrakeW/corgi;
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ kalbasit ];
+  };
+}
diff --git a/pkgs/development/tools/corgi/deps.nix b/pkgs/development/tools/corgi/deps.nix
new file mode 100644
index 000000000000..d48b141627c7
--- /dev/null
+++ b/pkgs/development/tools/corgi/deps.nix
@@ -0,0 +1,47 @@
+[
+  {
+    goPackagePath = "github.com/chzyer/readline";
+    fetch = {
+      type = "git";
+      url = "https://github.com/chzyer/readline";
+      rev = "2972be24d48e78746da79ba8e24e8b488c9880de";
+      sha256 = "104q8dazj8yf6b089jjr82fy9h1g80zyyzvp3g8b44a7d8ngjj6r";
+    };
+  }
+  {
+    goPackagePath = "github.com/fatih/color";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fatih/color";
+      rev = "2d684516a8861da43017284349b7e303e809ac21";
+      sha256 = "1fcfmz4wji3gqmmsdx493r7d101s58hwjalqps6hy25nva5pvmfs";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/go-homedir";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/go-homedir";
+      rev = "ae18d6b8b3205b561c79e8e5f69bff09736185f4";
+      sha256 = "0f0z0aa4wivk4z1y503dmnw0k0g0g403dly8i4q263gfshs82sbq";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cobra";
+      rev = "99dc123558852f67743bd0b2caf8383cb3c6d720";
+      sha256 = "0b2rjgycgpkpvpsqgvilqkr66bfk477lyd6l0jxmgxb1h0za5s25";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev = "d929dcbb10863323c436af3cf76cb16a6dfc9b29";
+      sha256 = "1qjmqvszs9cmic7brm7pknq86zjra4hq923bn88blfvr3bap5bc4";
+    };
+  }
+]
diff --git a/pkgs/development/tools/kythe/default.nix b/pkgs/development/tools/kythe/default.nix
new file mode 100644
index 000000000000..5aae1d4f3bef
--- /dev/null
+++ b/pkgs/development/tools/kythe/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, binutils , fetchurl, glibc }:
+
+stdenv.mkDerivation rec {
+  version = "0.0.28";
+  name = "kythe-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/google/kythe/releases/download/v0.0.28/kythe-v0.0.28.tar.gz";
+    sha256 = "1qc7cngpxw66m3krpr5x50ns7gb3bpv2bdfzpb5afl12qp0mi6zm";
+  };
+
+  buildInputs =
+    [ binutils ];
+
+  doCheck = false;
+
+  dontBuild = true;
+
+  installPhase = ''
+    cd tools
+    for exe in http_server \
+                kythe read_entries triples verifier \
+                write_entries write_tables; do
+      echo "Patching:" $exe
+      patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $exe
+      patchelf --set-rpath "${stdenv.cc.cc.lib}/lib64" $exe
+    done
+    cd ../
+    cp -R ./ $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A pluggable, (mostly) language-agnostic ecosystem for building tools that work with code.";
+    longDescription = ''
+    The Kythe project was founded to provide and support tools and standards
+      that encourage interoperability among programs that manipulate source
+      code. At a high level, the main goal of Kythe is to provide a standard,
+      language-agnostic interchange mechanism, allowing tools that operate on
+      source code — including build systems, compilers, interpreters, static
+      analyses, editors, code-review applications, and more — to share
+      information with each other smoothly.  '';
+    homepage = https://kythe.io/;
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.mpickering ];
+  };
+}
diff --git a/pkgs/development/tools/minizinc/default.nix b/pkgs/development/tools/minizinc/default.nix
index d569b8d30687..8c210cb93601 100644
--- a/pkgs/development/tools/minizinc/default.nix
+++ b/pkgs/development/tools/minizinc/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, cmake, flex, bison }:
 let
-  version = "2.1.7";
+  version = "2.2.0";
 in
 stdenv.mkDerivation {
   name = "minizinc-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
     rev = "${version}";
     owner = "MiniZinc";
     repo = "libminizinc";
-    sha256 = "05rifsgzfaalv5ymv59sjcvhr6i1byzbmq5p36hj3hpi5f929kip";
+    sha256 = "05is1r5y06jfqwvka90dn2ffxnvbgyswaxl00aqz6455hnggnxvm";
   };
 
   # meta is all the information about the package..
diff --git a/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
index 84365889638c..4d7900de80d2 100644
--- a/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
+++ b/pkgs/development/tools/ocaml/omake/0.9.8.6-rc1.nix
@@ -4,6 +4,11 @@ let
   version = "0.9.8.6-0.rc1";
   webpage = "http://omake.metaprl.org";
 in
+
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "${pname}-${version} is not available for OCaml ${ocaml.version}"
+else
+
 stdenv.mkDerivation {
 
   name = "${pname}-${version}";
diff --git a/pkgs/development/tools/rust/bindgen/default.nix b/pkgs/development/tools/rust/bindgen/default.nix
index aeeae494e586..68df0af6ee46 100644
--- a/pkgs/development/tools/rust/bindgen/default.nix
+++ b/pkgs/development/tools/rust/bindgen/default.nix
@@ -1,6 +1,4 @@
-{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper, llvmPackages }:
-
-# Future work: Automatically communicate NIX_CFLAGS_COMPILE to bindgen's tests and the bindgen executable itself.
+{ stdenv, fetchFromGitHub, fetchpatch, rustPlatform, clang, llvmPackages, rustfmt, writeScriptBin }:
 
 rustPlatform.buildRustPackage rec {
   name = "rust-bindgen-${version}";
@@ -13,23 +11,54 @@ rustPlatform.buildRustPackage rec {
     sha256 = "0cqjr7qspjrfgqcp4nqxljmhhbqyijb2jpw3lajgjj48y6wrnw93";
   };
 
-  nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ llvmPackages.clang-unwrapped.lib ];
+  cargoSha256 = "0b8v6c7q1abibzygrigldpd31lyd5ngmj4vq5d7zni96m20mm85w";
+
+  libclang = llvmPackages.libclang.lib; #for substituteAll
+
+  buildInputs = [ libclang ];
+
+  propagatedBuildInputs = [ clang ]; # to populate NIX_CXXSTDLIB_COMPILE
+
+  patches = [
+    # https://github.com/rust-lang-nursery/rust-bindgen/pull/1376
+    (fetchpatch {
+      url = https://github.com/rust-lang-nursery/rust-bindgen/commit/c8b5406f08af82a92bf8faf852c21ba941d9c176.patch;
+      sha256 = "16ibr2rplh0qz8rsq6gir45xlz5nasad4y8fprwhrb7ssv8wfkss";
+    })
+  ];
 
   configurePhase = ''
-    export LIBCLANG_PATH="${llvmPackages.clang-unwrapped.lib}/lib"
+    export LIBCLANG_PATH="${libclang}/lib"
   '';
 
   postInstall = ''
-    wrapProgram $out/bin/bindgen --set LIBCLANG_PATH "${llvmPackages.clang-unwrapped.lib}/lib"
+    mv $out/bin/{bindgen,.bindgen-wrapped};
+    substituteAll ${./wrapper.sh} $out/bin/bindgen
+    chmod +x $out/bin/bindgen
   '';
 
-  cargoSha256 = "0b8v6c7q1abibzygrigldpd31lyd5ngmj4vq5d7zni96m20mm85w";
-
-  doCheck = false; # A test fails because it can't find standard headers in NixOS
+  doCheck = false; # half the tests fail because our rustfmt is not nightly enough
+  checkInputs =
+    let fakeRustup = writeScriptBin "rustup" ''
+      #!${stdenv.shell}
+      shift
+      shift
+      exec "$@"
+    '';
+  in [
+    rustfmt
+    fakeRustup # the test suite insists in calling `rustup run nightly rustfmt`
+    clang
+  ];
 
   meta = with stdenv.lib; {
     description = "C and C++ binding generator";
+    longDescription = ''
+      Bindgen takes a c or c++ header file and turns them into
+      rust ffi declarations.
+      As with most compiler related software, this will only work
+      inside a nix-shell with the required libraries as buildInputs.
+    '';
     homepage = https://github.com/rust-lang-nursery/rust-bindgen;
     license = with licenses; [ bsd3 ];
     maintainers = [ maintainers.ralith ];
diff --git a/pkgs/development/tools/rust/bindgen/wrapper.sh b/pkgs/development/tools/rust/bindgen/wrapper.sh
new file mode 100755
index 000000000000..95cd0901cec8
--- /dev/null
+++ b/pkgs/development/tools/rust/bindgen/wrapper.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+sep='--'   # whether to add -- before new options
+cxx=0      # whether cxx was explicitly requested
+lastWasx=0 # whether the last argument passed was -x
+for e in "$@"; do
+  if [[ "$e" == "--" ]]; then
+    sep=
+  fi;
+  if [[ "$sep" == "" ]]; then
+    # we look for -x c++ after -- only
+    if [[ "$e" == "-x" ]]; then
+      lastWasx=1
+    fi;
+    if [[ $lastWasx -eq 1 && "$e" == "c++" ]]; then
+      lastWasx=0
+      cxx=1
+    fi;
+    if [[ "$e" == "-xc++" || "$e" == -std=c++* ]]; then
+      cxx=1
+    fi;
+  fi;
+done;
+cxxflags=
+if [[ $cxx -eq 1 ]]; then
+  cxxflags=$NIX_CXXSTDLIB_COMPILE
+fi;
+if [[ -n "$NIX_DEBUG" ]]; then
+  set -x;
+fi;
+export LIBCLANG_PATH="@libclang@/lib"
+# shellcheck disable=SC2086
+# cxxflags and NIX_CFLAGS_COMPILE should be word-split
+exec -a "$0" @out@/bin/.bindgen-wrapped "$@" $sep $cxxflags $NIX_CFLAGS_COMPILE
+# note that we add the flags after $@ which is incorrect. This is only for the sake
+# of simplicity.
+