treewide: Fix more lib.optional misuses

This commit is contained in:
Tuomas Tynkkynen 2016-10-02 00:23:05 +03:00
parent 82c0aa7d85
commit f5dd3a703d
6 changed files with 19 additions and 31 deletions

View File

@ -84,22 +84,10 @@ stdenv.mkDerivation rec {
curl curl
libmicrohttpd libmicrohttpd
mesa mesa
(optional withOpenCL [ ] ++ optionals withOpenCL [ opencl-headers ocl-icd ]
opencl-headers ++ optionals withGUI [ qtwebengine qtbase qtdeclarative ]
ocl-icd ++ optional withProfiling gperftools
]) ++ optionals withEVMJIT [ llvm zlib ncurses ];
(optional withGUI [
qtwebengine
qtbase
qtdeclarative
])
(optional withProfiling gperftools)
(optional withEVMJIT [
llvm
zlib
ncurses
])
];
runPath = with stdenv.lib; (makeLibraryPath (flatten [ stdenv.cc.cc buildInputs ])); runPath = with stdenv.lib; (makeLibraryPath (flatten [ stdenv.cc.cc buildInputs ]));

View File

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
patches = [ ./blitz-gcc47.patch ./blitz-testsuite-stencil-et.patch ]; patches = [ ./blitz-gcc47.patch ./blitz-testsuite-stencil-et.patch ];
buildInputs = [ pkgconfig gfortran texinfo ] buildInputs = [ pkgconfig gfortran texinfo ]
++ optional (boost != null) [ boost.out ]; ++ optional (boost != null) boost;
configureFlags = configureFlags =
[ "--enable-shared" [ "--enable-shared"

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
portaudio portaudio
udev udev
gsl gsl
] ++ stdenv.lib.optional pulseaudioSupport [ libpulseaudio ]; ] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio;
meta = { meta = {
description = "A simple interface for devices supported by the linux UVC driver"; description = "A simple interface for devices supported by the linux UVC driver";

View File

@ -15,6 +15,7 @@
, withRedis ? false , withRedis ? false
, libmysql , libmysql
, withMysql ? false , withMysql ? false
, json_c
, withJson ? false , withJson ? false
, libyubikey , libyubikey
, withYubikey ? false , withYubikey ? false
@ -42,16 +43,16 @@ stdenv.mkDerivation rec {
version = "3.0.11"; version = "3.0.11";
buildInputs = [ autoreconfHook openssl talloc finger_bsd perl ] buildInputs = [ autoreconfHook openssl talloc finger_bsd perl ]
++ optional withLdap [ openldap ] ++ optional withLdap openldap
++ optional withSqlite [ sqlite ] ++ optional withSqlite sqlite
++ optional withPcap [ libpcap ] ++ optional withPcap libpcap
++ optional withCap [ libcap ] ++ optional withCap libcap
++ optional withMemcached [ libmemcached ] ++ optional withMemcached libmemcached
++ optional withRedis [ hiredis ] ++ optional withRedis hiredis
++ optional withMysql [ libmysql ] ++ optional withMysql libmysql
++ optional withJson [ pkgs."json-c" ] ++ optional withJson json_c
++ optional withYubikey [ libyubikey ] ++ optional withYubikey libyubikey
++ optional withCollectd [ collectd ]; ++ optional withCollectd collectd;
# NOTE: are the --with-{lib}-lib-dir and --with-{lib}-include-dir necessary with buildInputs ? # NOTE: are the --with-{lib}-lib-dir and --with-{lib}-include-dir necessary with buildInputs ?

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
}; };
buildInputs = [ zlib bzip2 openssl lzo libgcrypt gpgme xz ] buildInputs = [ zlib bzip2 openssl lzo libgcrypt gpgme xz ]
++ stdenv.lib.optional stdenv.isLinux [ attr e2fsprogs ]; ++ stdenv.lib.optionals stdenv.isLinux [ attr e2fsprogs ];
configureFlags = [ "--disable-dar-static" ]; configureFlags = [ "--disable-dar-static" ];

View File

@ -29,7 +29,6 @@ stdenv.mkDerivation rec {
glib glib
gtk2 gtk2
gst_all_1.gstreamer gst_all_1.gstreamer
gst_plugins
gnome2.GConf gnome2.GConf
gnome2.gnome_icon_theme gnome2.gnome_icon_theme
libnotify libnotify
@ -37,7 +36,7 @@ stdenv.mkDerivation rec {
libunique libunique
intltool intltool
wrapGAppsHook wrapGAppsHook
]; ] ++ gst_plugins;
propagatedUserEnvPkgs = [ gnome2.GConf.out ]; propagatedUserEnvPkgs = [ gnome2.GConf.out ];