summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-05-22 12:09:23 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-05-22 12:09:23 +0200
commitc4661e96434118637a5c41511a6c7f015726396f (patch)
treeedd7a4026fd903cddfb32b27f629af7f5c110fa8 /pkgs
parentbfd522da633bd904918a939b29f0a0ebb594fa6b (diff)
parentc02f0ade90c2ba28063dc21a8cbdad50b777f403 (diff)
downloadnixpkgs-c4661e96434118637a5c41511a6c7f015726396f.tar
nixpkgs-c4661e96434118637a5c41511a6c7f015726396f.tar.gz
nixpkgs-c4661e96434118637a5c41511a6c7f015726396f.tar.bz2
nixpkgs-c4661e96434118637a5c41511a6c7f015726396f.tar.lz
nixpkgs-c4661e96434118637a5c41511a6c7f015726396f.tar.xz
nixpkgs-c4661e96434118637a5c41511a6c7f015726396f.tar.zst
nixpkgs-c4661e96434118637a5c41511a6c7f015726396f.zip
Merge: make dev output references explicit
This is a rebase of most commits from #14766,
resolving conflicts and a few other evaluation problems.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/display-managers/slim/default.nix2
-rw-r--r--pkgs/applications/editors/emacs-25/default.nix2
-rw-r--r--pkgs/applications/editors/texmaker/default.nix2
-rw-r--r--pkgs/applications/graphics/digikam/default.nix2
-rw-r--r--pkgs/applications/graphics/qtpfsgui/default.nix4
-rw-r--r--pkgs/applications/graphics/shotwell/default.nix2
-rw-r--r--pkgs/applications/misc/apvlv/default.nix2
-rw-r--r--pkgs/applications/misc/calibre/default.nix2
-rw-r--r--pkgs/applications/misc/diffpdf/default.nix2
-rw-r--r--pkgs/applications/misc/fetchmail/default.nix2
-rw-r--r--pkgs/applications/misc/garmin-plugin/default.nix2
-rw-r--r--pkgs/applications/misc/gkrellm/default.nix2
-rw-r--r--pkgs/applications/misc/mrxvt/default.nix2
-rw-r--r--pkgs/applications/misc/pinfo/default.nix2
-rw-r--r--pkgs/applications/misc/rxvt_unicode/default.nix2
-rw-r--r--pkgs/applications/misc/xautoclick/default.nix2
-rw-r--r--pkgs/applications/misc/zathura/core/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/elinks/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/lynx/default.nix2
-rw-r--r--pkgs/applications/networking/browsers/w3m/default.nix2
-rw-r--r--pkgs/applications/networking/cluster/mesos/default.nix10
-rw-r--r--pkgs/applications/networking/instant-messengers/centerim/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/ekiga/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/linphone/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/mcabber/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/silc-client/default.nix2
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix12
-rw-r--r--pkgs/applications/networking/instant-messengers/twinkle/default.nix2
-rw-r--r--pkgs/applications/networking/irc/wraith/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/alpine/default.nix2
-rw-r--r--pkgs/applications/networking/mailreaders/realpine/default.nix2
-rw-r--r--pkgs/applications/networking/newsreaders/slrn/default.nix2
-rw-r--r--pkgs/applications/networking/remote/rdesktop/default.nix2
-rw-r--r--pkgs/applications/science/astronomy/celestia/default.nix2
-rw-r--r--pkgs/applications/science/math/pari/default.nix4
-rw-r--r--pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix2
-rw-r--r--pkgs/applications/version-management/kdesvn/default.nix2
-rw-r--r--pkgs/applications/version-management/redmine/default.nix2
-rw-r--r--pkgs/applications/version-management/subversion/default.nix6
-rw-r--r--pkgs/applications/video/xine-ui/default.nix2
-rw-r--r--pkgs/applications/virtualization/virt-manager/default.nix2
-rw-r--r--pkgs/applications/virtualization/virtualbox/default.nix2
-rw-r--r--pkgs/data/icons/tango-icon-theme/default.nix2
-rw-r--r--pkgs/desktops/enlightenment/elementary.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/apps/cheese/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/apps/gnome-calendar/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/apps/gnome-documents/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/apps/gnome-photos/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/apps/seahorse/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/baobab/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/evince/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-calculator/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-desktop/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-disk-utility/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-font-viewer/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-settings-daemon/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix4
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/libgdata/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/mutter/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/core/totem/default.nix2
-rw-r--r--pkgs/desktops/gnome-3/3.18/misc/pidgin/default.nix2
-rw-r--r--pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix2
-rw-r--r--pkgs/development/compilers/aliceml/default.nix2
-rw-r--r--pkgs/development/compilers/ecl/default.nix4
-rw-r--r--pkgs/development/compilers/gcc/4.5/default.nix8
-rw-r--r--pkgs/development/compilers/gcc/4.6/default.nix8
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix8
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix8
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix8
-rw-r--r--pkgs/development/compilers/gcc/gfortran-darwin.nix4
-rw-r--r--pkgs/development/compilers/ghc/7.0.4-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/7.4.2-binary.nix2
-rw-r--r--pkgs/development/compilers/ghc/8.0.1.nix4
-rw-r--r--pkgs/development/compilers/hhvm/default.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.4/llvm.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.5/llvm.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.6/llvm.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.7/llvm.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.8/llvm.nix2
-rw-r--r--pkgs/development/compilers/mono/llvm.nix2
-rw-r--r--pkgs/development/compilers/opendylan/default.nix2
-rw-r--r--pkgs/development/compilers/urweb/default.nix2
-rw-r--r--pkgs/development/interpreters/erlang/R16.nix2
-rw-r--r--pkgs/development/interpreters/erlang/R17.nix2
-rw-r--r--pkgs/development/interpreters/erlang/R18.nix2
-rw-r--r--pkgs/development/interpreters/guile/default.nix4
-rw-r--r--pkgs/development/interpreters/love/0.7.nix2
-rw-r--r--pkgs/development/interpreters/love/0.8.nix2
-rw-r--r--pkgs/development/interpreters/php/default.nix20
-rw-r--r--pkgs/development/interpreters/pixie/default.nix2
-rw-r--r--pkgs/development/libraries/aalib/default.nix2
-rw-r--r--pkgs/development/libraries/apr-util/default.nix4
-rw-r--r--pkgs/development/libraries/coprthr/default.nix2
-rw-r--r--pkgs/development/libraries/cyrus-sasl/default.nix2
-rw-r--r--pkgs/development/libraries/gdal/default.nix8
-rw-r--r--pkgs/development/libraries/gdal/gdal-1_11.nix8
-rw-r--r--pkgs/development/libraries/ggz_base_libs/default.nix2
-rw-r--r--pkgs/development/libraries/gupnp/default.nix2
-rw-r--r--pkgs/development/libraries/kerberos/heimdal.nix6
-rw-r--r--pkgs/development/libraries/ldns/default.nix2
-rw-r--r--pkgs/development/libraries/libclxclient/default.nix2
-rw-r--r--pkgs/development/libraries/libksi/default.nix2
-rw-r--r--pkgs/development/libraries/opencascade/6.5.nix2
-rw-r--r--pkgs/development/libraries/opencascade/default.nix2
-rw-r--r--pkgs/development/libraries/postgis/default.nix2
-rw-r--r--pkgs/development/libraries/serf/default.nix4
-rw-r--r--pkgs/development/libraries/silgraphite/default.nix2
-rw-r--r--pkgs/development/libraries/slang/default.nix2
-rw-r--r--pkgs/development/libraries/swiften/default.nix2
-rw-r--r--pkgs/development/libraries/zeitgeist/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/camlzip/default.nix2
-rw-r--r--pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix2
-rw-r--r--pkgs/development/perl-modules/DBD-SQLite/default.nix2
-rw-r--r--pkgs/development/python-modules/tables/default.nix2
-rw-r--r--pkgs/development/r-modules/default.nix4
-rw-r--r--pkgs/development/ruby-modules/gem-config/default.nix2
-rw-r--r--pkgs/development/tools/misc/cscope/default.nix2
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix4
-rw-r--r--pkgs/development/tools/misc/global/default.nix4
-rw-r--r--pkgs/development/tools/misc/uhd/default.nix2
-rw-r--r--pkgs/development/tools/vagrant/default.nix2
-rw-r--r--pkgs/games/0ad/default.nix4
-rw-r--r--pkgs/games/crawl/crawl_purify.patch2
-rw-r--r--pkgs/games/crawl/default.nix2
-rw-r--r--pkgs/games/naev/default.nix2
-rw-r--r--pkgs/games/scorched3d/default.nix2
-rw-r--r--pkgs/games/warmux/default.nix2
-rw-r--r--pkgs/misc/drivers/hplip/3.15.9.nix2
-rw-r--r--pkgs/misc/drivers/hplip/default.nix2
-rw-r--r--pkgs/misc/emulators/dolphin-emu/default.nix2
-rw-r--r--pkgs/misc/emulators/dolphin-emu/master.nix2
-rw-r--r--pkgs/misc/emulators/pcsx2/default.nix2
-rw-r--r--pkgs/misc/emulators/wxmupen64plus/default.nix2
-rw-r--r--pkgs/misc/ghostscript/default.nix2
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix2
-rw-r--r--pkgs/os-specific/darwin/binutils/default.nix2
-rw-r--r--pkgs/os-specific/linux/ati-drivers/builder.sh2
-rw-r--r--pkgs/os-specific/linux/criu/default.nix2
-rw-r--r--pkgs/os-specific/linux/wpa_supplicant/default.nix2
-rw-r--r--pkgs/os-specific/linux/xf86-input-multitouch/default.nix4
-rw-r--r--pkgs/servers/computing/slurm/default.nix2
-rw-r--r--pkgs/servers/dns/bind/default.nix2
-rw-r--r--pkgs/servers/http/apache-httpd/2.2.nix6
-rw-r--r--pkgs/servers/http/apache-httpd/2.4.nix8
-rw-r--r--pkgs/servers/http/apache-modules/tomcat-connectors/default.nix2
-rw-r--r--pkgs/servers/http/nginx/modules.nix2
-rw-r--r--pkgs/servers/irc/charybdis/default.nix2
-rw-r--r--pkgs/servers/irc/ircd-hybrid/default.nix2
-rw-r--r--pkgs/servers/ldap/389/default.nix2
-rw-r--r--pkgs/servers/mail/opensmtpd/extras.nix2
-rw-r--r--pkgs/servers/mail/postfix/default.nix2
-rw-r--r--pkgs/servers/monitoring/net-snmp/default.nix2
-rw-r--r--pkgs/servers/monitoring/zabbix/2.2.nix4
-rw-r--r--pkgs/servers/openxpki/default.nix2
-rw-r--r--pkgs/servers/sql/mysql/5.1.x.nix2
-rw-r--r--pkgs/servers/sql/virtuoso/6.x.nix4
-rw-r--r--pkgs/servers/sql/virtuoso/7.x.nix4
-rw-r--r--pkgs/servers/xmpp/ejabberd/default.nix2
-rw-r--r--pkgs/tools/backup/attic/default.nix2
-rw-r--r--pkgs/tools/backup/bacula/default.nix2
-rw-r--r--pkgs/tools/backup/bareos/default.nix8
-rw-r--r--pkgs/tools/backup/borg/default.nix2
-rw-r--r--pkgs/tools/backup/partimage/default.nix2
-rw-r--r--pkgs/tools/filesystems/netatalk/default.nix2
-rw-r--r--pkgs/tools/filesystems/xtreemfs/default.nix2
-rw-r--r--pkgs/tools/graphics/asymptote/default.nix2
-rw-r--r--pkgs/tools/graphics/graphviz/2.0.nix6
-rw-r--r--pkgs/tools/graphics/graphviz/2.32.nix6
-rw-r--r--pkgs/tools/graphics/netpbm/default.nix2
-rw-r--r--pkgs/tools/misc/heimdall/default.nix6
-rw-r--r--pkgs/tools/misc/kde-gtk-config/default.nix2
-rw-r--r--pkgs/tools/misc/most/default.nix2
-rw-r--r--pkgs/tools/misc/pk2cmd/default.nix2
-rw-r--r--pkgs/tools/misc/ttf2pt1/default.nix2
-rw-r--r--pkgs/tools/networking/curl/7.15.nix4
-rw-r--r--pkgs/tools/networking/curl/default.nix6
-rw-r--r--pkgs/tools/networking/keepalived/default.nix2
-rw-r--r--pkgs/tools/networking/mailsend/default.nix2
-rw-r--r--pkgs/tools/networking/sstp/default.nix2
-rw-r--r--pkgs/tools/networking/stunnel/default.nix2
-rw-r--r--pkgs/tools/networking/unbound/default.nix2
-rw-r--r--pkgs/tools/networking/uwimap/default.nix4
-rw-r--r--pkgs/tools/networking/vtun/default.nix4
-rw-r--r--pkgs/tools/security/clamav/default.nix12
-rw-r--r--pkgs/tools/security/duo-unix/default.nix2
-rw-r--r--pkgs/tools/security/modsecurity/default.nix10
-rw-r--r--pkgs/tools/system/monit/default.nix2
-rw-r--r--pkgs/tools/text/gawk/default.nix2
-rw-r--r--pkgs/tools/text/xml/xmlstarlet/default.nix2
-rw-r--r--pkgs/top-level/lua-packages.nix2
-rw-r--r--pkgs/top-level/perl-packages.nix16
-rw-r--r--pkgs/top-level/php-packages.nix6
-rw-r--r--pkgs/top-level/python-packages.nix22
196 files changed, 305 insertions, 303 deletions
diff --git a/pkgs/applications/display-managers/slim/default.nix b/pkgs/applications/display-managers/slim/default.nix
index c7710262988..fca84199e51 100644
--- a/pkgs/applications/display-managers/slim/default.nix
+++ b/pkgs/applications/display-managers/slim/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [ "-DUSE_PAM=1" ];
 
-  NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype -std=c++11";
+  NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype -std=c++11";
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/applications/editors/emacs-25/default.nix b/pkgs/applications/editors/emacs-25/default.nix
index 019015785e6..eaadd985be7 100644
--- a/pkgs/applications/editors/emacs-25/default.nix
+++ b/pkgs/applications/editors/emacs-25/default.nix
@@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
              "--with-gif=no" "--with-tiff=no" ];
 
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX)
-    "-I${cairo}/include/cairo";
+    "-I${cairo.dev}/include/cairo";
 
   preBuild = ''
     find . -name '*.elc' -delete
diff --git a/pkgs/applications/editors/texmaker/default.nix b/pkgs/applications/editors/texmaker/default.nix
index 83165f0a505..f4d9d4ccdd5 100644
--- a/pkgs/applications/editors/texmaker/default.nix
+++ b/pkgs/applications/editors/texmaker/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ qt4 poppler_qt4 zlib ];
   nativeBuildInputs = [ pkgconfig poppler qmake4Hook ];
-  NIX_CFLAGS_COMPILE="-I${poppler}/include/poppler";
+  NIX_CFLAGS_COMPILE="-I${poppler.dev}/include/poppler";
 
   preConfigure = ''
     qmakeFlags="$qmakeFlags DESKTOPDIR=$out/share/applications ICONDIR=$out/share/pixmaps"
diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index 453dc080995..f38e402ce92 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -71,7 +71,7 @@ let
     # Help digiKam find libusb, otherwise gphoto2 support is disabled
     cmakeFlags = [
       "-DLIBUSB_LIBRARIES=${libusb1.out}/lib"
-      "-DLIBUSB_INCLUDE_DIR=${libusb1}/include/libusb-1.0"
+      "-DLIBUSB_INCLUDE_DIR=${libusb1.dev}/include/libusb-1.0"
       "-DENABLE_BALOOSUPPORT=ON"
       "-DENABLE_KDEPIMLIBSSUPPORT=ON"
       "-DENABLE_LCMS2=ON" ] 
diff --git a/pkgs/applications/graphics/qtpfsgui/default.nix b/pkgs/applications/graphics/qtpfsgui/default.nix
index 5223ae14c63..befdf1b4e7c 100644
--- a/pkgs/applications/graphics/qtpfsgui/default.nix
+++ b/pkgs/applications/graphics/qtpfsgui/default.nix
@@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
   qmakeFlags = [
     "EXIV2PATH=${exiv2}/include/exiv2"
     "OPENEXRDIR=${openexr}/include/OpenEXR"
-    "FFTW3DIR=${fftwSinglePrec}/include"
-    "LIBTIFFDIR=${libtiff}/include"
+    "FFTW3DIR=${fftwSinglePrec.dev}/include"
+    "LIBTIFFDIR=${libtiff.dev}/include"
   ];
 
   meta = {
diff --git a/pkgs/applications/graphics/shotwell/default.nix b/pkgs/applications/graphics/shotwell/default.nix
index 0cb8a082fc6..513b1a49198 100644
--- a/pkgs/applications/graphics/shotwell/default.nix
+++ b/pkgs/applications/graphics/shotwell/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     sha256 = "0cgqaaikrb10plhf6zxbgqy32zqpiwyi9dpx3g8yr261q72r5c81";
   };
 
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include";
 
   configureFlags = [ "--disable-gsettings-convert-install" ];
 
diff --git a/pkgs/applications/misc/apvlv/default.nix b/pkgs/applications/misc/apvlv/default.nix
index aa312f4c8a9..88e08b40914 100644
--- a/pkgs/applications/misc/apvlv/default.nix
+++ b/pkgs/applications/misc/apvlv/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   preConfigure = ''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${poppler}/include/poppler"
+    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${poppler.dev}/include/poppler"
   '';
 
   buildInputs = [
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 3b8ab7f07f3..46f4e8635a9 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
 
   installPhase = ''
     export HOME=$TMPDIR/fakehome
-    export POPPLER_INC_DIR=${poppler_utils}/include/poppler
+    export POPPLER_INC_DIR=${poppler_utils.dev}/include/poppler
     export POPPLER_LIB_DIR=${poppler_utils.out}/lib
     export MAGICK_INC=${imagemagick}/include/ImageMagick
     export MAGICK_LIB=${imagemagick}/lib
diff --git a/pkgs/applications/misc/diffpdf/default.nix b/pkgs/applications/misc/diffpdf/default.nix
index 666c3a40cdc..fd3d0b35729 100644
--- a/pkgs/applications/misc/diffpdf/default.nix
+++ b/pkgs/applications/misc/diffpdf/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ qmake4Hook ];
 
   preConfigure = ''
-    substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4}
+    substituteInPlace diffpdf.pro --replace @@NIX_POPPLER_QT4@@ ${poppler_qt4.dev}
     lrelease diffpdf.pro
   '';
 
diff --git a/pkgs/applications/misc/fetchmail/default.nix b/pkgs/applications/misc/fetchmail/default.nix
index 2c9aaeda98f..4cec2ca41b6 100644
--- a/pkgs/applications/misc/fetchmail/default.nix
+++ b/pkgs/applications/misc/fetchmail/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
 
   buildInputs = [ openssl ];
 
-  configureFlags = "--with-ssl=${openssl}";
+  configureFlags = "--with-ssl=${openssl.dev}";
 
   meta = {
     homepage = "http://www.fetchmail.info/";
diff --git a/pkgs/applications/misc/garmin-plugin/default.nix b/pkgs/applications/misc/garmin-plugin/default.nix
index 613c56efcfd..e2c9bf49459 100644
--- a/pkgs/applications/misc/garmin-plugin/default.nix
+++ b/pkgs/applications/misc/garmin-plugin/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
   sourceRoot = "GarminPlugin-0.3.26/src";
   buildInputs = [ garmintools libusb libgcrypt pkgconfig tinyxml zlib ];
   configureFlags = [
-    "--with-libgcrypt-prefix=${libgcrypt}"
+    "--with-libgcrypt-prefix=${libgcrypt.dev}"
     "--with-garmintools-incdir=${garmintools}/include"
     "--with-garmintools-libdir=${garmintools}/lib"
   ];
diff --git a/pkgs/applications/misc/gkrellm/default.nix b/pkgs/applications/misc/gkrellm/default.nix
index 934a7c69c99..ac8f876ad3f 100644
--- a/pkgs/applications/misc/gkrellm/default.nix
+++ b/pkgs/applications/misc/gkrellm/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
      echo "patching makefiles..."
      for i in Makefile src/Makefile server/Makefile
      do
-       sed -i "$i" -e "s|/usr/X11R6|${libX11}|g ; s|-lICE|-lX11 -lICE|g"
+       sed -i "$i" -e "s|/usr/X11R6|${libX11.dev}|g ; s|-lICE|-lX11 -lICE|g"
      done '';
 
   buildPhase = ''
diff --git a/pkgs/applications/misc/mrxvt/default.nix b/pkgs/applications/misc/mrxvt/default.nix
index b11b234eb43..e8bf2f7a14c 100644
--- a/pkgs/applications/misc/mrxvt/default.nix
+++ b/pkgs/applications/misc/mrxvt/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
   ];
 
   preConfigure = ''
-    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2";
+    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype.dev}/include/freetype2";
   '';
 
   src = fetchurl {
diff --git a/pkgs/applications/misc/pinfo/default.nix b/pkgs/applications/misc/pinfo/default.nix
index 222dddc0e89..9753e6d4475 100644
--- a/pkgs/applications/misc/pinfo/default.nix
+++ b/pkgs/applications/misc/pinfo/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
 
   buildInputs = [ autoreconfHook gettext texinfo ncurses readline ];
 
-  configureFlags = [ "--with-curses=${ncurses.dev}" "--with-readline=${readline}" ];
+  configureFlags = [ "--with-curses=${ncurses.dev}" "--with-readline=${readline.dev}" ];
 
   meta = with stdenv.lib; {
     description = "A viewer for info files";
diff --git a/pkgs/applications/misc/rxvt_unicode/default.nix b/pkgs/applications/misc/rxvt_unicode/default.nix
index 5d1eda5ec06..8fbe021cc8f 100644
--- a/pkgs/applications/misc/rxvt_unicode/default.nix
+++ b/pkgs/applications/misc/rxvt_unicode/default.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation (rec {
       mkdir -p $terminfo/share/terminfo
       configureFlags="--with-terminfo=$terminfo/share/terminfo --enable-256-color ${if perlSupport then "--enable-perl" else "--disable-perl"} ${if unicode3Support then "--enable-unicode3" else "--disable-unicode3"}";
       export TERMINFO=$terminfo/share/terminfo # without this the terminfo won't be compiled by tic, see man tic
-      NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype}/include/freetype2"
+      NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${freetype.dev}/include/freetype2"
       NIX_LDFLAGS="$NIX_LDFLAGS -lfontconfig -lXrender "
     ''
     # make urxvt find its perl file lib/perl5/site_perl is added to PERL5LIB automatically
diff --git a/pkgs/applications/misc/xautoclick/default.nix b/pkgs/applications/misc/xautoclick/default.nix
index 49a94ac3979..611527153ee 100644
--- a/pkgs/applications/misc/xautoclick/default.nix
+++ b/pkgs/applications/misc/xautoclick/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optionals gtkSupport [ gtk ]
     ++ stdenv.lib.optionals qtSupport [ qt4 ];
   patchPhase = ''
-    substituteInPlace configure --replace /usr/X11R6 ${xorg.libX11}
+    substituteInPlace configure --replace /usr/X11R6 ${xorg.libX11.dev}
   '';
   preConfigure = stdenv.lib.optional qtSupport ''
     mkdir .bin
diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index 01c267cbbb4..0048cb73878 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ pkgconfig file gtk girara gettext makeWrapper sqlite glib ];
 
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
 
   makeFlags = [
     "PREFIX=$(out)"
diff --git a/pkgs/applications/networking/browsers/elinks/default.nix b/pkgs/applications/networking/browsers/elinks/default.nix
index 1a698b0effd..7a12b1247cf 100644
--- a/pkgs/applications/networking/browsers/elinks/default.nix
+++ b/pkgs/applications/networking/browsers/elinks/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
       --enable-finger --enable-html-highlight
       --with-perl --enable-gopher --enable-cgi --enable-bittorrent
       --with-spidermonkey=${spidermonkey}
-      --enable-nntp --with-openssl=${openssl}
+      --enable-nntp --with-openssl=${openssl.dev}
     '' + stdenv.lib.optionalString enableGuile " --with-guile"
     + stdenv.lib.optionalString enablePython " --with-python";
 
diff --git a/pkgs/applications/networking/browsers/lynx/default.nix b/pkgs/applications/networking/browsers/lynx/default.nix
index e7b5ba89db6..0d5d20b6579 100644
--- a/pkgs/applications/networking/browsers/lynx/default.nix
+++ b/pkgs/applications/networking/browsers/lynx/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   };
   
   configureFlags = []
-    ++ stdenv.lib.optionals sslSupport [ "--with-ssl=${openssl}" ];
+    ++ stdenv.lib.optionals sslSupport [ "--with-ssl=${openssl.dev}" ];
   
   buildInputs = [ ncurses gzip ];
   nativeBuildInputs = [ ncurses ];
diff --git a/pkgs/applications/networking/browsers/w3m/default.nix b/pkgs/applications/networking/browsers/w3m/default.nix
index 076b3faf11f..bc2c4ab8eee 100644
--- a/pkgs/applications/networking/browsers/w3m/default.nix
+++ b/pkgs/applications/networking/browsers/w3m/default.nix
@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
     ln -s $out/libexec/w3m/w3mimgdisplay $out/bin
   '';
 
-  configureFlags = "--with-ssl=${openssl} --with-gc=${boehmgc}"
+  configureFlags = "--with-ssl=${openssl.dev} --with-gc=${boehmgc.dev}"
     + optionalString graphicsSupport " --enable-image=${optionalString x11Support "x11,"}fb";
 
   preConfigure = ''
diff --git a/pkgs/applications/networking/cluster/mesos/default.nix b/pkgs/applications/networking/cluster/mesos/default.nix
index 7efd34dee56..89337901f97 100644
--- a/pkgs/applications/networking/cluster/mesos/default.nix
+++ b/pkgs/applications/networking/cluster/mesos/default.nix
@@ -71,7 +71,7 @@ in stdenv.mkDerivation rec {
   '' + lib.optionalString stdenv.isLinux ''
 
     substituteInPlace configure.ac             \
-      --replace /usr/include/libnl3 ${libnl}/include/libnl3
+      --replace /usr/include/libnl3 ${libnl.dev}/include/libnl3
 
     substituteInPlace src/linux/perf.cpp       \
       --replace '"perf ' '"${perf}/bin/perf '
@@ -94,17 +94,17 @@ in stdenv.mkDerivation rec {
 
   configureFlags = [
     "--sbindir=\${out}/bin"
-    "--with-apr=${apr}"
-    "--with-svn=${subversion}"
+    "--with-apr=${apr.dev}"
+    "--with-svn=${subversion.dev}"
     "--with-leveldb=${leveldb}"
     "--with-glog=${glog}"
     "--with-glog=${glog}"
     "--enable-optimize"
     "--disable-python-dependency-install"
     "--enable-ssl"
-    "--with-ssl=${openssl}"
+    "--with-ssl=${openssl.dev}"
     "--enable-libevent"
-    "--with-libevent=${libevent}"
+    "--with-libevent=${libevent.dev}"
   ] ++ lib.optionals stdenv.isLinux [
     "--with-network-isolator"
   ];
diff --git a/pkgs/applications/networking/instant-messengers/centerim/default.nix b/pkgs/applications/networking/instant-messengers/centerim/default.nix
index 54e2d813be8..d6921e1082b 100644
--- a/pkgs/applications/networking/instant-messengers/centerim/default.nix
+++ b/pkgs/applications/networking/instant-messengers/centerim/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ openssl curl ncurses libjpeg ]
     ++ stdenv.lib.optional withGpg gpgme;
 
-  configureFlags = [ "--with-openssl=${openssl}" ];
+  configureFlags = [ "--with-openssl=${openssl.dev}" ];
 
   meta = {
     homepage = http://www.centerim.org/;
diff --git a/pkgs/applications/networking/instant-messengers/ekiga/default.nix b/pkgs/applications/networking/instant-messengers/ekiga/default.nix
index da6bf44ced1..9c7204b7fa1 100644
--- a/pkgs/applications/networking/instant-messengers/ekiga/default.nix
+++ b/pkgs/applications/networking/instant-messengers/ekiga/default.nix
@@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags = [
-    "--with-ldap-dir=${openldap}"
-    "--with-libsasl2-dir=${cyrus_sasl}"
+    "--with-ldap-dir=${openldap.dev}"
+    "--with-libsasl2-dir=${cyrus_sasl.dev}"
     "--with-boost-libdir=${boost.out}/lib"
     "--disable-gconf"
   ];
diff --git a/pkgs/applications/networking/instant-messengers/linphone/default.nix b/pkgs/applications/networking/instant-messengers/linphone/default.nix
index c894a49c20e..781d10cbc4f 100644
--- a/pkgs/applications/networking/instant-messengers/linphone/default.nix
+++ b/pkgs/applications/networking/instant-messengers/linphone/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--enable-ldap"
-    "--with-ffmpeg=${ffmpeg}"
+    "--with-ffmpeg=${ffmpeg.dev}"
     "--with-polarssl=${polarssl}"
     "--enable-lime"
     "--enable-external-ortp"
diff --git a/pkgs/applications/networking/instant-messengers/mcabber/default.nix b/pkgs/applications/networking/instant-messengers/mcabber/default.nix
index f32bdf96257..df1d0ee5e78 100644
--- a/pkgs/applications/networking/instant-messengers/mcabber/default.nix
+++ b/pkgs/applications/networking/instant-messengers/mcabber/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ openssl ncurses pkgconfig glib loudmouth libotr gpgme ];
 
-  configureFlags = "--with-openssl=${openssl} --enable-modules --enable-otr";
+  configureFlags = "--with-openssl=${openssl.dev} --enable-modules --enable-otr";
 
   doCheck = true;
   
diff --git a/pkgs/applications/networking/instant-messengers/silc-client/default.nix b/pkgs/applications/networking/instant-messengers/silc-client/default.nix
index 133a15aebf8..1454760f541 100644
--- a/pkgs/applications/networking/instant-messengers/silc-client/default.nix
+++ b/pkgs/applications/networking/instant-messengers/silc-client/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation {
 
   dontDisableStatic = true;
 
-  configureFlags = "--with-ncurses=${ncurses}";
+  configureFlags = "--with-ncurses=${ncurses.dev}";
 
   preConfigure = stdenv.lib.optionalString enablePlugin ''
     configureFlags="$configureFlags --with-silc-plugin=$out/lib/irssi"
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index 37c0fd6a175..a87f89fc964 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -46,14 +46,14 @@ in stdenv.mkDerivation rec {
     "CONFIG+=release"
     "DEFINES+=TDESKTOP_DISABLE_AUTOUPDATE"
     "DEFINES+=TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
-    "INCLUDEPATH+=${gtk2}/include/gtk-2.0"
-    "INCLUDEPATH+=${glib}/include/glib-2.0"
+    "INCLUDEPATH+=${gtk2.dev}/include/gtk-2.0"
+    "INCLUDEPATH+=${glib.dev}/include/glib-2.0"
     "INCLUDEPATH+=${glib.out}/lib/glib-2.0/include"
-    "INCLUDEPATH+=${cairo}/include/cairo"
-    "INCLUDEPATH+=${pango}/include/pango-1.0"
+    "INCLUDEPATH+=${cairo.dev}/include/cairo"
+    "INCLUDEPATH+=${pango.dev}/include/pango-1.0"
     "INCLUDEPATH+=${gtk2.out}/lib/gtk-2.0/include"
-    "INCLUDEPATH+=${gdk_pixbuf}/include/gdk-pixbuf-2.0"
-    "INCLUDEPATH+=${atk}/include/atk-1.0"
+    "INCLUDEPATH+=${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0"
+    "INCLUDEPATH+=${atk.dev}/include/atk-1.0"
     "INCLUDEPATH+=${libappindicator-gtk2}/include/libappindicator-0.1"
     "INCLUDEPATH+=${libunity}/include/unity"
     "INCLUDEPATH+=${dee}/include/dee-1.0"
diff --git a/pkgs/applications/networking/instant-messengers/twinkle/default.nix b/pkgs/applications/networking/instant-messengers/twinkle/default.nix
index b096023eaa4..90528b35140 100644
--- a/pkgs/applications/networking/instant-messengers/twinkle/default.nix
+++ b/pkgs/applications/networking/instant-messengers/twinkle/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     ./boost_regex.patch # modified not to use "-mt" suffix
   ];
 
-  configureFlags = "--with-extra-includes=${libjpeg}/include";
+  configureFlags = "--with-extra-includes=${libjpeg.dev}/include";
 
   buildInputs =
     [ pkgconfig autoreconfHook commoncpp2 openssl boost libsndfile
diff --git a/pkgs/applications/networking/irc/wraith/default.nix b/pkgs/applications/networking/irc/wraith/default.nix
index f36bbc00064..4484178a6d5 100644
--- a/pkgs/applications/networking/irc/wraith/default.nix
+++ b/pkgs/applications/networking/irc/wraith/default.nix
@@ -16,7 +16,7 @@ mkDerivation rec {
     substituteInPlace src/libssl.cc    --subst-var-by openssl ${openssl}
     substituteInPlace src/libcrypto.cc --subst-var-by openssl ${openssl}
   '';
-  configureFlags = "--with-openssl=${openssl}";
+  configureFlags = "--with-openssl=${openssl.dev}";
   installPhase = ''
     mkdir -p $out/bin
     cp -a wraith $out/bin/wraith
diff --git a/pkgs/applications/networking/mailreaders/alpine/default.nix b/pkgs/applications/networking/mailreaders/alpine/default.nix
index 03c2c21aed0..8e5e8d5a0de 100644
--- a/pkgs/applications/networking/mailreaders/alpine/default.nix
+++ b/pkgs/applications/networking/mailreaders/alpine/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     inherit (s) url sha256;
   };
   configureFlags = [
-    "--with-ssl-include-dir=${openssl}/include/openssl"
+    "--with-ssl-include-dir=${openssl.dev}/include/openssl"
     "--with-tcl-lib=${tcl.libPrefix}"
     ];
   preConfigure = ''
diff --git a/pkgs/applications/networking/mailreaders/realpine/default.nix b/pkgs/applications/networking/mailreaders/realpine/default.nix
index c1835992158..2247398ef78 100644
--- a/pkgs/applications/networking/mailreaders/realpine/default.nix
+++ b/pkgs/applications/networking/mailreaders/realpine/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
     inherit (s) url sha256;
   };
   configureFlags = [
-    "--with-ssl-include-dir=${openssl}/include/openssl"
+    "--with-ssl-include-dir=${openssl.dev}/include/openssl"
     "--with-tcl-lib=${tcl.libPrefix}"
     ];
   preConfigure = ''
diff --git a/pkgs/applications/networking/newsreaders/slrn/default.nix b/pkgs/applications/networking/newsreaders/slrn/default.nix
index dcfadbfa05f..f29493beb00 100644
--- a/pkgs/applications/networking/newsreaders/slrn/default.nix
+++ b/pkgs/applications/networking/newsreaders/slrn/default.nix
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
       -e "s|/bin/rm|rm|"
   '';
 
-  configureFlags = "--with-slang=${slang} --with-ssl=${openssl}";
+  configureFlags = "--with-slang=${slang.dev} --with-ssl=${openssl.dev}";
 
   buildInputs = [ slang ncurses openssl ];
 
diff --git a/pkgs/applications/networking/remote/rdesktop/default.nix b/pkgs/applications/networking/remote/rdesktop/default.nix
index 2e844fdeab4..dd9ca18cb1d 100644
--- a/pkgs/applications/networking/remote/rdesktop/default.nix
+++ b/pkgs/applications/networking/remote/rdesktop/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation (rec {
   buildInputs = [openssl libX11];
 
   configureFlags = [
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
     "--disable-credssp"
     "--disable-smartcard"
   ];
diff --git a/pkgs/applications/science/astronomy/celestia/default.nix b/pkgs/applications/science/astronomy/celestia/default.nix
index 971c19e9c3d..d28aa8e62a1 100644
--- a/pkgs/applications/science/astronomy/celestia/default.nix
+++ b/pkgs/applications/science/astronomy/celestia/default.nix
@@ -59,7 +59,7 @@ stdenv.mkDerivation {
   CPPFLAGS = "-DNDEBUG";
   CFLAGS = "-O2 -fsigned-char";
   CXXFLAGS = "-O2 -fsigned-char";
-  GTK_CFLAGS = "-I${gtk2.dev}/include/gtk-2.0 -I${gtk2.out}/lib/gtk-2.0/include -I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include -I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0 -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0 -I${atk}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include";
+  GTK_CFLAGS = "-I${gtk2.dev}/include/gtk-2.0 -I${gtk2.out}/lib/gtk-2.0/include -I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include -I${cairo.dev}/include/cairo -I${pango.dev}/include/pango-1.0 -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0 -I${atk.dev}/include/atk-1.0 -I${gtkglext}/include/gtkglext-1.0 -I${gtkglext}/lib/gtkglext-1.0/include";
   GTK_LIBS = "-lgtk-x11-2.0 -lgtkglext-x11-1.0 -lcairo -lgdk_pixbuf-2.0 -lpango-1.0 -lgobject-2.0";
 
   installPhase = ''make MKDIR_P="mkdir -p" install'';
diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix
index be273bca0e2..da10e89855a 100644
--- a/pkgs/applications/science/math/pari/default.nix
+++ b/pkgs/applications/science/math/pari/default.nix
@@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
 
   configureScript = "./Configure";
   configureFlags =
-    "--with-gmp=${gmp} " +
-    "--with-readline=${readline}";
+    "--with-gmp=${gmp.dev} " +
+    "--with-readline=${readline.dev}";
 
   meta = with stdenv.lib; {
     description = "Computer algebra system for high-performance number theory computations";
diff --git a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix
index e8f9078a839..076d5d5dfe0 100644
--- a/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/svn2git-kde/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "818673fe751b00a42b6ed3e78a783549fb09b5245a01dee47b3dded667bfc582";
   };
 
-  NIX_CFLAGS_COMPILE = [ "-I${apr}/include/apr-1" "-I${subversion.dev}/include/subversion-1" "-DVER=\"${src.rev}\"" ];
+  NIX_CFLAGS_COMPILE = [ "-I${apr.dev}/include/apr-1" "-I${subversion.dev}/include/subversion-1" "-DVER=\"${src.rev}\"" ];
 
   patchPhase = ''
     sed -i 's|/bin/cat|cat|' ./src/repository.cpp
diff --git a/pkgs/applications/version-management/kdesvn/default.nix b/pkgs/applications/version-management/kdesvn/default.nix
index b94978bb488..a3301d8acff 100644
--- a/pkgs/applications/version-management/kdesvn/default.nix
+++ b/pkgs/applications/version-management/kdesvn/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   };
 
   prePatch = ''
-    sed -i -e "s|/usr|${subversion}|g" src/svnqt/cmakemodules/FindSubversion.cmake
+    sed -i -e "s|/usr|${subversion.dev}|g" src/svnqt/cmakemodules/FindSubversion.cmake
   '';
 
   buildInputs = [ apr aprutil subversion db kdelibs expat ];
diff --git a/pkgs/applications/version-management/redmine/default.nix b/pkgs/applications/version-management/redmine/default.nix
index 3a8df10f166..7590ae743a3 100644
--- a/pkgs/applications/version-management/redmine/default.nix
+++ b/pkgs/applications/version-management/redmine/default.nix
@@ -45,7 +45,7 @@ in stdenv.mkDerivation rec {
     mkdir -p vendor/cache
     ${stdenv.lib.concatStrings (map (gem: "ln -s ${gem} vendor/cache/${gem.name};") gemspec)}
 
-    bundle config build.nokogiri --use-system-libraries --with-iconv-dir="${libiconv}" --with-xslt-dir="${libxslt}" --with-xml2-dir="${libxml2}"
+    bundle config build.nokogiri --use-system-libraries --with-iconv-dir="${libiconv}" --with-xslt-dir="${libxslt.dev}" --with-xml2-dir="${libxml2}"
 
     bundle install --verbose --local --deployment
 
diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix
index c0131ef9620..0a5b2c0d74b 100644
--- a/pkgs/applications/version-management/subversion/default.nix
+++ b/pkgs/applications/version-management/subversion/default.nix
@@ -39,14 +39,14 @@ let
 
     configureFlags = ''
       ${if bdbSupport then "--with-berkeley-db" else "--without-berkeley-db"}
-      ${if httpServer then "--with-apxs=${apacheHttpd}/bin/apxs" else "--without-apxs"}
+      ${if httpServer then "--with-apxs=${apacheHttpd.dev}/bin/apxs" else "--without-apxs"}
       ${if pythonBindings || perlBindings then "--with-swig=${swig}" else "--without-swig"}
       ${if javahlBindings then "--enable-javahl --with-jdk=${jdk}" else ""}
       --disable-keychain
       ${if saslSupport then "--with-sasl=${sasl}" else "--without-sasl"}
       ${if httpSupport then "--with-serf=${serf}" else "--without-serf"}
-      --with-zlib=${zlib}
-      --with-sqlite=${sqlite}
+      --with-zlib=${zlib.dev}
+      --with-sqlite=${sqlite.dev}
     '';
 
     preBuild = ''
diff --git a/pkgs/applications/video/xine-ui/default.nix b/pkgs/applications/video/xine-ui/default.nix
index fd7b31de16e..f8a35734534 100644
--- a/pkgs/applications/video/xine-ui/default.nix
+++ b/pkgs/applications/video/xine-ui/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
 
   patchPhase = ''sed -e '/curl\/types\.h/d' -i src/xitk/download.c'';
 
-  configureFlags = "--with-readline=${readline}";
+  configureFlags = "--with-readline=${readline.dev}";
   
   LIRC_CFLAGS="-I${lirc}/include";
   LIRC_LIBS="-L ${lirc}/lib -llirc_client";
diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix
index e31ed7e509c..9e04cdf3825 100644
--- a/pkgs/applications/virtualization/virt-manager/default.nix
+++ b/pkgs/applications/virtualization/virt-manager/default.nix
@@ -39,7 +39,7 @@ buildPythonApplication rec {
   '';
 
   postInstall = ''
-    ${glib}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas
+    ${glib.dev}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas
   '';
 
   # Failed tests
diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix
index a5decf21360..cdd406c42c9 100644
--- a/pkgs/applications/virtualization/virtualbox/default.nix
+++ b/pkgs/applications/virtualization/virtualbox/default.nix
@@ -133,7 +133,7 @@ in stdenv.mkDerivation {
       ${optionalString (!pulseSupport) "--disable-pulse"} \
       ${optionalString (!enableHardening) "--disable-hardening"} \
       --disable-kmods --with-mkisofs=${xorriso}/bin/xorrisofs
-    sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${libIDL}/lib/pkgconfig:${glib}/lib/pkgconfig ${libIDL}/bin/libIDL-config-2@' \
+    sed -e 's@PKG_CONFIG_PATH=.*@PKG_CONFIG_PATH=${libIDL}/lib/pkgconfig:${glib.dev}/lib/pkgconfig ${libIDL}/bin/libIDL-config-2@' \
         -i AutoConfig.kmk
     sed -e 's@arch/x86/@@' \
         -i Config.kmk
diff --git a/pkgs/data/icons/tango-icon-theme/default.nix b/pkgs/data/icons/tango-icon-theme/default.nix
index b9dfeb76f99..55be87c9ab7 100644
--- a/pkgs/data/icons/tango-icon-theme/default.nix
+++ b/pkgs/data/icons/tango-icon-theme/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = "--enable-png-creation";
 
-  postInstall = '''${gtk}/bin/gtk-update-icon-cache' "$out/share/icons/Tango" '';
+  postInstall = '''${gtk.dev}/bin/gtk-update-icon-cache' "$out/share/icons/Tango" '';
 
   meta = {
     description = "A basic set of icons";
diff --git a/pkgs/desktops/enlightenment/elementary.nix b/pkgs/desktops/enlightenment/elementary.nix
index ffb0d70920e..bf74a6c8b52 100644
--- a/pkgs/desktops/enlightenment/elementary.nix
+++ b/pkgs/desktops/enlightenment/elementary.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
     sha256 = "0avb0d6nk4d88l81c2j6py13vdfnvg080ycw2y3qvawyjf1mhska";
   };
   buildInputs = [ pkgconfig efl libdrm gdbm automake autoconf ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];
-  NIX_CFLAGS_COMPILE = [ "-I${libdrm}/include/libdrm" ];
+  NIX_CFLAGS_COMPILE = [ "-I${libdrm.dev}/include/libdrm" ];
   patches = [ ./elementary.patch ];
   enableParallelBuilding = true;
   meta = {
diff --git a/pkgs/desktops/gnome-3/3.18/apps/cheese/default.nix b/pkgs/desktops/gnome-3/3.18/apps/cheese/default.nix
index db50656cf37..b5f70d84e52 100644
--- a/pkgs/desktops/gnome-3/3.18/apps/cheese/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/apps/cheese/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
 
   meta = with stdenv.lib; {
     homepage = https://wiki.gnome.org/Apps/Cheese;
diff --git a/pkgs/desktops/gnome-3/3.18/apps/gnome-calendar/default.nix b/pkgs/desktops/gnome-3/3.18/apps/gnome-calendar/default.nix
index cbd5a84bdb5..5fe6583660c 100644
--- a/pkgs/desktops/gnome-3/3.18/apps/gnome-calendar/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/apps/gnome-calendar/default.nix
@@ -5,7 +5,7 @@
 stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   buildInputs = [
     pkgconfig gtk3 wrapGAppsHook intltool evolution_data_server
diff --git a/pkgs/desktops/gnome-3/3.18/apps/gnome-documents/default.nix b/pkgs/desktops/gnome-3/3.18/apps/gnome-documents/default.nix
index 7f1f70114b7..5daa7277f7b 100644
--- a/pkgs/desktops/gnome-3/3.18/apps/gnome-documents/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/apps/gnome-documents/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   preFixup = ''
-    substituteInPlace $out/bin/gnome-documents --replace gapplication "${glib}/bin/gapplication"
+    substituteInPlace $out/bin/gnome-documents --replace gapplication "${glib.dev}/bin/gapplication"
 
     gappsWrapperArgs+=(--run 'if [ -z "$XDG_CACHE_DIR" ]; then XDG_CACHE_DIR=$HOME/.cache; fi; if [ -w "$XDG_CACHE_DIR/.." ]; then mkdir -p "$XDG_CACHE_DIR/gnome-documents"; fi')
   '';
diff --git a/pkgs/desktops/gnome-3/3.18/apps/gnome-photos/default.nix b/pkgs/desktops/gnome-3/3.18/apps/gnome-photos/default.nix
index eaace044af0..0ba1df2f5a5 100644
--- a/pkgs/desktops/gnome-3/3.18/apps/gnome-photos/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/apps/gnome-photos/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
 
   # doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   buildInputs = [ pkgconfig gtk3 glib intltool itstool gegl babl gnome3.libgdata
                   gnome3.gsettings_desktop_schemas makeWrapper gmp libmediaart
diff --git a/pkgs/desktops/gnome-3/3.18/apps/seahorse/default.nix b/pkgs/desktops/gnome-3/3.18/apps/seahorse/default.nix
index 3b78babadd9..49c48a6b962 100644
--- a/pkgs/desktops/gnome-3/3.18/apps/seahorse/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/apps/seahorse/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   buildInputs = [ pkgconfig gtk3 glib intltool itstool gnome3.gcr
                   gnome3.gsettings_desktop_schemas makeWrapper gnupg
diff --git a/pkgs/desktops/gnome-3/3.18/core/baobab/default.nix b/pkgs/desktops/gnome-3/3.18/core/baobab/default.nix
index 2ff85662bbb..874c7280949 100644
--- a/pkgs/desktops/gnome-3/3.18/core/baobab/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/baobab/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
 
diff --git a/pkgs/desktops/gnome-3/3.18/core/evince/default.nix b/pkgs/desktops/gnome-3/3.18/core/evince/default.nix
index d0857a1d32a..7629e5b5655 100644
--- a/pkgs/desktops/gnome-3/3.18/core/evince/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/evince/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     (if supportXPS then "--enable-xps" else "--disable-xps")
   ];
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   preConfigure = with stdenv.lib;
     optionalString doCheck ''
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-calculator/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-calculator/default.nix
index fef820010af..b2135535de1 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-calculator/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-calculator/default.nix
@@ -5,7 +5,7 @@
 stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
 
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-desktop/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-desktop/default.nix
index bf0ccd0224e..7265f09731f 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-desktop/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-desktop/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
 
   # this should probably be setuphook for glib
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix
index 51e3f6ab313..c94c178558d 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-dictionary/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
   propagatedBuildInputs = [ gdk_pixbuf gnome3.defaultIconTheme librsvg ];
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-disk-utility/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-disk-utility/default.nix
index 3f9f653bdba..c329d68674a 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-disk-utility/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-disk-utility/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
 
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-font-viewer/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-font-viewer/default.nix
index 54767dbc4c5..d0ec2307a85 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-font-viewer/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-font-viewer/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
 
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix
index 15d93793088..29ebe8b0ca6 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-screenshot/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
   propagatedBuildInputs = [ gdk_pixbuf gnome3.defaultIconTheme librsvg ];
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-settings-daemon/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-settings-daemon/default.nix
index 99e1f596f18..2a93328d8ca 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-settings-daemon/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-settings-daemon/default.nix
@@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
 
   # fatal error: gio/gunixfdlist.h: No such file or directory
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
 
   buildInputs = with gnome3;
     [ intltool pkgconfig ibus gtk glib gsettings_desktop_schemas networkmanager
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix
index 6b7b28ad400..50ee229cfa4 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-system-log/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
   propagatedBuildInputs = [ gdk_pixbuf gnome3.defaultIconTheme librsvg ];
diff --git a/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix b/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix
index e8f64983506..b1fb1eaf3dd 100644
--- a/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/gnome-user-share/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   preConfigure = ''
     sed -e 's,^LoadModule dnssd_module.\+,LoadModule dnssd_module ${mod_dnssd}/modules/mod_dnssd.so,' -i data/dav_user_2.2.conf 
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   postInstall = ''
     mkdir -p $out/share/gsettings-schemas/$name
     mv $out/share/glib-2.0 $out/share/gsettings-schemas/$name
-    ${glib}/bin/glib-compile-schemas $out/share/gsettings-schemas/$name/glib-2.0/schemas
+    ${glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/$name/glib-2.0/schemas
   '';
 
   preFixup = ''
diff --git a/pkgs/desktops/gnome-3/3.18/core/libgdata/default.nix b/pkgs/desktops/gnome-3/3.18/core/libgdata/default.nix
index bedbbee2dfe..8e934e211f8 100644
--- a/pkgs/desktops/gnome-3/3.18/core/libgdata/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/libgdata/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   # TODO: need libuhttpmock
   configureFlags = "--disable-tests";
   
-  NIX_CFLAGS_COMPILE = "-I${gnome3.libsoup}/include/libsoup-gnome-2.4/ -I${gnome3.gcr}/include/gcr-3 -I${gnome3.gcr}/include/gck-1";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.libsoup.dev}/include/libsoup-gnome-2.4/ -I${gnome3.gcr}/include/gcr-3 -I${gnome3.gcr}/include/gck-1";
 
   buildInputs = with gnome3;
     [ pkgconfig libsoup intltool libxml2 glib gobjectIntrospection 
diff --git a/pkgs/desktops/gnome-3/3.18/core/mutter/default.nix b/pkgs/desktops/gnome-3/3.18/core/mutter/default.nix
index dd08a96cc23..a128990b402 100644
--- a/pkgs/desktops/gnome-3/3.18/core/mutter/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/mutter/default.nix
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
   inherit (import ./src.nix fetchurl) name src;
 
   # fatal error: gio/gunixfdlist.h: No such file or directory
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   configureFlags = "--with-x --disable-static --enable-shape --enable-sm --enable-startup-notification --enable-xsync --enable-verbose-mode --with-libcanberra"; 
 
diff --git a/pkgs/desktops/gnome-3/3.18/core/totem/default.nix b/pkgs/desktops/gnome-3/3.18/core/totem/default.nix
index cc35ede88f3..5ffdbc68cb7 100644
--- a/pkgs/desktops/gnome-3/3.18/core/totem/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/core/totem/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${gnome3.glib.dev}/include/gio-unix-2.0";
 
   propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ];
 
diff --git a/pkgs/desktops/gnome-3/3.18/misc/pidgin/default.nix b/pkgs/desktops/gnome-3/3.18/misc/pidgin/default.nix
index a2d8d146579..64f7920d9af 100644
--- a/pkgs/desktops/gnome-3/3.18/misc/pidgin/default.nix
+++ b/pkgs/desktops/gnome-3/3.18/misc/pidgin/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
     schemas_dir="$share_dir/gsettings-schemas/${name}/glib-2.0/schemas"
     mkdir -p "$schemas_dir"
     mv schemas/* "$schemas_dir" # fix Emacs syntax highlighting: */
-    ${glib}/bin/glib-compile-schemas "$schemas_dir"
+    ${glib.dev}/bin/glib-compile-schemas "$schemas_dir"
 
     locale_dir="$share_dir/locale"
     mkdir -p "$locale_dir"
diff --git a/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix b/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix
index 58c2325f5c4..e3d9176b816 100644
--- a/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix
+++ b/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix
@@ -34,7 +34,7 @@ plasmaPackage rec {
     })
     ./0003-tzdir.patch
   ];
-  NIX_CFLAGS_COMPILE = [ "-I${xorgserver}/include/xorg" ];
+  NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ];
   cmakeFlags = [
     "-DEvdev_INCLUDE_DIRS=${xf86inputevdev}/include/xorg"
     "-DSynaptics_INCLUDE_DIRS=${xf86inputsynaptics}/include/xorg"
diff --git a/pkgs/development/compilers/aliceml/default.nix b/pkgs/development/compilers/aliceml/default.nix
index 6fbc1a350f5..01a8a337fc0 100644
--- a/pkgs/development/compilers/aliceml/default.nix
+++ b/pkgs/development/compilers/aliceml/default.nix
@@ -39,7 +39,7 @@ stdenv.mkDerivation {
   '';
 
   buildPhase = ''
-    gmp="${gmp}" zlib="${zlib}" PATH=$PATH:`pwd`/seam-support/install/bin make -C make all PREFIX="$out"
+    gmp="${gmp.dev}" zlib="${zlib.dev}" PATH=$PATH:`pwd`/seam-support/install/bin make -C make all PREFIX="$out"
   '';
 
   meta = {
diff --git a/pkgs/development/compilers/ecl/default.nix b/pkgs/development/compilers/ecl/default.nix
index ee7dffdf065..d4bfc93df93 100644
--- a/pkgs/development/compilers/ecl/default.nix
+++ b/pkgs/development/compilers/ecl/default.nix
@@ -28,8 +28,8 @@ stdenv.mkDerivation {
   };
   configureFlags = [
     "--enable-threads"
-    "--with-gmp-prefix=${gmp}"
-    "--with-libffi-prefix=${libffi}"
+    "--with-gmp-prefix=${gmp.dev}"
+    "--with-libffi-prefix=${libffi.dev}"
     ]
     ++
     (stdenv.lib.optional (! noUnicode)
diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix
index 6cde7aba92a..b1eedf7707d 100644
--- a/pkgs/development/compilers/gcc/4.5/default.nix
+++ b/pkgs/development/compilers/gcc/4.5/default.nix
@@ -165,7 +165,7 @@ stdenv.mkDerivation ({
           ++ stdenv.lib.optional (libpthread != null) libpthread;
         extraCPPSpec =
           concatStrings (intersperse " "
-                          (map (x: "-I${x}/include") extraCPPDeps));
+                          (map (x: "-I${x.dev or x}/include") extraCPPDeps));
         extraLibSpec =
           if libpthreadCross != null
           then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
@@ -234,8 +234,8 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp}
-    --with-mpfr=${mpfr}
+    --with-gmp=${gmp.dev}
+    --with-mpfr=${mpfr.dev}
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -323,7 +323,7 @@ stdenv.mkDerivation ({
   # Likewise, the LTO code doesn't find zlib.
 
   CPATH = concatStrings
-            (intersperse ":" (map (x: x + "/include")
+            (intersperse ":" (map (x: "${x.dev or x}/include")
                                   (optionals (zlib != null) [ zlib ]
                                    ++ optionals langJava [ boehmgc ]
                                    ++ optionals javaAwtGtk xlibs
diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix
index bc968d1f66e..7003f4335c8 100644
--- a/pkgs/development/compilers/gcc/4.6/default.nix
+++ b/pkgs/development/compilers/gcc/4.6/default.nix
@@ -215,7 +215,7 @@ stdenv.mkDerivation ({
           ++ stdenv.lib.optional (libpthread != null) libpthread;
         extraCPPSpec =
           concatStrings (intersperse " "
-                          (map (x: "-I${x}/include") extraCPPDeps));
+                          (map (x: "-I${x.dev or x}/include") extraCPPDeps));
         extraLibSpec =
           if libpthreadCross != null
           then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
@@ -295,8 +295,8 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp}
-    --with-mpfr=${mpfr}
+    --with-gmp=${gmp.dev}
+    --with-mpfr=${mpfr.dev}
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -398,7 +398,7 @@ stdenv.mkDerivation ({
   # Likewise, the LTO code doesn't find zlib.
 
   CPATH = concatStrings
-            (intersperse ":" (map (x: x + "/include")
+            (intersperse ":" (map (x: "${x.dev or x}/include")
                                   (optionals (zlib != null) [ zlib ]
                                    ++ optionals langJava [ boehmgc ]
                                    ++ optionals javaAwtGtk xlibs
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index 5089f703d5e..6810b52574c 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -241,7 +241,7 @@ stdenv.mkDerivation ({
           ++ stdenv.lib.optional (libpthread != null) libpthread;
         extraCPPSpec =
           concatStrings (intersperse " "
-                          (map (x: "-I${x}/include") extraCPPDeps));
+                          (map (x: "-I${x.dev or x}/include") extraCPPDeps));
         extraLibSpec =
           if libpthreadCross != null
           then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
@@ -338,8 +338,8 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp}
-    --with-mpfr=${mpfr}
+    --with-gmp=${gmp.dev}
+    --with-mpfr=${mpfr.dev}
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -460,7 +460,7 @@ stdenv.mkDerivation ({
   # Likewise, the LTO code doesn't find zlib.
 
   CPATH = concatStrings
-            (intersperse ":" (map (x: x + "/include")
+            (intersperse ":" (map (x: "${x.dev or x}/include")
                                   (optionals (zlib != null) [ zlib ]
                                    ++ optionals langJava [ boehmgc ]
                                    ++ optionals javaAwtGtk xlibs
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 21241364823..195a7b03eed 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -244,7 +244,7 @@ stdenv.mkDerivation ({
           ++ stdenv.lib.optional (libpthread != null) libpthread;
         extraCPPSpec =
           concatStrings (intersperse " "
-                          (map (x: "-I${x}/include") extraCPPDeps));
+                          (map (x: "-I${x.dev or x}/include") extraCPPDeps));
         extraLibSpec =
           if libpthreadCross != null
           then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
@@ -345,8 +345,8 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp}
-    --with-mpfr=${mpfr}
+    --with-gmp=${gmp.dev}
+    --with-mpfr=${mpfr.dev}
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -467,7 +467,7 @@ stdenv.mkDerivation ({
   # Likewise, the LTO code doesn't find zlib.
 
   CPATH = concatStrings
-            (intersperse ":" (map (x: x + "/include")
+            (intersperse ":" (map (x: "${x.dev or x}/include")
                                   (optionals (zlib != null) [ zlib ]
                                    ++ optionals langJava [ boehmgc ]
                                    ++ optionals javaAwtGtk xlibs
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index d7ff8fe99df..9e0220ffc72 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -242,7 +242,7 @@ stdenv.mkDerivation ({
           ++ stdenv.lib.optional (libpthread != null) libpthread;
         extraCPPSpec =
           concatStrings (intersperse " "
-                          (map (x: "-I${x}/include") extraCPPDeps));
+                          (map (x: "-I${x.dev or x}/include") extraCPPDeps));
         extraLibSpec =
           if libpthreadCross != null
           then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
@@ -339,8 +339,8 @@ stdenv.mkDerivation ({
       else ""}
     ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
     ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
-    --with-gmp=${gmp}
-    --with-mpfr=${mpfr}
+    --with-gmp=${gmp.dev}
+    --with-mpfr=${mpfr.dev}
     --with-mpc=${libmpc}
     ${if libelf != null then "--with-libelf=${libelf}" else ""}
     --disable-libstdcxx-pch
@@ -460,7 +460,7 @@ stdenv.mkDerivation ({
   # Likewise, the LTO code doesn't find zlib.
 
   CPATH = concatStrings
-            (intersperse ":" (map (x: x + "/include")
+            (intersperse ":" (map (x: "${x.dev or x}/include")
                                   (optionals (zlib != null) [ zlib ]
                                    ++ optionals langJava [ boehmgc ]
                                    ++ optionals javaAwtGtk xlibs
diff --git a/pkgs/development/compilers/gcc/gfortran-darwin.nix b/pkgs/development/compilers/gcc/gfortran-darwin.nix
index 66f273482cf..7fa58a053b4 100644
--- a/pkgs/development/compilers/gcc/gfortran-darwin.nix
+++ b/pkgs/development/compilers/gcc/gfortran-darwin.nix
@@ -21,10 +21,10 @@ stdenv.mkDerivation rec {
     --enable-checking=release
     --enable-languages=fortran
     --with-cloog=${cloog}
-    --with-gmp=${gmp}
+    --with-gmp=${gmp.dev}
     --with-isl=${isl_0_14}
     --with-mpc=${libmpc}
-    --with-mpfr=${mpfr}
+    --with-mpfr=${mpfr.dev}
     --with-native-system-header-dir=${Libsystem}/include
     --with-system-zlib
   '';
diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix
index 77e5229a2a0..f0f54252b3f 100644
--- a/pkgs/development/compilers/ghc/7.0.4-binary.nix
+++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix
@@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
 
   configurePhase = ''
     ./configure --prefix=$out \
-      --with-gmp-libraries=${gmp.out}/lib --with-gmp-includes=${gmp}/include \
+      --with-gmp-libraries=${gmp.out or gmp}/lib --with-gmp-includes=${gmp.dev or gmp}/include \
       ${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
   '';
 
diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix
index c9f281980d9..07137578585 100644
--- a/pkgs/development/compilers/ghc/7.4.2-binary.nix
+++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix
@@ -91,7 +91,7 @@ stdenv.mkDerivation rec {
 
   configurePhase = ''
     ./configure --prefix=$out \
-      --with-gmp-libraries=${gmp.out}/lib --with-gmp-includes=${gmp}/include \
+      --with-gmp-libraries=${gmp.out or gmp}/lib --with-gmp-includes=${gmp.dev or gmp}/include \
       ${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
   '';
 
diff --git a/pkgs/development/compilers/ghc/8.0.1.nix b/pkgs/development/compilers/ghc/8.0.1.nix
index dcbdee46da8..e0df800d1e0 100644
--- a/pkgs/development/compilers/ghc/8.0.1.nix
+++ b/pkgs/development/compilers/ghc/8.0.1.nix
@@ -33,8 +33,8 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--with-gcc=${stdenv.cc}/bin/cc"
-    "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp.out}/lib"
-    "--with-curses-includes=${ncurses}/include" "--with-curses-libraries=${ncurses.out}/lib"
+    "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
+    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
   ] ++ stdenv.lib.optional stdenv.isDarwin [
     "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
   ];
diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix
index 23f0484e8ea..eb9e5f7d362 100644
--- a/pkgs/development/compilers/hhvm/default.nix
+++ b/pkgs/development/compilers/hhvm/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   MYSQL_DIR=mariadb;
 
   # work around broken build system
-  NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
+  NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2";
 
   prePatch = ''
     substituteInPlace hphp/util/generate-buildinfo.sh \
diff --git a/pkgs/development/compilers/llvm/3.4/llvm.nix b/pkgs/development/compilers/llvm/3.4/llvm.nix
index 59e8055efb2..7471974d00a 100644
--- a/pkgs/development/compilers/llvm/3.4/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.4/llvm.nix
@@ -46,7 +46,7 @@ in stdenv.mkDerivation rec {
     "-DLLVM_BUILD_TESTS=ON"
     "-DLLVM_ENABLE_FFI=ON"
     "-DLLVM_REQUIRES_RTTI=1"
-    "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
+    "-DLLVM_BINUTILS_INCDIR=${binutils.dev or binutils}/include"
     "-DCMAKE_CXX_FLAGS=-std=c++11"
   ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
 
diff --git a/pkgs/development/compilers/llvm/3.5/llvm.nix b/pkgs/development/compilers/llvm/3.5/llvm.nix
index f16b6981dea..64df30dc23f 100644
--- a/pkgs/development/compilers/llvm/3.5/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.5/llvm.nix
@@ -47,7 +47,7 @@ in stdenv.mkDerivation rec {
   ] ++ stdenv.lib.optional enableSharedLibraries
     "-DBUILD_SHARED_LIBS=ON"
     ++ stdenv.lib.optional (!isDarwin)
-    "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
+    "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
     ++ stdenv.lib.optionals ( isDarwin) [
     "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
     "-DCAN_TARGET_i386=false"
diff --git a/pkgs/development/compilers/llvm/3.6/llvm.nix b/pkgs/development/compilers/llvm/3.6/llvm.nix
index 2ccf9d1ed71..5941d788356 100644
--- a/pkgs/development/compilers/llvm/3.6/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.6/llvm.nix
@@ -47,7 +47,7 @@ in stdenv.mkDerivation rec {
   ] ++ stdenv.lib.optional enableSharedLibraries
     "-DBUILD_SHARED_LIBS=ON"
     ++ stdenv.lib.optional (!isDarwin)
-    "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
+    "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
     ++ stdenv.lib.optionals ( isDarwin) [
     "-DCMAKE_CXX_FLAGS=-stdlib=libc++"
     "-DCAN_TARGET_i386=false"
diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix
index be527d87375..3a7829eca6d 100644
--- a/pkgs/development/compilers/llvm/3.7/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.7/llvm.nix
@@ -50,7 +50,7 @@ in stdenv.mkDerivation rec {
   ] ++ stdenv.lib.optional enableSharedLibraries
     "-DBUILD_SHARED_LIBS=ON"
     ++ stdenv.lib.optional (!isDarwin)
-    "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
+    "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
     ++ stdenv.lib.optionals ( isDarwin) [
     "-DLLVM_ENABLE_LIBCXX=ON"
     "-DCAN_TARGET_i386=false"
diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix
index db73999719d..93f5a9f6367 100644
--- a/pkgs/development/compilers/llvm/3.8/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.8/llvm.nix
@@ -50,7 +50,7 @@ in stdenv.mkDerivation rec {
   ] ++ stdenv.lib.optional enableSharedLibraries [
     "-DLLVM_LINK_LLVM_DYLIB=ON"
   ] ++ stdenv.lib.optional (!isDarwin)
-    "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
+    "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
     ++ stdenv.lib.optionals ( isDarwin) [
     "-DLLVM_ENABLE_LIBCXX=ON"
     "-DCAN_TARGET_i386=false"
diff --git a/pkgs/development/compilers/mono/llvm.nix b/pkgs/development/compilers/mono/llvm.nix
index 74f85b1519c..de9339bb8a2 100644
--- a/pkgs/development/compilers/mono/llvm.nix
+++ b/pkgs/development/compilers/mono/llvm.nix
@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
   cmakeFlags = with stdenv; [
     "-DCMAKE_BUILD_TYPE=Release"
     "-DLLVM_ENABLE_FFI=ON"
-    "-DLLVM_BINUTILS_INCDIR=${binutils}/include"
+    "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
     "-DCMAKE_CXX_FLAGS=-std=c++11"
   ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
 
diff --git a/pkgs/development/compilers/opendylan/default.nix b/pkgs/development/compilers/opendylan/default.nix
index 66e62f8965e..0e26526ba16 100644
--- a/pkgs/development/compilers/opendylan/default.nix
+++ b/pkgs/development/compilers/opendylan/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
     ./autogen.sh
   '';
 
-  configureFlags = if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc}";
+  configureFlags = if stdenv.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.dev}";
   buildPhase = "make 3-stage-bootstrap";
 
   postInstall = "wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin";
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index 5fbfd8a96ac..eebc8a56765 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
   '';
 
-  configureFlags = "--with-openssl=${openssl}";
+  configureFlags = "--with-openssl=${openssl.dev}";
 
   preConfigure = ''
     export PGHEADER="${postgresql}/include/libpq-fe.h";
diff --git a/pkgs/development/interpreters/erlang/R16.nix b/pkgs/development/interpreters/erlang/R16.nix
index 7ae7af30717..6eb89bbf89b 100644
--- a/pkgs/development/interpreters/erlang/R16.nix
+++ b/pkgs/development/interpreters/erlang/R16.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     sed -e s@/bin/pwd@pwd@g -i otp_build
   '';
 
-  configureFlags= "--with-ssl=${openssl} ${optionalString odbcSupport "--with-odbc=${unixODBC}"} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}";
+  configureFlags= "--with-ssl=${openssl.dev} ${optionalString odbcSupport "--with-odbc=${unixODBC}"} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}";
 
   postInstall = let
     manpages = fetchurl {
diff --git a/pkgs/development/interpreters/erlang/R17.nix b/pkgs/development/interpreters/erlang/R17.nix
index b32e3af9865..c597a44a890 100644
--- a/pkgs/development/interpreters/erlang/R17.nix
+++ b/pkgs/development/interpreters/erlang/R17.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags= [
-    "--with-ssl=${openssl}"
+    "--with-ssl=${openssl.dev}"
   ] ++ optional enableHipe "--enable-hipe"
     ++ optional wxSupport "--enable-wx"
     ++ optional odbcSupport "--with-odbc=${unixODBC}"
diff --git a/pkgs/development/interpreters/erlang/R18.nix b/pkgs/development/interpreters/erlang/R18.nix
index 2fc91d6a2db..42289d2467b 100644
--- a/pkgs/development/interpreters/erlang/R18.nix
+++ b/pkgs/development/interpreters/erlang/R18.nix
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
   '';
 
   configureFlags= [
-    "--with-ssl=${openssl}"
+    "--with-ssl=${openssl.dev}"
   ] ++ optional enableHipe "--enable-hipe"
     ++ optional wxSupport "--enable-wx"
     ++ optional odbcSupport "--with-odbc=${unixODBC}"
diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix
index 847ae2997b8..25fa3d0bc74 100644
--- a/pkgs/development/interpreters/guile/default.nix
+++ b/pkgs/development/interpreters/guile/default.nix
@@ -97,10 +97,10 @@
       # /usr/include/mp.h from OpenSolaris.  See
       # <https://lists.gnu.org/archive/html/hydra-users/2012-08/msg00000.html>
       # for details.
-      "--with-libgmp-prefix=${gmp}"
+      "--with-libgmp-prefix=${gmp.dev}"
 
       # Same for these (?).
-      "--with-libreadline-prefix=${readline}"
+      "--with-libreadline-prefix=${readline.dev}"
       "--with-libunistring-prefix=${libunistring}"
 
       # See below.
diff --git a/pkgs/development/interpreters/love/0.7.nix b/pkgs/development/interpreters/love/0.7.nix
index 65f38ae1613..76b08cd35c6 100644
--- a/pkgs/development/interpreters/love/0.7.nix
+++ b/pkgs/development/interpreters/love/0.7.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = ''
     -I${SDL}/include/SDL
-    -I${freetype}include/freetype2
+    -I${freetype.dev}include/freetype2
   '';
 
   meta = {
diff --git a/pkgs/development/interpreters/love/0.8.nix b/pkgs/development/interpreters/love/0.8.nix
index b12c2c40578..e73f831156a 100644
--- a/pkgs/development/interpreters/love/0.8.nix
+++ b/pkgs/development/interpreters/love/0.8.nix
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = ''
     -I${SDL.dev}/include/SDL
-    -I${freetype}include/freetype2
+    -I${freetype.dev}include/freetype2
   '';
 
   meta = {
diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix
index 5856604c53d..7cee753d4d1 100644
--- a/pkgs/development/interpreters/php/default.nix
+++ b/pkgs/development/interpreters/php/default.nix
@@ -60,7 +60,7 @@ let
         };
 
         curl = {
-          configureFlags = ["--with-curl=${curl}"];
+          configureFlags = ["--with-curl=${curl.dev}"];
           buildInputs = [curl openssl];
         };
 
@@ -69,7 +69,7 @@ let
         };
 
         zlib = {
-          configureFlags = ["--with-zlib=${zlib}"];
+          configureFlags = ["--with-zlib=${zlib.dev}"];
           buildInputs = [zlib];
         };
 
@@ -85,12 +85,12 @@ let
         };
 
         readline = {
-          configureFlags = ["--with-readline=${readline}"];
+          configureFlags = ["--with-readline=${readline.dev}"];
           buildInputs = [ readline ];
         };
 
         sqlite = {
-          configureFlags = ["--with-pdo-sqlite=${sqlite}"];
+          configureFlags = ["--with-pdo-sqlite=${sqlite.dev}"];
           buildInputs = [ sqlite ];
         };
 
@@ -133,15 +133,15 @@ let
           # FIXME: Our own gd package doesn't work, see https://bugs.php.net/bug.php?id=60108.
           configureFlags = [
             "--with-gd"
-            "--with-freetype-dir=${freetype}"
-            "--with-png-dir=${libpng}"
-            "--with-jpeg-dir=${libjpeg}"
+            "--with-freetype-dir=${freetype.dev}"
+            "--with-png-dir=${libpng.dev}"
+            "--with-jpeg-dir=${libjpeg.dev}"
           ];
           buildInputs = [ libpng libjpeg freetype ];
         };
 
         gmp = {
-          configureFlags = ["--with-gmp=${gmp}"];
+          configureFlags = ["--with-gmp=${gmp.dev}"];
           buildInputs = [ gmp ];
         };
 
@@ -177,7 +177,7 @@ let
         };
 
         xsl = {
-          configureFlags = ["--with-xsl=${libxslt}"];
+          configureFlags = ["--with-xsl=${libxslt.dev}"];
           buildInputs = [libxslt];
         };
 
@@ -187,7 +187,7 @@ let
         };
 
         bz2 = {
-          configureFlags = ["--with-bz2=${bzip2}"];
+          configureFlags = ["--with-bz2=${bzip2.dev}"];
           buildInputs = [bzip2];
         };
 
diff --git a/pkgs/development/interpreters/pixie/default.nix b/pkgs/development/interpreters/pixie/default.nix
index 4adaea04ec1..e7d8bf1bc05 100644
--- a/pkgs/development/interpreters/pixie/default.nix
+++ b/pkgs/development/interpreters/pixie/default.nix
@@ -47,7 +47,7 @@ let
     patchPhase = ''
       (cd pixie-src
        patch -p1 < ${./load_paths.patch}
-       libraryPaths='["${libuv}" "${libedit}" "${libffi}" "${boost.dev}" "${boost.out}" "${zlib}"]'
+       libraryPaths='["${libuv}" "${libedit}" "${libffi.dev}" "${boost.dev}" "${boost.out}" "${zlib.dev}"]'
        export libraryPaths
        substituteAllInPlace ./pixie/ffi-infer.pxi)
     '';
diff --git a/pkgs/development/libraries/aalib/default.nix b/pkgs/development/libraries/aalib/default.nix
index 7ddb78d052e..a6cdf9eb860 100644
--- a/pkgs/development/libraries/aalib/default.nix
+++ b/pkgs/development/libraries/aalib/default.nix
@@ -25,7 +25,7 @@ stdenv.mkDerivation {
 
   buildInputs = [ ncurses ];
 
-  configureFlags = "--without-x --with-ncurses=${ncurses}";
+  configureFlags = "--without-x --with-ncurses=${ncurses.dev}";
 
   postInstall = ''
     mkdir -p $dev/bin
diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix
index 6f0956f1d1d..8df7be4a7d1 100644
--- a/pkgs/development/libraries/apr-util/default.nix
+++ b/pkgs/development/libraries/apr-util/default.nix
@@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
 
   buildInputs = optional stdenv.isFreeBSD autoreconfHook;
 
-  configureFlags = [ "--with-apr=${apr}" "--with-expat=${expat}" ]
+  configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
     ++ optional (!stdenv.isCygwin) "--with-crypto"
-    ++ optional sslSupport "--with-openssl=${openssl}"
+    ++ optional sslSupport "--with-openssl=${openssl.dev}"
     ++ optional bdbSupport "--with-berkeley-db=${db}"
     ++ optional ldapSupport "--with-ldap=ldap"
     ++ optionals stdenv.isCygwin
diff --git a/pkgs/development/libraries/coprthr/default.nix b/pkgs/development/libraries/coprthr/default.nix
index 40be21131d2..5630daa0d93 100644
--- a/pkgs/development/libraries/coprthr/default.nix
+++ b/pkgs/development/libraries/coprthr/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
   configureFlags =
     [ "--with-libelf=${libelf}"
-      "--with-libevent=${libevent}"
+      "--with-libevent=${libevent.dev}"
       "--with-libconfig=${libconfig}"
       "--with-opencl-icd-path=$out/etc/OpenCL/vendors"
       "--enable-user-install"
diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix
index f1cd9d526e4..366e5f613a9 100644
--- a/pkgs/development/libraries/cyrus-sasl/default.nix
+++ b/pkgs/development/libraries/cyrus-sasl/default.nix
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
     );
 
   configureFlags = [
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
   ];
 
   # Set this variable at build-time to make sure $out can be evaluated.
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index 1607387160d..36019bdd7f7 100644
--- a/pkgs/development/libraries/gdal/default.nix
+++ b/pkgs/development/libraries/gdal/default.nix
@@ -29,10 +29,10 @@ composableDerivation.composableDerivation {} (fixed: rec {
   preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";
 
   configureFlags = [
-    "--with-jpeg=${libjpeg}"
-    "--with-libtiff=${libtiff}" # optional (without largetiff support)
-    "--with-libpng=${libpng}"   # optional
-    "--with-libz=${zlib}"       # optional
+    "--with-jpeg=${libjpeg.dev}"
+    "--with-libtiff=${libtiff.dev}" # optional (without largetiff support)
+    "--with-libpng=${libpng.dev}"   # optional
+    "--with-libz=${zlib.dev}"       # optional
 
     "--with-pg=${postgresql}/bin/pg_config"
     "--with-mysql=${mysql.lib}/bin/mysql_config"
diff --git a/pkgs/development/libraries/gdal/gdal-1_11.nix b/pkgs/development/libraries/gdal/gdal-1_11.nix
index 0e4b4d03541..06f8afba334 100644
--- a/pkgs/development/libraries/gdal/gdal-1_11.nix
+++ b/pkgs/development/libraries/gdal/gdal-1_11.nix
@@ -24,10 +24,10 @@ composableDerivation.composableDerivation {} (fixed: rec {
   preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";
 
   configureFlags = [
-    "--with-jpeg=${libjpeg}"
-    "--with-libtiff=${libtiff}" # optional (without largetiff support)
-    "--with-libpng=${libpng}"   # optional
-    "--with-libz=${zlib}"       # optional
+    "--with-jpeg=${libjpeg.dev}"
+    "--with-libtiff=${libtiff.dev}" # optional (without largetiff support)
+    "--with-libpng=${libpng.dev}"   # optional
+    "--with-libz=${zlib.dev}"       # optional
 
     "--with-pg=${postgresql}/bin/pg_config"
     "--with-mysql=${mysql.lib}/bin/mysql_config"
diff --git a/pkgs/development/libraries/ggz_base_libs/default.nix b/pkgs/development/libraries/ggz_base_libs/default.nix
index 5e3adb0ace2..631160487d8 100644
--- a/pkgs/development/libraries/ggz_base_libs/default.nix
+++ b/pkgs/development/libraries/ggz_base_libs/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ intltool openssl expat libgcrypt ];
 
   configureFlags = [
-    "--with-ssl-dir=${openssl}/"
+    "--with-ssl-dir=${openssl.dev}/"
     "--with-tls"
   ];
 
diff --git a/pkgs/development/libraries/gupnp/default.nix b/pkgs/development/libraries/gupnp/default.nix
index 45f5217d3c9..755a4e8fcdc 100644
--- a/pkgs/development/libraries/gupnp/default.nix
+++ b/pkgs/development/libraries/gupnp/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   propagatedBuildInputs = [ glib gssdp libsoup libxml2 libuuid ];
 
   postInstall = ''
-    ln -sv ${libsoup}/include/*/libsoup $out/include
+    ln -sv ${libsoup.dev}/include/*/libsoup $out/include
     ln -sv ${libxml2.dev}/include/*/libxml $out/include
     ln -sv ${gssdp}/include/*/libgssdp $out/include
   '';
diff --git a/pkgs/development/libraries/kerberos/heimdal.nix b/pkgs/development/libraries/kerberos/heimdal.nix
index 175d0c7bc3b..3740cf18b1e 100644
--- a/pkgs/development/libraries/kerberos/heimdal.nix
+++ b/pkgs/development/libraries/kerberos/heimdal.nix
@@ -32,13 +32,13 @@ stdenv.mkDerivation rec {
     "--sysconfdir=/etc"
     "--localstatedir=/var"
     "--enable-hdb-openldap-module"
-    "--with-sqlite3=${sqlite}"
+    "--with-sqlite3=${sqlite.dev}"
     "--with-libedit=${libedit}"
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
     "--without-x"
     "--with-berkeley-db=${db}"
   ] ++ optionals (!libOnly) [
-    "--with-openldap=${openldap}"
+    "--with-openldap=${openldap.dev}"
   ] ++ optionals (!stdenv.isFreeBSD) [
     "--with-capng"
   ];
diff --git a/pkgs/development/libraries/ldns/default.nix b/pkgs/development/libraries/ldns/default.nix
index b1f81549ef0..c279d698e12 100644
--- a/pkgs/development/libraries/ldns/default.nix
+++ b/pkgs/development/libraries/ldns/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ perl ];
   buildInputs = [ openssl ];
 
-  configureFlags = [ "--with-ssl=${openssl}" "--with-drill" ];
+  configureFlags = [ "--with-ssl=${openssl.dev}" "--with-drill" ];
 
   meta = with stdenv.lib; {
     description = "Library with the aim of simplifying DNS programming in C";
diff --git a/pkgs/development/libraries/libclxclient/default.nix b/pkgs/development/libraries/libclxclient/default.nix
index 4dca6b57c75..9fb01df930a 100644
--- a/pkgs/development/libraries/libclxclient/default.nix
+++ b/pkgs/development/libraries/libclxclient/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ libclthreads libX11 libXft xorg.xproto ];
 
-  NIX_CFLAGS_COMPILE = "-I${xorg.xproto}/include -I${libXft}/include";
+  NIX_CFLAGS_COMPILE = "-I${xorg.xproto}/include -I${libXft.dev}/include";
 
   patchPhase = ''
     sed -e "s@ldconfig@@" -i Makefile
diff --git a/pkgs/development/libraries/libksi/default.nix b/pkgs/development/libraries/libksi/default.nix
index 1dd71024681..39de886a0b7 100644
--- a/pkgs/development/libraries/libksi/default.nix
+++ b/pkgs/development/libraries/libksi/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ openssl curl ];
 
   configureFlags = [
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
     "--with-cafile=/etc/ssl/certs/ca-certificates.crt"
   ];
 
diff --git a/pkgs/development/libraries/opencascade/6.5.nix b/pkgs/development/libraries/opencascade/6.5.nix
index 4228c285dfd..904137c4d8c 100644
--- a/pkgs/development/libraries/opencascade/6.5.nix
+++ b/pkgs/development/libraries/opencascade/6.5.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   # https://bugs.freedesktop.org/show_bug.cgi?id=83631
     + " -DGLX_GLXEXT_LEGACY";
 
-  configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-qt=${qt4}" "--with-ftgl=${ftgl}" "--with-freetype=${freetype}" ];
+  configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-qt=${qt4}" "--with-ftgl=${ftgl}" "--with-freetype=${freetype.dev}" ];
 
   postInstall = ''
     mv $out/inc $out/include
diff --git a/pkgs/development/libraries/opencascade/default.nix b/pkgs/development/libraries/opencascade/default.nix
index ec15d9d631e..536281d5372 100644
--- a/pkgs/development/libraries/opencascade/default.nix
+++ b/pkgs/development/libraries/opencascade/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   preUnpack = ''
     sourceRoot=`pwd`/ros/adm/cmake
-    cmakeFlags="$cmakeFlags -DINSTALL_DIR=$out -D3RDPARTY_TCL_DIR=${tcl} -D3RDPARTY_FREETYPE_DIR=${freetype}"
+    cmakeFlags="$cmakeFlags -DINSTALL_DIR=$out -D3RDPARTY_TCL_DIR=${tcl} -D3RDPARTY_FREETYPE_DIR=${freetype.dev}"
   '';
 
   # https://bugs.freedesktop.org/show_bug.cgi?id=83631
diff --git a/pkgs/development/libraries/postgis/default.nix b/pkgs/development/libraries/postgis/default.nix
index f3e2312f484..1886038dff3 100644
--- a/pkgs/development/libraries/postgis/default.nix
+++ b/pkgs/development/libraries/postgis/default.nix
@@ -96,7 +96,7 @@ in rec {
     dontDisableStatic = true;
     preConfigure = ''
       sed -i 's@/usr/bin/file@${file}/bin/file@' configure
-      configureFlags="$configureFlags --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c}"
+      configureFlags="$configureFlags --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev}"
     '';
     postConfigure = ''
       sed -i "s|@mkdir -p \$(DESTDIR)\$(PGSQL_BINDIR)||g ;
diff --git a/pkgs/development/libraries/serf/default.nix b/pkgs/development/libraries/serf/default.nix
index 20ce1dabf9a..86212eaeb47 100644
--- a/pkgs/development/libraries/serf/default.nix
+++ b/pkgs/development/libraries/serf/default.nix
@@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
   '';
 
   buildPhase = ''
-    scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr}"/bin/*-config)" \
-        APU="$(echo "${aprutil}"/bin/*-config)" CC="${
+    scons PREFIX="$out" OPENSSL="${openssl.dev}" ZLIB="${zlib.dev}" APR="$(echo "${apr.dev}"/bin/*-config)" \
+        APU="$(echo "${aprutil.dev}"/bin/*-config)" CC="${
           if stdenv.cc.isClang then "clang" else "${stdenv.cc}/bin/gcc"
         }" ${
           if (stdenv.isDarwin || stdenv.isCygwin) then "" else "GSSAPI=\"${kerberos}\""
diff --git a/pkgs/development/libraries/silgraphite/default.nix b/pkgs/development/libraries/silgraphite/default.nix
index 8e8cdc0ce1c..f124b313d74 100644
--- a/pkgs/development/libraries/silgraphite/default.nix
+++ b/pkgs/development/libraries/silgraphite/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [pkgconfig freetype libXft pango fontconfig];
 
-  NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
+  NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2";
 
   meta = {
     description = "An advanced font engine";
diff --git a/pkgs/development/libraries/slang/default.nix b/pkgs/development/libraries/slang/default.nix
index e83718673aa..df2b5db89a7 100644
--- a/pkgs/development/libraries/slang/default.nix
+++ b/pkgs/development/libraries/slang/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
     sed -i -e "s|/bin/ln|ln|" src/Makefile.in
     sed -i -e "s|-ltermcap|-lncurses|" ./configure
   '';
-  configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}";
+  configureFlags = "--with-png=${libpng.dev} --with-z=${zlib.dev} --with-pcre=${pcre.dev} --with-readline=${readline.dev}";
   buildInputs = [ pcre libpng zlib readline ];
   propagatedBuildInputs = [ ncurses ];
 
diff --git a/pkgs/development/libraries/swiften/default.nix b/pkgs/development/libraries/swiften/default.nix
index 46ecada9668..e6fb5a2b685 100644
--- a/pkgs/development/libraries/swiften/default.nix
+++ b/pkgs/development/libraries/swiften/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   
   buildPhase = ''
     patchShebangs ./scons
-    ./scons openssl=${openssl} \
+    ./scons openssl=${openssl.dev} \
             boost_includedir=${boost.dev}/include \
             boost_libdir=${boost.out}/lib \
             boost_bundled_enable=false \
diff --git a/pkgs/development/libraries/zeitgeist/default.nix b/pkgs/development/libraries/zeitgeist/default.nix
index d0de624890b..ced0844f3e1 100644
--- a/pkgs/development/libraries/zeitgeist/default.nix
+++ b/pkgs/development/libraries/zeitgeist/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     sha256 = "07pnc7kmjpd0ncm32z6s3ny5p4zl52v9lld0n0f8sp6cw87k12p0";
   };
 
-  NIX_CFLAGS_COMPILE = "-I${glib}/include/gio-unix-2.0";
+  NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
 
   configureScript = "./autogen.sh";
 
diff --git a/pkgs/development/ocaml-modules/camlzip/default.nix b/pkgs/development/ocaml-modules/camlzip/default.nix
index d392b5f789c..9025d94b8d5 100644
--- a/pkgs/development/ocaml-modules/camlzip/default.nix
+++ b/pkgs/development/ocaml-modules/camlzip/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
     substitute ${./META} META --subst-var-by VERSION "${version}"
     substituteInPlace Makefile \
       --subst-var-by ZLIB_LIBDIR "${zlib.out}/lib" \
-      --subst-var-by ZLIB_INCLUDE "${zlib}/include"
+      --subst-var-by ZLIB_INCLUDE "${zlib.dev}/include"
   '';
 
   buildFlags = "all allopt";
diff --git a/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix b/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
index 9314481cbcf..7f2f8e9e4e5 100644
--- a/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
+++ b/pkgs/development/perl-modules/Compress-Raw-Zlib/default.nix
@@ -11,7 +11,7 @@ buildPerlPackage rec {
   preConfigure = ''
     cat > config.in <<EOF
       BUILD_ZLIB   = False
-      INCLUDE      = ${zlib}/include
+      INCLUDE      = ${zlib.dev}/include
       LIB          = ${zlib.out}/lib
       OLD_ZLIB     = False
       GZIP_OS_CODE = AUTO_DETECT
diff --git a/pkgs/development/perl-modules/DBD-SQLite/default.nix b/pkgs/development/perl-modules/DBD-SQLite/default.nix
index 13b633f4704..897e82c68e1 100644
--- a/pkgs/development/perl-modules/DBD-SQLite/default.nix
+++ b/pkgs/development/perl-modules/DBD-SQLite/default.nix
@@ -10,7 +10,7 @@ buildPerlPackage rec {
 
   propagatedBuildInputs = [ DBI ];
 
-  makeMakerFlags = "SQLITE_LOCATION=${sqlite}";
+  makeMakerFlags = "SQLITE_LOCATION=${sqlite.dev}";
 
   patches = [
     # Support building against our own sqlite.
diff --git a/pkgs/development/python-modules/tables/default.nix b/pkgs/development/python-modules/tables/default.nix
index b3003dfa954..88a39400c77 100644
--- a/pkgs/development/python-modules/tables/default.nix
+++ b/pkgs/development/python-modules/tables/default.nix
@@ -18,7 +18,7 @@ buildPythonPackage rec {
   setupPyBuildFlags =
     [ "--hdf5=${hdf5}"
       "--lzo=${lzo}"
-      "--bzip2=${bzip2}"
+      "--bzip2=${bzip2.dev}"
     ];
 
   # Run the test suite.
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix
index 99cb9d03ab6..c7eeb431bb6 100644
--- a/pkgs/development/r-modules/default.nix
+++ b/pkgs/development/r-modules/default.nix
@@ -1860,7 +1860,7 @@ let
 
     Rmpfr = old.Rmpfr.overrideDerivation (attrs: {
       configureFlags = [
-        "--with-mpfr-include=${pkgs.mpfr}/include"
+        "--with-mpfr-include=${pkgs.mpfr.dev}/include"
       ];
     });
 
@@ -1922,7 +1922,7 @@ let
     });
 
     openssl = old.openssl.overrideDerivation (attrs: {
-      OPENSSL_INCLUDES = "${pkgs.openssl}/include";
+      OPENSSL_INCLUDES = "${pkgs.openssl.dev}/include";
     });
 
     Rserve = old.Rserve.overrideDerivation (attrs: {
diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix
index 1349a4a53ac..64cacc976f4 100644
--- a/pkgs/development/ruby-modules/gem-config/default.nix
+++ b/pkgs/development/ruby-modules/gem-config/default.nix
@@ -90,7 +90,7 @@ in
   nokogiri = attrs: {
     buildFlags = [
       "--use-system-libraries"
-      "--with-zlib-dir=${zlib}"
+      "--with-zlib-dir=${zlib.dev}"
       "--with-xml2-lib=${libxml2.out}/lib"
       "--with-xml2-include=${libxml2.dev}/include/libxml2"
       "--with-xslt-lib=${libxslt.out}/lib"
diff --git a/pkgs/development/tools/misc/cscope/default.nix b/pkgs/development/tools/misc/cscope/default.nix
index 223f1968274..4685787af5f 100644
--- a/pkgs/development/tools/misc/cscope/default.nix
+++ b/pkgs/development/tools/misc/cscope/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
         -"es|\"cscope-indexer\"|\"$out/libexec/cscope/cscope-indexer\"|g";
   '';
 
-  configureFlags = "--with-ncurses=${ncurses}";
+  configureFlags = "--with-ncurses=${ncurses.dev}";
 
   buildInputs = [ ncurses ];
   nativeBuildInputs = [ pkgconfig emacs ];
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index 472bb4de58b..6635044ce67 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -44,8 +44,8 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   configureFlags = with stdenv.lib;
-    [ "--with-gmp=${gmp}" "--with-mpfr=${mpfr}" "--with-system-readline"
-      "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat}"
+    [ "--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
+      "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
       "--with-separate-debug-dir=/run/current-system/sw/lib/debug"
     ]
     ++ optional (target != null) "--target=${target.config}"
diff --git a/pkgs/development/tools/misc/global/default.nix b/pkgs/development/tools/misc/global/default.nix
index e6b81ca7eb1..3d09bc92cd3 100644
--- a/pkgs/development/tools/misc/global/default.nix
+++ b/pkgs/development/tools/misc/global/default.nix
@@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-ltdl-include=${libtool}/include"
     "--with-ltdl-lib=${libtool.lib}/lib"
-    "--with-ncurses=${ncurses}"
-    "--with-sqlite3=${sqlite}"
+    "--with-ncurses=${ncurses.dev}"
+    "--with-sqlite3=${sqlite.dev}"
     "--with-exuberant-ctags=${ctags}/bin/ctags"
     "--with-posix-sort=${coreutils}/bin/sort"
   ];
diff --git a/pkgs/development/tools/misc/uhd/default.nix b/pkgs/development/tools/misc/uhd/default.nix
index 786a7d8cdb5..9c0d81cf004 100644
--- a/pkgs/development/tools/misc/uhd/default.nix
+++ b/pkgs/development/tools/misc/uhd/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  cmakeFlags = "-DLIBUSB_INCLUDE_DIRS=${libusb1}/include/libusb-1.0";
+  cmakeFlags = "-DLIBUSB_INCLUDE_DIRS=${libusb1.dev}/include/libusb-1.0";
 
   nativeBuildInputs = [ cmake pkgconfig ];
   buildInputs = [ python pythonPackages.pyramid_mako orc libusb1 boost ];
diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix
index 2284c25cf66..c970b319a94 100644
--- a/pkgs/development/tools/vagrant/default.nix
+++ b/pkgs/development/tools/vagrant/default.nix
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
     # curl: curl, curl-config
     rm opt/vagrant/embedded/bin/{curl,curl-config}
     ln -s ${curl.bin}/bin/curl opt/vagrant/embedded/bin
-    ln -s ${curl}/bin/curl-config opt/vagrant/embedded/bin
+    ln -s ${curl.dev}/bin/curl-config opt/vagrant/embedded/bin
 
     # libarchive: bsdtar, bsdcpio
     rm opt/vagrant/embedded/bin/{bsdtar,bsdcpio}
diff --git a/pkgs/games/0ad/default.nix b/pkgs/games/0ad/default.nix
index 485feb53a89..482d2b43df3 100644
--- a/pkgs/games/0ad/default.nix
+++ b/pkgs/games/0ad/default.nix
@@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
 
   NIX_CFLAGS_COMPILE = [
     "-I${xproto}/include/X11"
-    "-I${libX11}/include/X11"
-    "-I${libXcursor}/include/X11"
+    "-I${libX11.dev}/include/X11"
+    "-I${libXcursor.dev}/include/X11"
     "-I${SDL}/include/SDL"
     "-I${SDL2}/include/SDL2"
   ];
diff --git a/pkgs/games/crawl/crawl_purify.patch b/pkgs/games/crawl/crawl_purify.patch
index 0e2d335adac..bae82bebfb7 100644
--- a/pkgs/games/crawl/crawl_purify.patch
+++ b/pkgs/games/crawl/crawl_purify.patch
@@ -7,7 +7,7 @@ index b7e2fbf..5ff23db 100644
  
  ifndef CROSSHOST
 -	SQLITE_INCLUDE_DIR := /usr/include
-+	SQLITE_INCLUDE_DIR := ${sqlite}/include
++	SQLITE_INCLUDE_DIR := ${sqlite.dev}/include
  else
  	# This is totally wrong, works only with some old-style setups, and
  	# on some architectures of Debian/new FHS multiarch -- excluding, for
diff --git a/pkgs/games/crawl/default.nix b/pkgs/games/crawl/default.nix
index 0b9287faf37..26603e377f0 100644
--- a/pkgs/games/crawl/default.nix
+++ b/pkgs/games/crawl/default.nix
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
   '';
 
   makeFlags = [ "prefix=$(out)" "FORCE_CC=gcc" "FORCE_CXX=g++" "HOSTCXX=g++"
-                "SAVEDIR=~/.crawl" "sqlite=${sqlite}" ]
+                "SAVEDIR=~/.crawl" "sqlite=${sqlite.dev}" ]
            ++ stdenv.lib.optionals tileMode [ "TILES=y" "dejavu_fonts=${dejavu_fonts}" ];
 
   postInstall = if tileMode then "mv $out/bin/crawl $out/bin/crawl-tiles" else "";
diff --git a/pkgs/games/naev/default.nix b/pkgs/games/naev/default.nix
index 580b27ab21d..1f033d49305 100644
--- a/pkgs/games/naev/default.nix
+++ b/pkgs/games/naev/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
 
   nativeBuildInputs = [ pkgconfig makeWrapper ];
 
-  NIX_CFLAGS_COMPILE="-include ${zlib}/include/zlib.h";
+  NIX_CFLAGS_COMPILE="-include ${zlib.dev}/include/zlib.h";
 
   postInstall = ''
     mkdir -p $out/share/naev
diff --git a/pkgs/games/scorched3d/default.nix b/pkgs/games/scorched3d/default.nix
index f64f9e38f00..be921bf1189 100644
--- a/pkgs/games/scorched3d/default.nix
+++ b/pkgs/games/scorched3d/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   sourceRoot = "scorched";
 
-  configureFlags = [ "--with-fftw=${fftwSinglePrec}" ];
+  configureFlags = [ "--with-fftw=${fftwSinglePrec.dev}" ];
 
   NIX_LDFLAGS = [ "-lopenal" ];
 
diff --git a/pkgs/games/warmux/default.nix b/pkgs/games/warmux/default.nix
index 7bf277a7f9e..a56afbbf44b 100644
--- a/pkgs/games/warmux/default.nix
+++ b/pkgs/games/warmux/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
       gettext intltool libtool perl
     ];
 
-  configureFlagsArray = ("CFLAGS=-include ${zlib}/include/zlib.h");
+  configureFlagsArray = ("CFLAGS=-include ${zlib.dev}/include/zlib.h");
 
   patches = [ ./gcc-fix.patch ];
 
diff --git a/pkgs/misc/drivers/hplip/3.15.9.nix b/pkgs/misc/drivers/hplip/3.15.9.nix
index 1162cc4f00d..5c989594b3b 100644
--- a/pkgs/misc/drivers/hplip/3.15.9.nix
+++ b/pkgs/misc/drivers/hplip/3.15.9.nix
@@ -83,7 +83,7 @@ stdenv.mkDerivation {
     find . -type f -exec sed -i \
       -e s,/etc/hp,$out/etc/hp, \
       -e s,/etc/sane.d,$out/etc/sane.d, \
-      -e s,/usr/include/libusb-1.0,${libusb1}/include/libusb-1.0, \
+      -e s,/usr/include/libusb-1.0,${libusb1.dev}/include/libusb-1.0, \
       -e s,/usr/share/hal/fdi/preprobe/10osvendor,$out/share/hal/fdi/preprobe/10osvendor, \
       -e s,/usr/lib/systemd/system,$out/lib/systemd/system, \
       -e s,/var/lib/hp,$out/var/lib/hp, \
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix
index d90bb66410c..32997f98b21 100644
--- a/pkgs/misc/drivers/hplip/default.nix
+++ b/pkgs/misc/drivers/hplip/default.nix
@@ -84,7 +84,7 @@ stdenv.mkDerivation {
     find . -type f -exec sed -i \
       -e s,/etc/hp,$out/etc/hp, \
       -e s,/etc/sane.d,$out/etc/sane.d, \
-      -e s,/usr/include/libusb-1.0,${libusb1}/include/libusb-1.0, \
+      -e s,/usr/include/libusb-1.0,${libusb1.dev}/include/libusb-1.0, \
       -e s,/usr/share/hal/fdi/preprobe/10osvendor,$out/share/hal/fdi/preprobe/10osvendor, \
       -e s,/usr/lib/systemd/system,$out/lib/systemd/system, \
       -e s,/var/lib/hp,$out/var/lib/hp, \
diff --git a/pkgs/misc/emulators/dolphin-emu/default.nix b/pkgs/misc/emulators/dolphin-emu/default.nix
index f264b311dad..749573f474a 100644
--- a/pkgs/misc/emulators/dolphin-emu/default.nix
+++ b/pkgs/misc/emulators/dolphin-emu/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   cmakeFlags = ''
     -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include
     -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include
-    -DGTK2_INCLUDE_DIRS=${gtk2}/include/gtk-2.0
+    -DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0
     -DCMAKE_BUILD_TYPE=Release
     -DENABLE_LTO=True
   '';
diff --git a/pkgs/misc/emulators/dolphin-emu/master.nix b/pkgs/misc/emulators/dolphin-emu/master.nix
index 2a9d923f3e8..0eaf08c2b8d 100644
--- a/pkgs/misc/emulators/dolphin-emu/master.nix
+++ b/pkgs/misc/emulators/dolphin-emu/master.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   cmakeFlags = ''
     -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include
     -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include
-    -DGTK2_INCLUDE_DIRS=${gtk2}/include/gtk-2.0
+    -DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0
     -DCMAKE_BUILD_TYPE=Release
     -DENABLE_LTO=True
   '';
diff --git a/pkgs/misc/emulators/pcsx2/default.nix b/pkgs/misc/emulators/pcsx2/default.nix
index e6a7b9800d3..1b95bca643c 100644
--- a/pkgs/misc/emulators/pcsx2/default.nix
+++ b/pkgs/misc/emulators/pcsx2/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
       -DGLSL_SHADER_DIR="$out/share/pcsx2" \
       -DGTK2_GLIBCONFIG_INCLUDE_DIR='${glib.out}/lib/glib-2.0/include' \
       -DGTK2_GDKCONFIG_INCLUDE_DIR='${gtk2.out}/lib/gtk-2.0/include' \
-      -DGTK2_INCLUDE_DIRS='${gtk2}/include/gtk-2.0' \
+      -DGTK2_INCLUDE_DIRS='${gtk2.dev}/include/gtk-2.0' \
       -DPACKAGE_MODE=TRUE \
       -DPLUGIN_DIR="$out/lib/pcsx2" \
       -DREBUILD_SHADER=TRUE \
diff --git a/pkgs/misc/emulators/wxmupen64plus/default.nix b/pkgs/misc/emulators/wxmupen64plus/default.nix
index 0366b9dd22c..aec498b899e 100644
--- a/pkgs/misc/emulators/wxmupen64plus/default.nix
+++ b/pkgs/misc/emulators/wxmupen64plus/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
   configurePhase = ''
     tar xf ${mupen64plus.src}
     APIDIR=$(eval echo `pwd`/mupen64plus*/source/mupen64plus-core/src/api)
-    export CXXFLAGS="-I${libX11}/include/X11 -DLIBDIR=\\\"${mupen64plus}/lib/\\\""
+    export CXXFLAGS="-I${libX11.dev}/include/X11 -DLIBDIR=\\\"${mupen64plus}/lib/\\\""
     export LDFLAGS="-lwx_gtk2u_adv-2.9"
     python waf configure --mupenapi=$APIDIR --wxconfig=`type -P wx-config` --prefix=$out
   '';
diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix
index 3d51a900c3b..1242d99398f 100644
--- a/pkgs/misc/ghostscript/default.nix
+++ b/pkgs/misc/ghostscript/default.nix
@@ -92,7 +92,7 @@ stdenv.mkDerivation rec {
     rm -rf jpeg libpng zlib jasper expat tiff lcms{,2} jbig2dec freetype cups/libs ijs
 
     sed "s@if ( test -f \$(INCLUDE)[^ ]* )@if ( true )@; s@INCLUDE=/usr/include@INCLUDE=/no-such-path@" -i base/unix-aux.mak
-    sed "s@^ZLIBDIR=.*@ZLIBDIR=${zlib}/include@" -i configure.ac
+    sed "s@^ZLIBDIR=.*@ZLIBDIR=${zlib.dev}/include@" -i configure.ac
 
     autoconf
   '' + lib.optionalString cupsSupport ''
diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
index 42adab1c887..1c9b5879e6e 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
@@ -53,7 +53,7 @@ appleDerivation rec {
     cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdarg.h        $out/include
 
     for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \
-               ${libdispatch} ${ncurses} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
+               ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
                ${Libnotify} ${mDNSResponder} ${launchd} ${libutil}; do
       (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
     done
diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix
index d671c7c7230..8014881860b 100644
--- a/pkgs/os-specific/darwin/binutils/default.nix
+++ b/pkgs/os-specific/darwin/binutils/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
       ln -sf "${cctools}/bin/$i" "$out/bin/$i"
     done
 
-    for i in ${binutils-raw}/include/*.h; do
+    for i in ${binutils-raw.dev}/include/*.h; do
       ln -s "$i" "$out/include/$(basename $i)"
     done
 
diff --git a/pkgs/os-specific/linux/ati-drivers/builder.sh b/pkgs/os-specific/linux/ati-drivers/builder.sh
index 4394e785960..b9f6ed22cba 100644
--- a/pkgs/os-specific/linux/ati-drivers/builder.sh
+++ b/pkgs/os-specific/linux/ati-drivers/builder.sh
@@ -257,7 +257,7 @@ if test -z "$libsOnly"; then
     # a symlink named libfglrx_gamma.so.1 linking to libfglrx_gamma.so.1.0 in $out/lib/
 
     cd programs/fglrx_gamma
-    gcc -fPIC -I${libXxf86vm}/include \
+    gcc -fPIC -I${libXxf86vm.dev}/include \
 	    -I${xf86vidmodeproto}/include \
 	    -I$out/X11R6/include \
 	    -L$out/lib \
diff --git a/pkgs/os-specific/linux/criu/default.nix b/pkgs/os-specific/linux/criu/default.nix
index 0d06864df1e..630c4985325 100644
--- a/pkgs/os-specific/linux/criu/default.nix
+++ b/pkgs/os-specific/linux/criu/default.nix
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     substituteInPlace ./scripts/gen-offsets.sh --replace hexdump ${utillinux}/bin/hexdump
     substituteInPlace ./Documentation/Makefile --replace "2>/dev/null" ""
     substituteInPlace ./Documentation/Makefile --replace "--skip-validation" "--skip-validation -x ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl"
-    substituteInPlace ./criu/Makefile --replace "-I/usr/include/libnl3" "-I${libnl}/include/libnl3"
+    substituteInPlace ./criu/Makefile --replace "-I/usr/include/libnl3" "-I${libnl.dev}/include/libnl3"
     substituteInPlace ./Makefile --replace "tar-name := $(shell git tag -l v$(CRIU_VERSION))" "tar-name = 2.0" # --replace "-Werror" ""
     ln -sf ${protobuf}/include/google/protobuf/descriptor.proto ./images/google/protobuf/descriptor.proto
   '';
diff --git a/pkgs/os-specific/linux/wpa_supplicant/default.nix b/pkgs/os-specific/linux/wpa_supplicant/default.nix
index 0edd2d6e0f4..a3e9e930f5e 100644
--- a/pkgs/os-specific/linux/wpa_supplicant/default.nix
+++ b/pkgs/os-specific/linux/wpa_supplicant/default.nix
@@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
     cat -n .config
     substituteInPlace Makefile --replace /usr/local $out
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE \
-      -I$(echo "${libnl}"/include/libnl*/) \
+      -I$(echo "${libnl.dev}"/include/libnl*/) \
       -I${pcsclite}/include/PCSC/"
   '';
 
diff --git a/pkgs/os-specific/linux/xf86-input-multitouch/default.nix b/pkgs/os-specific/linux/xf86-input-multitouch/default.nix
index 7abf6d7c828..8b10136309c 100644
--- a/pkgs/os-specific/linux/xf86-input-multitouch/default.nix
+++ b/pkgs/os-specific/linux/xf86-input-multitouch/default.nix
@@ -10,6 +10,8 @@
 , libpciaccess
 }:
 
+assert stdenv.isLinux;
+
 stdenv.mkDerivation {
   name = "xf86-input-multitouch-20110312";
 
@@ -31,7 +33,7 @@ stdenv.mkDerivation {
   buildInputs = [ mtdev xproto xextproto inputproto libpciaccess randrproto ];
 
   buildPhase = ''
-    make INCLUDE="$NIX_CFLAGS_COMPILE -I${xorgserver}/include/xorg -I${pixman}/include/pixman-1 -Iinclude"
+    make INCLUDE="$NIX_CFLAGS_COMPILE -I${xorgserver.dev}/include/xorg -I${pixman}/include/pixman-1 -Iinclude"
   '';
 
   installPhase = ''
diff --git a/pkgs/servers/computing/slurm/default.nix b/pkgs/servers/computing/slurm/default.nix
index 6df27eaf328..04eccf0c5d7 100644
--- a/pkgs/servers/computing/slurm/default.nix
+++ b/pkgs/servers/computing/slurm/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   configureFlags =
     [ "--with-munge=${munge}"
-      "--with-ssl=${openssl}"
+      "--with-ssl=${openssl.dev}"
     ] ++ stdenv.lib.optional (gtk == null)  "--disable-gtktest";
 
   preConfigure = ''
diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix
index 5fbb02da73e..bb0928fa1ee 100644
--- a/pkgs/servers/dns/bind/default.nix
+++ b/pkgs/servers/dns/bind/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     "--localstatedir=/var"
     "--with-libtool"
     "--with-libxml2=${libxml2}"
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
     "--without-atf"
     "--without-dlopen"
     "--without-docbook-xsl"
diff --git a/pkgs/servers/http/apache-httpd/2.2.nix b/pkgs/servers/http/apache-httpd/2.2.nix
index 361aa3d58f7..0bde9baa4bf 100644
--- a/pkgs/servers/http/apache-httpd/2.2.nix
+++ b/pkgs/servers/http/apache-httpd/2.2.nix
@@ -39,12 +39,12 @@ stdenv.mkDerivation rec {
     configureFlags="$configureFlags --includedir=$dev/include"
   '';
   configureFlags = ''
-    --with-z=${zlib}
-    --with-pcre=${pcre}
+    --with-z=${zlib.dev}
+    --with-pcre=${pcre.dev}
     --enable-mods-shared=all
     --enable-authn-alias
     ${if proxySupport then "--enable-proxy" else ""}
-    ${if sslSupport then "--enable-ssl --with-ssl=${openssl}" else ""}
+    ${if sslSupport then "--enable-ssl --with-ssl=${openssl.dev}" else ""}
     ${if ldapSupport then "--enable-ldap --enable-authnz-ldap" else ""}
     --with-mpm=${mpm}
     --enable-cache
diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix
index bc7fd1441c1..d52973ea12f 100644
--- a/pkgs/servers/http/apache-httpd/2.4.nix
+++ b/pkgs/servers/http/apache-httpd/2.4.nix
@@ -46,10 +46,10 @@ stdenv.mkDerivation rec {
     configureFlags="$configureFlags --includedir=$dev/include"
   '';
   configureFlags = ''
-    --with-apr=${apr}
-    --with-apr-util=${aprutil}
-    --with-z=${zlib}
-    --with-pcre=${pcre}
+    --with-apr=${apr.dev}
+    --with-apr-util=${aprutil.dev}
+    --with-z=${zlib.dev}
+    --with-pcre=${pcre.dev}
     --disable-maintainer-mode
     --disable-debugger-mode
     --enable-mods-shared=all
diff --git a/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix b/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix
index 90d0fb899c3..dee2fb3e4ff 100644
--- a/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix
+++ b/pkgs/servers/http/apache-modules/tomcat-connectors/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "11khipjpy3y84j1pp7yyx76y64jccvyhh3klwzqxylff49vjc2fc";
   };
 
-  configureFlags = "--with-apxs=${apacheHttpd}/bin/apxs --with-java-home=${jdk}";
+  configureFlags = "--with-apxs=${apacheHttpd.dev}/bin/apxs --with-java-home=${jdk}";
 
   sourceRoot = "${name}-src/native";
 
diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix
index f58479e4478..888efc006d0 100644
--- a/pkgs/servers/http/nginx/modules.nix
+++ b/pkgs/servers/http/nginx/modules.nix
@@ -55,7 +55,7 @@
     src = "${pkgs.modsecurity_standalone.nginx}/nginx/modsecurity";
     inputs = [ pkgs.curl pkgs.apr pkgs.aprutil pkgs.apacheHttpd pkgs.yajl ];
     preConfigure = ''
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.aprutil}/include/apr-1 -I${pkgs.apacheHttpd}/include -I${pkgs.apr}/include/apr-1 -I${pkgs.yajl}/include"
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pkgs.aprutil.dev}/include/apr-1 -I${pkgs.apacheHttpd.dev}/include -I${pkgs.apr.dev}/include/apr-1 -I${pkgs.yajl}/include"
     '';
   };
 
diff --git a/pkgs/servers/irc/charybdis/default.nix b/pkgs/servers/irc/charybdis/default.nix
index c8368fa9524..df4250c81fa 100644
--- a/pkgs/servers/irc/charybdis/default.nix
+++ b/pkgs/servers/irc/charybdis/default.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--enable-epoll"
     "--enable-ipv6"
-    "--enable-openssl=${openssl}"
+    "--enable-openssl=${openssl.dev}"
     "--with-program-prefix=charybdis-"
   ];
 
diff --git a/pkgs/servers/irc/ircd-hybrid/default.nix b/pkgs/servers/irc/ircd-hybrid/default.nix
index 512cee4b016..603c765854f 100644
--- a/pkgs/servers/irc/ircd-hybrid/default.nix
+++ b/pkgs/servers/irc/ircd-hybrid/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
   buildInputs = [ openssl zlib ];
 
   configureFlags =
-    "--with-nicklen=100 --with-topiclen=360 --enable-openssl=${openssl}";
+    "--with-nicklen=100 --with-topiclen=360 --enable-openssl=${openssl.dev}";
 
   postInstall = "echo postinstall; mkdir -p \${out}/ ; rm -rf \${out}/logs ; ln -s /home/ircd \${out}/logs;";
 
diff --git a/pkgs/servers/ldap/389/default.nix b/pkgs/servers/ldap/389/default.nix
index 95dc5ab8679..39667c8ba62 100644
--- a/pkgs/servers/ldap/389/default.nix
+++ b/pkgs/servers/ldap/389/default.nix
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
     "--localstatedir=/var"
     "--with-openldap"
     "--with-db=${db}"
-    "--with-sasl=${cyrus_sasl}"
+    "--with-sasl=${cyrus_sasl.dev}"
     "--with-netsnmp=${net_snmp}"
   ];
   
diff --git a/pkgs/servers/mail/opensmtpd/extras.nix b/pkgs/servers/mail/opensmtpd/extras.nix
index 0123d19bf3f..cf93b11ba9a 100644
--- a/pkgs/servers/mail/opensmtpd/extras.nix
+++ b/pkgs/servers/mail/opensmtpd/extras.nix
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
     "--sysconfdir=/etc"
     "--localstatedir=/var"
     "--with-privsep-user=smtpd"
-    "--with-libevent-dir=${libevent}"
+    "--with-libevent-dir=${libevent.dev}"
 
     "--with-filter-clamav"
     "--with-filter-dkim-signer"
diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix
index 75685d7605e..d75e2e05935 100644
--- a/pkgs/servers/mail/postfix/default.nix
+++ b/pkgs/servers/mail/postfix/default.nix
@@ -7,7 +7,7 @@
 
 let
   ccargs = lib.concatStringsSep " " ([
-    "-DUSE_TLS" "-DUSE_SASL_AUTH" "-DUSE_CYRUS_SASL" "-I${cyrus_sasl}/include/sasl"
+    "-DUSE_TLS" "-DUSE_SASL_AUTH" "-DUSE_CYRUS_SASL" "-I${cyrus_sasl.dev}/include/sasl"
     "-DHAS_DB_BYPASS_MAKEDEFS_CHECK"
     "-fPIE" "-fstack-protector-all" "--param" "ssp-buffer-size=4" "-O2" "-D_FORTIFY_SOURCE=2"
    ] ++ lib.optional withPgSQL "-DHAS_PGSQL"
diff --git a/pkgs/servers/monitoring/net-snmp/default.nix b/pkgs/servers/monitoring/net-snmp/default.nix
index 816ac1bdb25..6da7d8cf85b 100644
--- a/pkgs/servers/monitoring/net-snmp/default.nix
+++ b/pkgs/servers/monitoring/net-snmp/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
       "--with-sys-contact=root@unknown"
       "--with-logfile=/var/log/net-snmpd.log"
       "--with-persistent-directory=/var/lib/net-snmp"
-      "--with-openssl=${openssl}"
+      "--with-openssl=${openssl.dev}"
     ] ++ stdenv.lib.optional stdenv.isLinux "--with-mnttab=/proc/mounts";
 
   buildInputs = [ autoreconfHook file perl unzip openssl ];
diff --git a/pkgs/servers/monitoring/zabbix/2.2.nix b/pkgs/servers/monitoring/zabbix/2.2.nix
index 139786ba59d..2ebc8026484 100644
--- a/pkgs/servers/monitoring/zabbix/2.2.nix
+++ b/pkgs/servers/monitoring/zabbix/2.2.nix
@@ -46,8 +46,8 @@ in
     ]
     ++ stdenv.lib.optional enableJabber "--with-jabber=${minmay}"
     ++ stdenv.lib.optional enableSnmp "--with-net-snmp"
-    ++ stdenv.lib.optional enableSsh "--with-ssh2=${libssh2}"
-    ++ stdenv.lib.optional enableLdap "--with-ldap=${openldap}";
+    ++ stdenv.lib.optional enableSsh "--with-ssh2=${libssh2.dev}"
+    ++ stdenv.lib.optional enableLdap "--with-ldap=${openldap.dev}";
 
     postPatch = ''
       sed -i -e 's/iksemel/minmay/g' configure src/libs/zbxmedia/jabber.c
diff --git a/pkgs/servers/openxpki/default.nix b/pkgs/servers/openxpki/default.nix
index 12ed3f56d9f..777ad9407c7 100644
--- a/pkgs/servers/openxpki/default.nix
+++ b/pkgs/servers/openxpki/default.nix
@@ -51,7 +51,7 @@ buildPerlPackage {
 
   preConfigure = ''
     substituteInPlace core/server/Makefile.PL \
-      --replace "my \$openssl_inc_dir = ''';" "my \$openssl_inc_dir = '${openssl}/include';" \
+      --replace "my \$openssl_inc_dir = ''';" "my \$openssl_inc_dir = '${openssl.dev}/include';" \
       --replace "my \$openssl_lib_dir = ''';" "my \$openssl_lib_dir = '${openssl.out}/lib';" \
       --replace "my \$openssl_binary  = ''';" "my \$openssl_binary  = '${openssl.bin}/bin/openssl';"
     substituteInPlace tools/vergen --replace "#!/usr/bin/perl" "#!${perl}/bin/perl"
diff --git a/pkgs/servers/sql/mysql/5.1.x.nix b/pkgs/servers/sql/mysql/5.1.x.nix
index caf6149e62c..017c99b01d0 100644
--- a/pkgs/servers/sql/mysql/5.1.x.nix
+++ b/pkgs/servers/sql/mysql/5.1.x.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--enable-thread-safe-client"
-    "--with-ssl=${openssl}"
+    "--with-ssl=${openssl.dev}"
     "--with-embedded-server"
     "--with-plugins=max-no-ndb"
     "--with-unix-socket-path=/run/mysqld/mysqld.sock"
diff --git a/pkgs/servers/sql/virtuoso/6.x.nix b/pkgs/servers/sql/virtuoso/6.x.nix
index 4de0ace0c03..aba8efa0798 100644
--- a/pkgs/servers/sql/virtuoso/6.x.nix
+++ b/pkgs/servers/sql/virtuoso/6.x.nix
@@ -13,9 +13,9 @@ stdenv.mkDerivation rec {
   CPP = "${stdenv.cc}/bin/gcc -E";
 
   configureFlags = "
-    --enable-shared --disable-all-vads --with-readline=${readline}
+    --enable-shared --disable-all-vads --with-readline=${readline.dev}
     --disable-hslookup --disable-wbxml2 --without-iodbc
-    --enable-openssl=${openssl}
+    --enable-openssl=${openssl.dev}
     ";
 
   postInstall=''
diff --git a/pkgs/servers/sql/virtuoso/7.x.nix b/pkgs/servers/sql/virtuoso/7.x.nix
index de610f9a729..192bdc9dcb1 100644
--- a/pkgs/servers/sql/virtuoso/7.x.nix
+++ b/pkgs/servers/sql/virtuoso/7.x.nix
@@ -13,9 +13,9 @@ stdenv.mkDerivation rec {
   CPP = "${stdenv.cc}/bin/gcc -E";
 
   configureFlags = "
-    --enable-shared --disable-all-vads --with-readline=${readline}
+    --enable-shared --disable-all-vads --with-readline=${readline.dev}
     --disable-hslookup --disable-wbxml2 --without-iodbc
-    --enable-openssl=${openssl}
+    --enable-openssl=${openssl.dev}
     ";
 
   postInstall=''
diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix
index 974a636e559..ef7d64b3e78 100644
--- a/pkgs/servers/xmpp/ejabberd/default.nix
+++ b/pkgs/servers/xmpp/ejabberd/default.nix
@@ -90,7 +90,7 @@ in stdenv.mkDerivation rec {
       (lib.enableFeature withIconv "iconv")
       (lib.enableFeature withTools "tools")
       (lib.enableFeature withRedis "redis")
-    ] ++ lib.optional withSqlite "--with-sqlite3=${sqlite}";
+    ] ++ lib.optional withSqlite "--with-sqlite3=${sqlite.dev}";
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/tools/backup/attic/default.nix b/pkgs/tools/backup/attic/default.nix
index 4f659428c00..a639dbb2fd2 100644
--- a/pkgs/tools/backup/attic/default.nix
+++ b/pkgs/tools/backup/attic/default.nix
@@ -15,7 +15,7 @@ python3Packages.buildPythonApplication rec {
     [ cython msgpack openssl acl llfuse ];
 
   preConfigure = ''
-    export ATTIC_OPENSSL_PREFIX="${openssl}"
+    export ATTIC_OPENSSL_PREFIX="${openssl.dev}"
     substituteInPlace setup.py --replace "version=versioneer.get_version()" "version='${version}'"
   '';
 
diff --git a/pkgs/tools/backup/bacula/default.nix b/pkgs/tools/backup/bacula/default.nix
index 8d586e5cb1f..374122814c5 100644
--- a/pkgs/tools/backup/bacula/default.nix
+++ b/pkgs/tools/backup/bacula/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional (!stdenv.isDarwin) acl;
 
   configureFlags = [ 
-    "--with-sqlite3=${sqlite}" 
+    "--with-sqlite3=${sqlite.dev}"
     "--with-postgresql=${postgresql}"
   ];
 
diff --git a/pkgs/tools/backup/bareos/default.nix b/pkgs/tools/backup/bareos/default.nix
index 5a7c35e460f..cf44d0e9c26 100644
--- a/pkgs/tools/backup/bareos/default.nix
+++ b/pkgs/tools/backup/bareos/default.nix
@@ -50,13 +50,13 @@ stdenv.mkDerivation rec {
     "--enable-dynamic-cats-backends"
     "--enable-sql-pooling"
     "--enable-scsi-crypto"
-  ] ++ optionals (readline != null) [ "--disable-conio" "--enable-readline" "--with-readline=${readline}" ]
+  ] ++ optionals (readline != null) [ "--disable-conio" "--enable-readline" "--with-readline=${readline.dev}" ]
     ++ optional (python != null) "--with-python=${python}"
-    ++ optional (openssl != null) "--with-openssl=${openssl}"
-    ++ optional (sqlite != null) "--with-sqlite3=${sqlite}"
+    ++ optional (openssl != null) "--with-openssl=${openssl.dev}"
+    ++ optional (sqlite != null) "--with-sqlite3=${sqlite.dev}"
     ++ optional (postgresql != null) "--with-postgresql=${postgresql}"
     ++ optional (libmysql != null) "--with-mysql=${libmysql}"
-    ++ optional (zlib != null) "--with-zlib=${zlib}"
+    ++ optional (zlib != null) "--with-zlib=${zlib.dev}"
     ++ optional (lzo != null) "--with-lzo=${lzo}"
     ++ optional (jansson != null) "--with-jansson=${jansson}"
     ++ optional (acl != null) "--enable-acl"
diff --git a/pkgs/tools/backup/borg/default.nix b/pkgs/tools/backup/borg/default.nix
index 95c0c26f30b..e736583a084 100644
--- a/pkgs/tools/backup/borg/default.nix
+++ b/pkgs/tools/backup/borg/default.nix
@@ -21,7 +21,7 @@ python3Packages.buildPythonApplication rec {
   ]);
 
   preConfigure = ''
-    export BORG_OPENSSL_PREFIX="${openssl}"
+    export BORG_OPENSSL_PREFIX="${openssl.dev}"
     export BORG_LZ4_PREFIX="${lz4}"
   '';
 
diff --git a/pkgs/tools/backup/partimage/default.nix b/pkgs/tools/backup/partimage/default.nix
index 37d99a115f8..e73e71da51a 100644
--- a/pkgs/tools/backup/partimage/default.nix
+++ b/pkgs/tools/backup/partimage/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
     url = mirror://sourceforge/partimage/partimage-0.6.9.tar.bz2;
     sha256 = "0db6xiphk6xnlpbxraiy31c5xzj0ql6k4rfkmqzh665yyj0nqfkm";
   };
-  configureFlags = "--with-ssl-headers=${openssl}/include/openssl";
+  configureFlags = "--with-ssl-headers=${openssl.dev}/include/openssl";
 
   buildInputs = [bzip2 zlib newt newt openssl pkgconfig slang
     # automake autoconf libtool gettext
diff --git a/pkgs/tools/filesystems/netatalk/default.nix b/pkgs/tools/filesystems/netatalk/default.nix
index 7e4ea032bb3..e3c608285fc 100644
--- a/pkgs/tools/filesystems/netatalk/default.nix
+++ b/pkgs/tools/filesystems/netatalk/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec{
 
   configureFlags = [
     "--with-bdb=${db}"
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
     "--with-lockfile=/run/lock/netatalk"
     "--localstatedir=/var/lib"
   ];
diff --git a/pkgs/tools/filesystems/xtreemfs/default.nix b/pkgs/tools/filesystems/xtreemfs/default.nix
index bbd4b185d5e..fb491948a47 100644
--- a/pkgs/tools/filesystems/xtreemfs/default.nix
+++ b/pkgs/tools/filesystems/xtreemfs/default.nix
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
 
     export BOOST_INCLUDEDIR=${boost.dev}/include
     export BOOST_LIBRARYDIR=${boost.out}/lib
-    export OPENSSL_ROOT_DIR=${openssl}
+    export OPENSSL_ROOT_DIR=${openssl.dev}
 
     substituteInPlace cpp/cmake/FindValgrind.cmake \
       --replace "/usr/local" "${valgrind}"
diff --git a/pkgs/tools/graphics/asymptote/default.nix b/pkgs/tools/graphics/asymptote/default.nix
index 971a7e973cc..7d191ccaba5 100644
--- a/pkgs/tools/graphics/asymptote/default.nix
+++ b/pkgs/tools/graphics/asymptote/default.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation {
     configureFlags="$configureFlags --with-latex=$out/share/texmf/tex/latex --with-context=$out/share/texmf/tex/context/third"
   '';
 
-  NIX_CFLAGS_COMPILE = [ "-I${boehmgc}/include/gc" ];
+  NIX_CFLAGS_COMPILE = [ "-I${boehmgc.dev}/include/gc" ];
 
   postInstall = ''
     mv -v "$out/share/info/asymptote/"*.info $out/share/info/
diff --git a/pkgs/tools/graphics/graphviz/2.0.nix b/pkgs/tools/graphics/graphviz/2.0.nix
index 02b700111de..0a11c3c8b28 100644
--- a/pkgs/tools/graphics/graphviz/2.0.nix
+++ b/pkgs/tools/graphics/graphviz/2.0.nix
@@ -15,11 +15,11 @@ stdenv.mkDerivation rec {
   buildInputs = [pkgconfig xlibsWrapper libpng libjpeg expat libXaw yacc libtool fontconfig pango gd];
   
   configureFlags =
-    [ "--with-pngincludedir=${libpng}/include"
+    [ "--with-pngincludedir=${libpng.dev}/include"
       "--with-pnglibdir=${libpng.out}/lib"
-      "--with-jpegincludedir=${libjpeg}/include"
+      "--with-jpegincludedir=${libjpeg.dev}/include"
       "--with-jpeglibdir=${libjpeg.out}/lib"
-      "--with-expatincludedir=${expat}/include"
+      "--with-expatincludedir=${expat.dev}/include"
       "--with-expatlibdir=${expat.out}/lib"
     ]
     ++ stdenv.lib.optional (xlibsWrapper == null) "--without-x";
diff --git a/pkgs/tools/graphics/graphviz/2.32.nix b/pkgs/tools/graphics/graphviz/2.32.nix
index 8a720562167..695ac898fe8 100644
--- a/pkgs/tools/graphics/graphviz/2.32.nix
+++ b/pkgs/tools/graphics/graphviz/2.32.nix
@@ -20,11 +20,11 @@ stdenv.mkDerivation rec {
   CPPFLAGS = stdenv.lib.optionalString (stdenv.system == "x86_64-darwin") "-I${cairo.dev}/include/cairo";
 
   configureFlags =
-    [ "--with-pngincludedir=${libpng}/include"
+    [ "--with-pngincludedir=${libpng.dev}/include"
       "--with-pnglibdir=${libpng.out}/lib"
-      "--with-jpegincludedir=${libjpeg}/include"
+      "--with-jpegincludedir=${libjpeg.dev}/include"
       "--with-jpeglibdir=${libjpeg.out}/lib"
-      "--with-expatincludedir=${expat}/include"
+      "--with-expatincludedir=${expat.dev}/include"
       "--with-expatlibdir=${expat.out}/lib"
       "--with-cgraph=no"
       "--with-sparse=no"
diff --git a/pkgs/tools/graphics/netpbm/default.nix b/pkgs/tools/graphics/netpbm/default.nix
index 4a52434d379..bebf7680ded 100644
--- a/pkgs/tools/graphics/netpbm/default.nix
+++ b/pkgs/tools/graphics/netpbm/default.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
     echo "STATICLIB_TOO = n" >> config.mk
     substituteInPlace "config.mk" \
         --replace "TIFFLIB = NONE" "TIFFLIB = ${libtiff.out}/lib/libtiff.so" \
-        --replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff}/include"
+        --replace "TIFFHDR_DIR =" "TIFFHDR_DIR = ${libtiff.dev}/include"
   '';
 
   preBuild = ''
diff --git a/pkgs/tools/misc/heimdall/default.nix b/pkgs/tools/misc/heimdall/default.nix
index f84ccce4eb9..09018108d89 100644
--- a/pkgs/tools/misc/heimdall/default.nix
+++ b/pkgs/tools/misc/heimdall/default.nix
@@ -18,9 +18,9 @@ stdenv.mkDerivation {
   '';
   enableParallelBuilding = true;
   cmakeFlags = [
-    "-DQt5Widgets_DIR=${qt5.qtbase}/lib/cmake/Qt5Widgets"
-    "-DQt5Gui_DIR=${qt5.qtbase}/lib/cmake/Qt5Gui"
-    "-DQt5Core_DIR=${qt5.qtbase}/lib/cmake/Qt5Core"
+    "-DQt5Widgets_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Widgets"
+    "-DQt5Gui_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Gui"
+    "-DQt5Core_DIR=${qt5.qtbase.dev}/lib/cmake/Qt5Core"
     "-DBUILD_TYPE=Release"
   ];
 
diff --git a/pkgs/tools/misc/kde-gtk-config/default.nix b/pkgs/tools/misc/kde-gtk-config/default.nix
index bf868790de2..41aaad55346 100644
--- a/pkgs/tools/misc/kde-gtk-config/default.nix
+++ b/pkgs/tools/misc/kde-gtk-config/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
   cmakeFlags = ''
     -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include
     -DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include
-    -DGTK2_INCLUDE_DIRS=${gtk2}/include/gtk-2.0
+    -DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0
     -DKDE4_LIBEXEC_INSTALL_DIR=lib/kde4/libexec
   '';
 
diff --git a/pkgs/tools/misc/most/default.nix b/pkgs/tools/misc/most/default.nix
index b97d8f0b719..1c1def9b8a8 100644
--- a/pkgs/tools/misc/most/default.nix
+++ b/pkgs/tools/misc/most/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
       -e "s|/bin/rm|rm|"
   '';
   
-  configureFlags = "--with-slang=${slang}";
+  configureFlags = "--with-slang=${slang.dev}";
 
   buildInputs = [ slang ncurses ];
 
diff --git a/pkgs/tools/misc/pk2cmd/default.nix b/pkgs/tools/misc/pk2cmd/default.nix
index 3501090c63c..2f69517e4bd 100644
--- a/pkgs/tools/misc/pk2cmd/default.nix
+++ b/pkgs/tools/misc/pk2cmd/default.nix
@@ -9,7 +9,7 @@ stdenv.mkDerivation {
     sha256 = "1yjpi2qshnqfpan4w3ggakkr3znfrx5cxkny92ka7v9na3g2fc4h";
   };
 
-  makeFlags = [ "LIBUSB=${libusb}" "linux" ];
+  makeFlags = [ "LIBUSB=${libusb.dev}" "linux" ];
 
   installPhase = ''
     mkdir -p $out/bin $out/share/pk2
diff --git a/pkgs/tools/misc/ttf2pt1/default.nix b/pkgs/tools/misc/ttf2pt1/default.nix
index 5a03e099539..da0c966eb5e 100644
--- a/pkgs/tools/misc/ttf2pt1/default.nix
+++ b/pkgs/tools/misc/ttf2pt1/default.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation {
     mkdir -p $out
     sed -e 's/chown/true/' \
         -e 's/chgrp/true/' \
-        -e 's@^CFLAGS_FT =.*@CFLAGS_FT=-DUSE_FREETYPE -I${freetype}/include/freetype2@' \
+        -e 's@^CFLAGS_FT =.*@CFLAGS_FT=-DUSE_FREETYPE -I${freetype.dev}/include/freetype2@' \
         -i scripts/{inst_dir,inst_file} Makefile
     makeFlags="INSTDIR=$out OWNER=`id -u`"
   '';
diff --git a/pkgs/tools/networking/curl/7.15.nix b/pkgs/tools/networking/curl/7.15.nix
index 56046d5423d..c3c16cc08b4 100644
--- a/pkgs/tools/networking/curl/7.15.nix
+++ b/pkgs/tools/networking/curl/7.15.nix
@@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
       "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt"
-      ( if sslSupport then "--with-ssl=${openssl}" else "--without-ssl" )
-      ( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" )
+      ( if sslSupport then "--with-ssl=${openssl.dev}" else "--without-ssl" )
+      ( if scpSupport then "--with-libssh2=${libssh2.dev}" else "--without-libssh2" )
     ]
     ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
     ++ stdenv.lib.optional gssSupport "--with-gssapi=${gss}"
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index 47f03cc3747..f2e6117966f 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -51,11 +51,11 @@ stdenv.mkDerivation rec {
   configureFlags = [
       "--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt"
       "--disable-manual"
-      ( if sslSupport then "--with-ssl=${openssl}" else "--without-ssl" )
-      ( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" )
+      ( if sslSupport then "--with-ssl=${openssl.dev}" else "--without-ssl" )
+      ( if scpSupport then "--with-libssh2=${libssh2.dev}" else "--without-libssh2" )
       ( if ldapSupport then "--enable-ldap" else "--disable-ldap" )
       ( if ldapSupport then "--enable-ldaps" else "--disable-ldaps" )
-      ( if idnSupport then "--with-libidn=${libidn}" else "--without-libidn" )
+      ( if idnSupport then "--with-libidn=${libidn.dev}" else "--without-libidn" )
     ]
     ++ stdenv.lib.optional c-aresSupport "--enable-ares=${c-ares}"
     ++ stdenv.lib.optional gssSupport "--with-gssapi=${gss}";
diff --git a/pkgs/tools/networking/keepalived/default.nix b/pkgs/tools/networking/keepalived/default.nix
index bc0085a731e..1d0c9d55076 100644
--- a/pkgs/tools/networking/keepalived/default.nix
+++ b/pkgs/tools/networking/keepalived/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
   '';
 
   # It doesn't know about the include/libnl<n> directory
-  NIX_CFLAGS_COMPILE="-I${libnl}/include/libnl3";
+  NIX_CFLAGS_COMPILE="-I${libnl.dev}/include/libnl3";
   NIX_LDFLAGS="-lnl-3 -lnl-genl-3";
 
   configureFlags = [
diff --git a/pkgs/tools/networking/mailsend/default.nix b/pkgs/tools/networking/mailsend/default.nix
index 363c22c8bb8..b5fc484e6b1 100644
--- a/pkgs/tools/networking/mailsend/default.nix
+++ b/pkgs/tools/networking/mailsend/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
     inherit (s) url sha256;
   };
   configureFlags = [
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
   ];
   meta = {
     inherit (s) version;
diff --git a/pkgs/tools/networking/sstp/default.nix b/pkgs/tools/networking/sstp/default.nix
index ed28db45f10..6dbd6267993 100644
--- a/pkgs/tools/networking/sstp/default.nix
+++ b/pkgs/tools/networking/sstp/default.nix
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
     '';
 
   configureFlags = [
-    "--with-openssl=${openssl}"
+    "--with-openssl=${openssl.dev}"
     "--with-runtime-dir=/run/sstpc"
     "--with-pppd-plugin-dir=$(out)/lib/pppd"
   ];
diff --git a/pkgs/tools/networking/stunnel/default.nix b/pkgs/tools/networking/stunnel/default.nix
index e8b56ed7d96..96169ab294c 100644
--- a/pkgs/tools/networking/stunnel/default.nix
+++ b/pkgs/tools/networking/stunnel/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ openssl ];
   configureFlags = [
-    "--with-ssl=${openssl}"
+    "--with-ssl=${openssl.dev}"
     "--sysconfdir=/etc"
     "--localstatedir=/var"
   ];
diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix
index f639044a195..684b9b13a80 100644
--- a/pkgs/tools/networking/unbound/default.nix
+++ b/pkgs/tools/networking/unbound/default.nix
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
 
   configureFlags = [
     "--with-ssl=${openssl.dev}"
-    "--with-libexpat=${expat}"
+    "--with-libexpat=${expat.dev}"
     "--with-libevent=${libevent.dev}"
     "--localstatedir=/var"
     "--sysconfdir=/etc"
diff --git a/pkgs/tools/networking/uwimap/default.nix b/pkgs/tools/networking/uwimap/default.nix
index e2c83bcb975..9d4ae5d671a 100644
--- a/pkgs/tools/networking/uwimap/default.nix
+++ b/pkgs/tools/networking/uwimap/default.nix
@@ -18,13 +18,13 @@ stdenv.mkDerivation {
     ++ stdenv.lib.optional (!stdenv.isDarwin) pam;
 
   patchPhase = ''
-    sed -i src/osdep/unix/Makefile -e 's,/usr/local/ssl,${openssl},'
+    sed -i src/osdep/unix/Makefile -e 's,/usr/local/ssl,${openssl.dev},'
     sed -i src/osdep/unix/Makefile -e 's,^SSLCERTS=.*,SSLCERTS=/etc/ssl/certs,'
     sed -i src/osdep/unix/Makefile -e 's,^SSLLIB=.*,SSLLIB=${openssl.out}/lib,'
   '';
 
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin
-    "-I${openssl}/include/openssl";
+    "-I${openssl.dev}/include/openssl";
 
   installPhase = ''
     mkdir -p $out/bin $out/lib $out/include
diff --git a/pkgs/tools/networking/vtun/default.nix b/pkgs/tools/networking/vtun/default.nix
index e14326fe9e6..b0397149e60 100644
--- a/pkgs/tools/networking/vtun/default.nix
+++ b/pkgs/tools/networking/vtun/default.nix
@@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
 
   configureFlags = ''
     --with-lzo-headers=${lzo}/include/lzo
-    --with-ssl-headers=${openssl}/include/openssl
-    --with-blowfish-headers=${openssl}/include/openssl'';
+    --with-ssl-headers=${openssl.dev}/include/openssl
+    --with-blowfish-headers=${openssl.dev}/include/openssl'';
 
   meta = with stdenv.lib; {
       description = "Virtual Tunnels over TCP/IP with traffic shaping, compression and encryption";
diff --git a/pkgs/tools/security/clamav/default.nix b/pkgs/tools/security/clamav/default.nix
index bebb8a95a58..e62cce9e4e3 100644
--- a/pkgs/tools/security/clamav/default.nix
+++ b/pkgs/tools/security/clamav/default.nix
@@ -13,14 +13,14 @@ stdenv.mkDerivation rec {
   buildInputs = [ zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre ];
 
   configureFlags = [
-    "--with-zlib=${zlib}"
-    "--with-libbz2-prefix=${bzip2}"
+    "--with-zlib=${zlib.dev}"
+    "--with-libbz2-prefix=${bzip2.dev}"
     "--with-iconv-dir=${libiconv}"
     "--with-xml=${libxml2}"
-    "--with-openssl=${openssl}"
-    "--with-libncurses-prefix=${ncurses}"
-    "--with-libcurl=${curl}"
-    "--with-pcre=${pcre}"
+    "--with-openssl=${openssl.dev}"
+    "--with-libncurses-prefix=${ncurses.dev}"
+    "--with-libcurl=${curl.dev}"
+    "--with-pcre=${pcre.dev}"
     "--enable-milter"
     "--disable-clamav"
   ];
diff --git a/pkgs/tools/security/duo-unix/default.nix b/pkgs/tools/security/duo-unix/default.nix
index a3aa417a4ea..af5e72faca4 100644
--- a/pkgs/tools/security/duo-unix/default.nix
+++ b/pkgs/tools/security/duo-unix/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     [ "--with-pam=$(out)/lib/security"
       "--prefix=$(out)"
       "--sysconfdir=$(out)/etc/duo"
-      "--with-openssl=${openssl}"
+      "--with-openssl=${openssl.dev}"
       "--enable-lib64=no"
     ];
 
diff --git a/pkgs/tools/security/modsecurity/default.nix b/pkgs/tools/security/modsecurity/default.nix
index 09754f53a9e..0b6900fb214 100644
--- a/pkgs/tools/security/modsecurity/default.nix
+++ b/pkgs/tools/security/modsecurity/default.nix
@@ -17,11 +17,11 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--enable-standalone-module"
     "--enable-static"
-    "--with-curl=${curl}"
-    "--with-apxs=${apacheHttpd}/bin/apxs"
-    "--with-pcre=${pcre}"
-    "--with-apr=${apr}"
-    "--with-apu=${aprutil}/bin/apu-1-config"
+    "--with-curl=${curl.dev}"
+    "--with-apxs=${apacheHttpd.dev}/bin/apxs"
+    "--with-pcre=${pcre.dev}"
+    "--with-apr=${apr.dev}"
+    "--with-apu=${aprutil.dev}/bin/apu-1-config"
     "--with-libxml=${libxml2}"
   ];
 
diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix
index 0ee32a49c07..66a2703932d 100644
--- a/pkgs/tools/system/monit/default.nix
+++ b/pkgs/tools/system/monit/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   buildInputs = [ openssl ] ++ stdenv.lib.optionals usePAM [ pam ];
 
   configureFlags = [
-    "--with-ssl-incl-dir=${openssl}/include"
+    "--with-ssl-incl-dir=${openssl.dev}/include"
     "--with-ssl-lib-dir=${openssl.out}/lib"
   ] ++ stdenv.lib.optionals (! usePAM) [ "--without-pam" ];
 
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix
index 8578960b987..c7e0857c2ca 100644
--- a/pkgs/tools/text/gawk/default.nix
+++ b/pkgs/tools/text/gawk/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional stdenv.isDarwin locale;
 
   configureFlags = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") "--with-libsigsegv-prefix=${libsigsegv}"
-    ++ [(if interactive then "--with-readline=${readline}" else "--without-readline")];
+    ++ [(if interactive then "--with-readline=${readline.dev}" else "--without-readline")];
 
   postInstall = "rm $out/bin/gawk-*";
 
diff --git a/pkgs/tools/text/xml/xmlstarlet/default.nix b/pkgs/tools/text/xml/xmlstarlet/default.nix
index 74f7e08900a..b390a9c404a 100644
--- a/pkgs/tools/text/xml/xmlstarlet/default.nix
+++ b/pkgs/tools/text/xml/xmlstarlet/default.nix
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
 
   preConfigure =
     ''
-      export LIBXSLT_PREFIX=${libxslt}
+      export LIBXSLT_PREFIX=${libxslt.dev}
       export LIBXML_PREFIX=${libxml2}
       export LIBXSLT_LIBS=$(pkg-config --libs libxslt libexslt)
       export LIBXML_LIBS=$(pkg-config --libs libxml-2.0)
diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix
index abd4a812341..980c0aca633 100644
--- a/pkgs/top-level/lua-packages.nix
+++ b/pkgs/top-level/lua-packages.nix
@@ -271,7 +271,7 @@ let
     buildPhase = let
       luaVariable = "LUA_PATH=${luastdlib}/share/lua/${lua.luaversion}/?.lua";
 
-      pcreVariable = "PCRE_DIR=${pcre}";
+      pcreVariable = "PCRE_DIR=${pcre.dev}";
       onigVariable = "ONIG_DIR=${oniguruma}";
       gnuVariable = "GNU_INCDIR=${gnulib}/lib";
       treVariable = "TRE_DIR=${tre}";
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 1954301077f..d70be1f9f81 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -2032,7 +2032,7 @@ let self = _self // overrides; _self = with self; {
     # Don't build a private copy of bzip2.
     BUILD_BZIP2 = false;
     BZIP2_LIB = "${pkgs.bzip2.out}/lib";
-    BZIP2_INCLUDE = "${pkgs.bzip2}/include";
+    BZIP2_INCLUDE = "${pkgs.bzip2.dev}/include";
 
     meta = {
       homepage = http://search.cpan.org/perldoc?CPAN::Meta::Spec;
@@ -2584,7 +2584,7 @@ let self = _self // overrides; _self = with self; {
       url = "mirror://cpan/authors/id/T/TT/TTAR/${name}.tar.gz";
       sha256 = "b66fab514edf97fc32f58da257582704a210c2b35e297d5c31b7fa2ffd08e908";
     };
-    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl}/include";
+    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
     NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
     meta = with stdenv.lib; {
       homepage = https://metacpan.org/release/Crypt-OpenSSL-AES;
@@ -2601,7 +2601,7 @@ let self = _self // overrides; _self = with self; {
       url    = "mirror://cpan/authors/id/I/IR/IROBERTS/${name}.tar.gz";
       sha256 = "18vg2bqyhc0ahfdh5dkbgph5nh92qcz5vi99jq8aam4h86if78bk";
     };
-    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl}/include";
+    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
     NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
   };
 
@@ -2611,7 +2611,7 @@ let self = _self // overrides; _self = with self; {
       url = "mirror://cpan/authors/id/R/RU/RURBAN/${name}.tar.gz";
       sha256 = "12pirh1pj8lpvzcwj2if9i6dbr6a7s9g1zc7gzbd3v87d6mx0rdf";
     };
-    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl}/include";
+    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
     NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
   };
 
@@ -2622,7 +2622,7 @@ let self = _self // overrides; _self = with self; {
       sha256 = "5357f977464bb3a8184cf2d3341851a10d5515b4b2b0dfb88bf78995c0ded7be";
     };
     propagatedBuildInputs = [ CryptOpenSSLRandom ];
-    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl}/include";
+    NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include";
     NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto";
   };
 
@@ -2632,7 +2632,7 @@ let self = _self // overrides; _self = with self; {
       url = "mirror://cpan/authors/id/N/NA/NANIS/${name}.tar.gz";
       sha256 = "1s7zm6ph37kg8jzaxnhi4ff4snxl7mi5h14arxbri0kp6s0lzlzm";
     };
-    makeMakerFlags = "--libpath=${pkgs.openssl.out}/lib --incpath=${pkgs.openssl}/include";
+    makeMakerFlags = "--libpath=${pkgs.openssl.out}/lib --incpath=${pkgs.openssl.dev}/include";
     buildInputs = [ PathClass TryTiny ];
   };
 
@@ -6750,7 +6750,7 @@ let self = _self // overrides; _self = with self; {
     };
     buildInputs = [ ApacheTest ExtUtilsXSBuilder mod_perl2 pkgs.apacheHttpd pkgs.apr pkgs.aprutil ];
     propagatedBuildInputs = [ mod_perl2 ];
-    makeMakerFlags = "--with-apache2-src=${pkgs.apacheHttpd} --with-apache2-apxs=${pkgs.apacheHttpd}/bin/apxs --with-apache2-httpd=${pkgs.apacheHttpd.out}/bin/httpd --with-apr-config=${pkgs.apr}/bin/apr-1-config --with-apu-config=${pkgs.aprutil}/bin/apu-1-config";
+    makeMakerFlags = "--with-apache2-src=${pkgs.apacheHttpd.dev} --with-apache2-apxs=${pkgs.apacheHttpd.dev}/bin/apxs --with-apache2-httpd=${pkgs.apacheHttpd.out}/bin/httpd --with-apr-config=${pkgs.apr.dev}/bin/apr-1-config --with-apu-config=${pkgs.aprutil.dev}/bin/apu-1-config";
     preConfigure = ''
       # override broken prereq check
       substituteInPlace configure --replace "prereq_check=\"\$PERL \$PERL_OPTS build/version_check.pl\"" "prereq_check=\"echo\""
@@ -6761,7 +6761,7 @@ let self = _self // overrides; _self = with self; {
     installPhase = ''
       mkdir $out
       make install DESTDIR=$out
-      cp -r $out/${pkgs.apacheHttpd}/. $out/.
+      cp -r $out/${pkgs.apacheHttpd.dev}/. $out/.
       cp -r $out/$out/. $out/.
       rm -r $out/nix
       '';
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index 70006922079..c0248644d5e 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -45,7 +45,7 @@ let
 
     sha256 = "04c35rj0cvq5ygn2jgmyvqcb0k8d03v4k642b6i37zgv7x15pbic";
 
-    configureFlags = "--with-zlib-dir=${pkgs.zlib}";
+    configureFlags = "--with-zlib-dir=${pkgs.zlib.dev}";
   };
 
   memcached = if isPhp7 then memcachedPhp7 else memcached22;
@@ -56,7 +56,7 @@ let
     sha256 = "0n4z2mp4rvrbmxq079zdsrhjxjkmhz6mzi7mlcipz02cdl7n1f8p";
 
     configureFlags = [
-      "--with-zlib-dir=${pkgs.zlib}"
+      "--with-zlib-dir=${pkgs.zlib.dev}"
       "--with-libmemcached-dir=${pkgs.libmemcached}"
     ];
 
@@ -74,7 +74,7 @@ let
     };
 
     configureFlags = [
-      "--with-zlib-dir=${pkgs.zlib}"
+      "--with-zlib-dir=${pkgs.zlib.dev}"
       "--with-libmemcached-dir=${pkgs.libmemcached}"
     ];
 
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index c238039d8df..9ce75da5daa 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -7148,8 +7148,8 @@ in modules // {
     USE_NCCONFIG="0";
     HDF5_DIR="${pkgs.hdf5}";
     NETCDF4_DIR="${pkgs.netcdf}";
-    CURL_DIR="${pkgs.curl}";
-    JPEG_DIR="${pkgs.libjpeg}";
+    CURL_DIR="${pkgs.curl.dev}";
+    JPEG_DIR="${pkgs.libjpeg.dev}";
 
     meta = {
       description = "interface to netCDF library (versions 3 and 4)";
@@ -7406,9 +7406,9 @@ in modules // {
     propagatedBuildInputs = [ pkgs.pyqt4 pkgs.pkgconfig pkgs.poppler_qt4 ];
 
     preBuild = "${python}/bin/${python.executable} setup.py build_ext" +
-               " --include-dirs=${pkgs.poppler_qt4}/include/poppler/";
+               " --include-dirs=${pkgs.poppler_qt4.dev}/include/poppler/";
 
-    NIX_CFLAGS_COMPILE = "-I${pkgs.poppler_qt4}/include/poppler/";
+    NIX_CFLAGS_COMPILE = "-I${pkgs.poppler_qt4.dev}/include/poppler/";
 
     meta = {
       description = "A Python binding to Poppler-Qt4";
@@ -7844,7 +7844,7 @@ in modules // {
        cat > site.cfg << END
        [samplerate]
        library_dirs=${pkgs.libsamplerate.out}/lib
-       include_dirs=${pkgs.libsamplerate}/include
+       include_dirs=${pkgs.libsamplerate.dev}/include
        END
     '';
 
@@ -12057,7 +12057,7 @@ in modules // {
     buildInputs = with self; [ pkgs.swig2 pkgs.openssl ];
 
     preConfigure = ''
-      substituteInPlace setup.py --replace "self.openssl = '/usr'" "self.openssl = '${pkgs.openssl}'"
+      substituteInPlace setup.py --replace "self.openssl = '/usr'" "self.openssl = '${pkgs.openssl.dev}'"
     '';
 
     doCheck = false; # another test that depends on the network.
@@ -17433,7 +17433,7 @@ in modules // {
 
     preConfigure = ''
       export LDFLAGS="-L${pkgs.fftw.out}/lib -L${pkgs.fftwFloat.out}/lib -L${pkgs.fftwLongDouble.out}/lib"
-      export CFLAGS="-I${pkgs.fftw}/include -I${pkgs.fftwFloat}/include -I${pkgs.fftwLongDouble}/include"
+      export CFLAGS="-I${pkgs.fftw.dev}/include -I${pkgs.fftwFloat.dev}/include -I${pkgs.fftwLongDouble.dev}/include"
     '';
     #+ optionalString isDarwin ''
     #  export DYLD_LIBRARY_PATH="${pkgs.fftw.out}/lib"
@@ -18244,7 +18244,7 @@ in modules // {
       sha256 = "0j5hzaar4d0vhnrlpmkczgwm7ci2wibr99a7zx04xddzrhxdpz82";
     };
 
-    NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl";
+    NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev}/include/sasl";
     propagatedBuildInputs = with self; [pkgs.openldap pkgs.cyrus_sasl pkgs.openssl];
   };
 
@@ -18685,7 +18685,7 @@ in modules // {
       ++ (if stdenv.isLinux then [pkgs.e2fsprogs] else []);
 
     # There seems to be no way to pass that path to configure.
-    NIX_CFLAGS_COMPILE="-I${pkgs.aprutil}/include/apr-1";
+    NIX_CFLAGS_COMPILE="-I${pkgs.aprutil.dev}/include/apr-1";
 
     preConfigure = ''
       cd Source
@@ -18696,7 +18696,7 @@ in modules // {
         --apr-lib-dir=${pkgs.apr.out}/lib \
         --svn-lib-dir=${pkgs.subversion.out}/lib \
         --svn-bin-dir=${pkgs.subversion.out}/bin \
-        --svn-root-dir=${pkgs.subversion}
+        --svn-root-dir=${pkgs.subversion.dev}
     '' + (if !stdenv.isDarwin then "" else ''
       sed -i -e 's|libpython2.7.dylib|lib/libpython2.7.dylib|' Makefile
     '');
@@ -26889,7 +26889,7 @@ in modules // {
 
     # Fix the USB backend library lookup
     postPatch = ''
-      libusb=${pkgs.libusb1}/include/libusb-1.0
+      libusb=${pkgs.libusb1.dev}/include/libusb-1.0
       test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
       sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
     '';