summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/amarok/kf5.nix5
-rw-r--r--pkgs/applications/gis/grass/default.nix23
-rw-r--r--pkgs/applications/graphics/digikam/default.nix1
-rw-r--r--pkgs/applications/kde/kmime.nix4
-rw-r--r--pkgs/applications/kde/libkcddb.nix4
-rw-r--r--pkgs/applications/misc/deepin-terminal/default.nix8
-rw-r--r--pkgs/applications/misc/font-manager/default.nix7
-rw-r--r--pkgs/applications/misc/haxor-news/default.nix24
-rw-r--r--pkgs/applications/misc/kupfer/default.nix7
-rw-r--r--pkgs/applications/misc/pdfpc/default.nix8
-rw-r--r--pkgs/applications/misc/synapse/default.nix8
-rw-r--r--pkgs/applications/misc/valauncher/default.nix10
-rw-r--r--pkgs/applications/networking/browsers/lynx/default.nix6
-rw-r--r--pkgs/applications/office/kexi/default.nix4
-rw-r--r--pkgs/applications/office/skrooge/default.nix7
-rw-r--r--pkgs/applications/office/watson/default.nix27
-rw-r--r--pkgs/applications/science/logic/coq/8.4.nix2
-rw-r--r--pkgs/applications/science/logic/coq/default.nix2
-rw-r--r--pkgs/applications/science/math/R/setup-hook.sh6
-rw-r--r--pkgs/applications/science/math/glsurf/default.nix2
-rw-r--r--pkgs/applications/video/kodi/default.nix2
-rw-r--r--pkgs/applications/video/mplayer/default.nix3
22 files changed, 110 insertions, 60 deletions
diff --git a/pkgs/applications/audio/amarok/kf5.nix b/pkgs/applications/audio/amarok/kf5.nix
index a96aa3ed65d..a4ac2943bfb 100644
--- a/pkgs/applications/audio/amarok/kf5.nix
+++ b/pkgs/applications/audio/amarok/kf5.nix
@@ -3,7 +3,7 @@
 , qca-qt5, qjson, qtscript, qtwebkit
 , kcmutils, kconfig, kdelibs4support, kdnssd, kinit, knewstuff, knotifyconfig, ktexteditor
 , phonon, plasma-framework, threadweaver
-, curl, ffmpeg, gdk_pixbuf, libaio, libmtp, loudmouth, lzo, lz4, mariadb, pcre, snappy, taglib, taglib_extras
+, curl, ffmpeg, gdk_pixbuf, libaio, libmtp, loudmouth, lzo, lz4, mysql57, pcre, snappy, taglib, taglib_extras
 }:
 
 let
@@ -26,7 +26,8 @@ in mkDerivation {
     qca-qt5 qjson qtscript qtwebkit
     kcmutils kconfig kdelibs4support kdnssd kinit knewstuff knotifyconfig ktexteditor
     phonon plasma-framework threadweaver
-    curl ffmpeg gdk_pixbuf libaio libmtp loudmouth lz4 lzo mariadb pcre snappy taglib taglib_extras
+    curl ffmpeg gdk_pixbuf libaio libmtp loudmouth lz4 lzo mysql57.server mysql57.server.static
+    pcre snappy taglib taglib_extras
   ];
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
index 3382bb3e56d..987b544c556 100644
--- a/pkgs/applications/gis/grass/default.nix
+++ b/pkgs/applications/gis/grass/default.nix
@@ -4,15 +4,15 @@
 }:
 
 stdenv.mkDerivation {
-  name = "grass-7.0.2";
+  name = "grass-7.2.2";
   src = fetchurl {
-    url = http://grass.osgeo.org/grass70/source/grass-7.0.2.tar.gz;
-    sha256 = "02qrdgn46gxr60amxwax4b8fkkmhmjxi6qh4yfvpbii6ai6diarf";
+    url = http://grass.osgeo.org/grass72/source/grass-7.2.2.tar.gz;
+    sha256 = "0yzljbrxlqp4wbw08n1dvmm4vmwkg8glf1ff4xyh589r5ryb7gxv";
   };
 
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo
-  readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.client blas ]
+  readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas ]
     ++ (with python2Packages; [ python dateutil wxPython30 numpy ]);
 
   configureFlags = [
@@ -22,9 +22,12 @@ stdenv.mkDerivation {
     "--with-wxwidgets"
     "--with-netcdf"
     "--with-geos"
-    "--with-postgres" "--with-postgres-libs=${postgresql.lib}/lib/"
+    "--with-postgres"
+    "--with-postgres-libs=${postgresql.lib}/lib/"
     # it complains about missing libmysqld but doesn't really seem to need it
-    "--with-mysql" "--with-mysql-includes=${stdenv.lib.getDev mysql.client}/include/mysql"
+    "--with-mysql"
+    "--with-mysql-includes=${mysql.connector-c}/include/mysql"
+    "--with-mysql-libs=${mysql.connector-c}/lib/mysql"
     "--with-blas"
   ];
 
@@ -40,17 +43,20 @@ stdenv.mkDerivation {
       scripts/r.pack/r.pack.py \
       scripts/r.tileset/r.tileset.py \
       scripts/r.unpack/r.unpack.py \
-      scripts/v.krige/v.krige.py \
       scripts/v.rast.stats/v.rast.stats.py \
       scripts/v.to.lines/v.to.lines.py \
       scripts/v.what.strds/v.what.strds.py \
       scripts/v.unpack/v.unpack.py \
       scripts/wxpyimgview/*.py \
       gui/wxpython/animation/g.gui.animation.py \
+      gui/wxpython/datacatalog/g.gui.datacatalog.py \
       gui/wxpython/rlisetup/g.gui.rlisetup.py \
       gui/wxpython/vdigit/g.gui.vdigit.py \
       temporal/t.rast.accumulate/t.rast.accumulate.py \
       temporal/t.rast.accdetect/t.rast.accdetect.py \
+      temporal/t.rast.algebra/t.rast.algebra.py \
+      temporal/t.rast3d.algebra/t.rast3d.algebra.py \
+      temporal/t.vect.algebra/t.vect.algebra.py \
       temporal/t.select/t.select.py
     for d in gui lib scripts temporal tools; do
       patchShebangs $d
@@ -58,7 +64,7 @@ stdenv.mkDerivation {
   '';
 
   postInstall = ''
-    wrapProgram $out/bin/grass70 \
+    wrapProgram $out/bin/grass72 \
     --set PYTHONPATH $PYTHONPATH \
     --set GRASS_PYTHON ${python2Packages.python}/bin/${python2Packages.python.executable} \
     --suffix LD_LIBRARY_PATH ':' '${gdal}/lib'
@@ -72,6 +78,5 @@ stdenv.mkDerivation {
     description = "GIS software suite used for geospatial data management and analysis, image processing, graphics and maps production, spatial modeling, and visualization";
     license = stdenv.lib.licenses.gpl2Plus;
     platforms = stdenv.lib.platforms.all;
-    broken = true;
   };
 }
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index c955a61d369..9a26dcdaa6a 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -75,7 +75,6 @@ mkDerivation rec {
     libqtav
     libusb1
     mesa
-    mysql
     opencv3
     pcre
 
diff --git a/pkgs/applications/kde/kmime.nix b/pkgs/applications/kde/kmime.nix
index b18a3f7fdc1..4523a69fc1b 100644
--- a/pkgs/applications/kde/kmime.nix
+++ b/pkgs/applications/kde/kmime.nix
@@ -10,7 +10,7 @@ mkDerivation {
     license = [ lib.licenses.lgpl21 ];
     maintainers = kdepimTeam;
   };
-  nativeBuildInputs = [ extra-cmake-modules ki18n ];
-  buildInputs = [ kcodecs qtbase ];
+  nativeBuildInputs = [ extra-cmake-modules ];
+  buildInputs = [ kcodecs ki18n qtbase ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/applications/kde/libkcddb.nix b/pkgs/applications/kde/libkcddb.nix
index edd9732d051..3fd48605654 100644
--- a/pkgs/applications/kde/libkcddb.nix
+++ b/pkgs/applications/kde/libkcddb.nix
@@ -8,8 +8,8 @@ mkDerivation {
     license = with licenses; [ gpl2 lgpl21 bsd3 ];
     maintainers = with maintainers; [ peterhoeg ];
   };
-  nativeBuildInputs = [ extra-cmake-modules ];
-  buildInputs = [ qtbase kdoctools ];
+  nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+  buildInputs = [ qtbase ];
   propagatedBuildInputs = [
     kcodecs ki18n kio kwidgetsaddons
     libmusicbrainz5
diff --git a/pkgs/applications/misc/deepin-terminal/default.nix b/pkgs/applications/misc/deepin-terminal/default.nix
index e08a2827b83..12ceb0958f0 100644
--- a/pkgs/applications/misc/deepin-terminal/default.nix
+++ b/pkgs/applications/misc/deepin-terminal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, gtk3, vala, cmake, vte, libgee, wnck, zssh, gettext, librsvg, libsecret, json_glib }:
+{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, gtk3, vala, cmake, vte, libgee, wnck, zssh, gettext, librsvg, libsecret, json_glib, gobjectIntrospection }:
 
 stdenv.mkDerivation rec {
   name = "deepin-terminal-${version}";
@@ -25,7 +25,11 @@ stdenv.mkDerivation rec {
     substituteInPlace ssh_login.sh --replace /usr/lib/deepin-terminal/zssh "${zssh}/bin/zssh"
   '';
 
-  nativeBuildInputs = [ pkgconfig vala cmake gettext ];
+  nativeBuildInputs = [
+    pkgconfig vala cmake gettext
+    # For setup hook
+    gobjectIntrospection
+  ];
   buildInputs = [ gtk3 vte libgee wnck librsvg libsecret json_glib ];
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/misc/font-manager/default.nix b/pkgs/applications/misc/font-manager/default.nix
index 6d67d3a340f..8c63c856578 100644
--- a/pkgs/applications/misc/font-manager/default.nix
+++ b/pkgs/applications/misc/font-manager/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchFromGitHub, makeWrapper, automake, autoconf, libtool,
+{ stdenv, fetchFromGitHub, automake, autoconf, libtool,
   pkgconfig, file, intltool, libxml2, json_glib , sqlite, itstool,
-  librsvg, vala_0_34, gnome3, wrapGAppsHook
+  librsvg, vala_0_34, gnome3, wrapGAppsHook, gobjectIntrospection
 }:
 
 stdenv.mkDerivation rec {
@@ -15,7 +15,6 @@ stdenv.mkDerivation rec {
     };
 
   nativeBuildInputs = [
-    makeWrapper
     pkgconfig
     automake autoconf libtool
     file
@@ -23,6 +22,8 @@ stdenv.mkDerivation rec {
     vala_0_34
     gnome3.yelp_tools
     wrapGAppsHook
+    # For setup hook
+    gobjectIntrospection
   ];
 
   buildInputs = [
diff --git a/pkgs/applications/misc/haxor-news/default.nix b/pkgs/applications/misc/haxor-news/default.nix
index dc771fc2d5e..c82e5026ff1 100644
--- a/pkgs/applications/misc/haxor-news/default.nix
+++ b/pkgs/applications/misc/haxor-news/default.nix
@@ -1,15 +1,17 @@
-{ stdenv, fetchurl, pythonPackages }:
+{ stdenv, fetchurl, python }:
 
-pythonPackages.buildPythonApplication rec {
-  version = "0.4.2";
-  name = "haxor-news-${version}";
+with python.pkgs;
 
-  src = fetchurl {
-    url = "https://github.com/donnemartin/haxor-news/archive/${version}.tar.gz";
-    sha256 = "0543k5ys044f2a1q8k36djnnq2h2dffnwbkva9snjjy30nlwwdgs";
+buildPythonApplication rec {
+  pname = "haxor-news";
+  version = "0.4.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "5b9af8338a0f8b95a8133b66ef106553823813ac171c0aefa3f3f2dbeb4d7f88";
   };
 
-  propagatedBuildInputs = with pythonPackages; [
+  propagatedBuildInputs = [
     click
     colorama
     requests
@@ -18,6 +20,12 @@ pythonPackages.buildPythonApplication rec {
     six
   ];
 
+  checkInputs = [ mock ];
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover -s tests -v
+  '';
+
   meta = with stdenv.lib; {
     homepage = https://github.com/donnemartin/haxor-news;
     description = "Browse Hacker News like a haxor";
diff --git a/pkgs/applications/misc/kupfer/default.nix b/pkgs/applications/misc/kupfer/default.nix
index f3bb825cbf7..e2290105c92 100644
--- a/pkgs/applications/misc/kupfer/default.nix
+++ b/pkgs/applications/misc/kupfer/default.nix
@@ -3,6 +3,7 @@
 , fetchurl
 , intltool
 , python3Packages
+, gobjectIntrospection
 , gtk3
 , dbus
 , libwnck3
@@ -22,7 +23,11 @@ buildPythonApplication rec {
     sha256 = "0c9xjx13r8ckfr4az116bhxsd3pk78v04c3lz6lqhraak0rp4d92";
   };
 
-  nativeBuildInputs = [ wrapGAppsHook intltool ];
+  nativeBuildInputs = [
+    wrapGAppsHook intltool
+    # For setup hook
+    gobjectIntrospection
+  ];
   buildInputs = [ hicolor_icon_theme docutils libwnck3 keybinder3 ];
   propagatedBuildInputs = [ pygobject3 gtk3 pyxdg dbus-python pycairo ];
 
diff --git a/pkgs/applications/misc/pdfpc/default.nix b/pkgs/applications/misc/pdfpc/default.nix
index 8e0fc613721..9fc14d0cae7 100644
--- a/pkgs/applications/misc/pdfpc/default.nix
+++ b/pkgs/applications/misc/pdfpc/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig, vala, gtk3, libgee
-, poppler, libpthreadstubs, gstreamer, gst-plugins-base, librsvg, pcre }:
+, poppler, libpthreadstubs, gstreamer, gst-plugins-base, librsvg, pcre, gobjectIntrospection }:
 
 stdenv.mkDerivation rec {
   name = "${product}-${version}";
@@ -13,7 +13,11 @@ stdenv.mkDerivation rec {
     sha256 = "00qfmmk8h762p53z46g976z7j4fbxyi16w5axzsv1ymvdq95ds8c";
   };
 
-  nativeBuildInputs = [ cmake pkgconfig vala ];
+  nativeBuildInputs = [
+    cmake pkgconfig vala
+    # For setup hook
+    gobjectIntrospection
+  ];
   buildInputs = [ gstreamer gst-plugins-base gtk3 libgee poppler
     libpthreadstubs makeWrapper librsvg pcre ];
 
diff --git a/pkgs/applications/misc/synapse/default.nix b/pkgs/applications/misc/synapse/default.nix
index 04f38968142..13f3fa98d56 100644
--- a/pkgs/applications/misc/synapse/default.nix
+++ b/pkgs/applications/misc/synapse/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, intltool, pkgconfig, glib, libnotify, gtk3, libgee
-, keybinder3, json_glib, zeitgeist, vala_0_34, hicolor_icon_theme
+, keybinder3, json_glib, zeitgeist, vala_0_34, hicolor_icon_theme, gobjectIntrospection
 }:
 
 let
@@ -12,7 +12,11 @@ in stdenv.mkDerivation rec {
     sha256 = "04cnsmwf9xa52dh7rpb4ia715c0ls8jg1p7llc9yf3lbg1m0bvzv";
   };
 
-  nativeBuildInputs = [ pkgconfig intltool vala_0_34 ];
+  nativeBuildInputs = [
+    pkgconfig intltool vala_0_34
+    # For setup hook
+    gobjectIntrospection
+  ];
   buildInputs = [
     glib libnotify gtk3 libgee keybinder3 json_glib zeitgeist
     hicolor_icon_theme
diff --git a/pkgs/applications/misc/valauncher/default.nix b/pkgs/applications/misc/valauncher/default.nix
index f780e5469d0..38c4055a10b 100644
--- a/pkgs/applications/misc/valauncher/default.nix
+++ b/pkgs/applications/misc/valauncher/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake, gtk3, vala, pkgconfig, gnome3 }:
+{ stdenv, fetchFromGitHub, cmake, gtk3, vala, pkgconfig, gnome3, gobjectIntrospection }:
 
 stdenv.mkDerivation rec {
   version = "1.3.1";
@@ -11,8 +11,12 @@ stdenv.mkDerivation rec {
     sha256 = "18969v870737jg1q0l3d05pb9mxsrcpdi0mnyz94rwkspszvxxqi";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ cmake gtk3 vala gnome3.libgee ];
+  nativeBuildInputs = [
+    cmake vala pkgconfig
+    # For setup hook
+    gobjectIntrospection
+  ];
+  buildInputs = [ gtk3 gnome3.libgee ];
 
   meta = with stdenv.lib; {
       description = "A fast dmenu-like gtk3 application launcher";
diff --git a/pkgs/applications/networking/browsers/lynx/default.nix b/pkgs/applications/networking/browsers/lynx/default.nix
index 0f6c4ed36d4..4e68d21be0c 100644
--- a/pkgs/applications/networking/browsers/lynx/default.nix
+++ b/pkgs/applications/networking/browsers/lynx/default.nix
@@ -22,9 +22,9 @@ stdenv.mkDerivation rec {
 
   configureFlags = [ "--enable-widec" ] ++ stdenv.lib.optional sslSupport "--with-ssl";
 
-  nativeBuildInputs = stdenv.lib.optional sslSupport pkgconfig
-    ++ stdenv.lib.optional (hostPlatform != buildPlatform) buildPackages.stdenv.cc
-    ++ [ nukeReferences ];
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ nukeReferences ]
+    ++ stdenv.lib.optional sslSupport pkgconfig;
 
   buildInputs = [ ncurses gzip ] ++ stdenv.lib.optional sslSupport openssl.dev;
 
diff --git a/pkgs/applications/office/kexi/default.nix b/pkgs/applications/office/kexi/default.nix
index 66aee6bd962..8463703c017 100644
--- a/pkgs/applications/office/kexi/default.nix
+++ b/pkgs/applications/office/kexi/default.nix
@@ -4,7 +4,7 @@
   breeze-icons, karchive, kcodecs, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
   kcrash, kguiaddons, ki18n, kiconthemes, kitemviews, kio, ktexteditor, ktextwidgets,
   kwidgetsaddons, kxmlgui,
-  kdb, kproperty, kreport, lcms2, libmysql, marble, postgresql
+  kdb, kproperty, kreport, lcms2, mysql, marble, postgresql
 }:
 
 mkDerivation rec {
@@ -24,7 +24,7 @@ mkDerivation rec {
     breeze-icons karchive kcodecs kcompletion kconfig kconfigwidgets kcoreaddons
     kcrash kguiaddons ki18n kiconthemes kitemviews kio ktexteditor ktextwidgets
     kwidgetsaddons kxmlgui
-    kdb kproperty kreport lcms2 libmysql marble postgresql
+    kdb kproperty kreport lcms2 mysql.connector-c marble postgresql
   ];
 
   propagatedUserEnvPkgs = [ kproperty ];
diff --git a/pkgs/applications/office/skrooge/default.nix b/pkgs/applications/office/skrooge/default.nix
index f88cc147098..1aaf05a123e 100644
--- a/pkgs/applications/office/skrooge/default.nix
+++ b/pkgs/applications/office/skrooge/default.nix
@@ -14,9 +14,12 @@ mkDerivation rec {
     sha256 = "1dbvdrkdpgv39v8h7k3mri0nzlslfyd5kk410czj0jdn4qq400md";
   };
 
-  nativeBuildInputs = [ cmake extra-cmake-modules shared_mime_info ];
+  nativeBuildInputs = [
+    cmake extra-cmake-modules kdoctools shared_mime_info
+  ];
 
-  buildInputs = [ qtwebkit qtscript grantlee kxmlgui kwallet kparts kdoctools
+  buildInputs = [
+    qtwebkit qtscript grantlee kxmlgui kwallet kparts
     kjobwidgets kdesignerplugin kiconthemes knewstuff sqlcipher qca-qt5
     kactivities karchive kguiaddons knotifyconfig krunner kwindowsystem libofx
   ];
diff --git a/pkgs/applications/office/watson/default.nix b/pkgs/applications/office/watson/default.nix
index a1fcfd5de70..e0f0c58b450 100644
--- a/pkgs/applications/office/watson/default.nix
+++ b/pkgs/applications/office/watson/default.nix
@@ -1,13 +1,14 @@
-{ stdenv, pythonPackages }:
+{ stdenv, pythonPackages, fetchpatch }:
 
-pythonPackages.buildPythonApplication rec {
+with pythonPackages;
+
+buildPythonApplication rec {
   pname = "td-watson";
-  name = "${pname}-${version}";
-  version = "1.4.0";
+  version = "1.5.2";
 
-  src = pythonPackages.fetchPypi {
+  src = fetchPypi {
     inherit version pname;
-    sha256 = "1py0g4990jmvq0dn7jasda7f10kzr41bix46hnbyc1rshjzc17hq";
+    sha256 = "6e03d44a9278807fe5245e9ed0943f13ffb88e11249a02655c84cb86260b27c8";
   };
 
   # uses tox, test invocation fails
@@ -15,8 +16,16 @@ pythonPackages.buildPythonApplication rec {
   checkPhase = ''
     py.test -vs tests
  '';
-  checkInputs = with pythonPackages; [ py pytest pytest-datafiles mock pytest-mock pytestrunner ];
-  propagatedBuildInputs = with pythonPackages; [ requests click arrow ];
+
+  patches = [
+    (fetchpatch {
+      url = https://github.com/TailorDev/Watson/commit/f5760c71cbc22de4e12ede8f6f7257515a9064d3.patch;
+      sha256 = "0s9h26915ilpbd0qhmvk77r3gmrsdrl5l7dqxj0l5q66fp0z6b0g";
+    })
+  ];
+
+  checkInputs = [ py pytest pytest-datafiles mock pytest-mock pytestrunner ];
+  propagatedBuildInputs = [ requests click arrow ];
 
   meta = with stdenv.lib; {
     homepage = https://tailordev.github.io/Watson/;
@@ -24,4 +33,4 @@ pythonPackages.buildPythonApplication rec {
     license = licenses.mit;
     maintainers = with maintainers; [ mguentner ] ;
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/applications/science/logic/coq/8.4.nix b/pkgs/applications/science/logic/coq/8.4.nix
index 1f7ef571eaf..64b0f85aed2 100644
--- a/pkgs/applications/science/logic/coq/8.4.nix
+++ b/pkgs/applications/science/logic/coq/8.4.nix
@@ -60,7 +60,7 @@ stdenv.mkDerivation {
       fi
     }
 
-    envHooks=(''${envHooks[@]} addCoqPath)
+    addEnvHooks "$targetOffset" addCoqPath
   '';
 
   passthru = {
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index 4c67904b2b1..9ed535cfe63 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -110,7 +110,7 @@ self = stdenv.mkDerivation {
       fi
     }
 
-    envHooks=(''${envHooks[@]} addCoqPath)
+    addEnvHooks "$targetOffset" addCoqPath
   '';
 
   preConfigure = ''
diff --git a/pkgs/applications/science/math/R/setup-hook.sh b/pkgs/applications/science/math/R/setup-hook.sh
index 09a775db9bf..6951e2a4b61 100644
--- a/pkgs/applications/science/math/R/setup-hook.sh
+++ b/pkgs/applications/science/math/R/setup-hook.sh
@@ -1,5 +1,7 @@
 addRLibPath () {
-    addToSearchPath R_LIBS_SITE $1/library
+    if [[ -d "$1/library" ]]; then
+        addToSearchPath R_LIBS_SITE "$1/library"
+    fi
 }
 
-envHooks+=(addRLibPath)
+addEnvHooks "$targetOffset" addRLibPath
diff --git a/pkgs/applications/science/math/glsurf/default.nix b/pkgs/applications/science/math/glsurf/default.nix
index 3e4c8c70286..67dcfd8dc1d 100644
--- a/pkgs/applications/science/math/glsurf/default.nix
+++ b/pkgs/applications/science/math/glsurf/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
     sha256 = "0w8xxfnw2snflz8wdr2ca9f5g91w5vbyp1hwlx1v7vg83d4bwqs7";
   };
 
-  buildInputs = [ freeglut mesa mysql.lib mpfr gmp
+  buildInputs = [ freeglut mesa mysql.connector-c mpfr gmp
     libtiff libjpeg libpng giflib ]
   ++ (with ocamlPackages; [
     ocaml findlib ocaml_mysql lablgl camlimages_4_0 mlgmpidl
diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix
index 125a6d492a3..28577a429bd 100644
--- a/pkgs/applications/video/kodi/default.nix
+++ b/pkgs/applications/video/kodi/default.nix
@@ -130,7 +130,7 @@ in stdenv.mkDerivation rec {
       libmpeg2 libsamplerate libmad
       libogg libvorbis flac libxslt systemd
       lzo libcdio libmodplug libass libbluray
-      sqlite mysql.lib avahi lame
+      sqlite mysql.connector-c avahi lame
       curl bzip2 zip unzip glxinfo xdpyinfo
       libcec libcec_platform dcadec libuuid
       libgcrypt libgpgerror libunistring
diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix
index 24c5b4335c4..fe6090c3230 100644
--- a/pkgs/applications/video/mplayer/default.nix
+++ b/pkgs/applications/video/mplayer/default.nix
@@ -102,7 +102,8 @@ stdenv.mkDerivation rec {
     rm -rf ffmpeg
   '';
 
-  nativeBuildInputs = [ buildPackages.stdenv.cc pkgconfig yasm ];
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ pkgconfig yasm ];
   buildInputs = with stdenv.lib;
     [ freetype ffmpeg ]
     ++ optional aalibSupport aalib