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
libmicrohttpd
mesa
(optional withOpenCL [
opencl-headers
ocl-icd
])
(optional withGUI [
qtwebengine
qtbase
qtdeclarative
])
(optional withProfiling gperftools)
(optional withEVMJIT [
llvm
zlib
ncurses
])
];
] ++ optionals withOpenCL [ opencl-headers ocl-icd ]
++ optionals withGUI [ qtwebengine qtbase qtdeclarative ]
++ optional withProfiling gperftools
++ optionals withEVMJIT [ llvm zlib ncurses ];
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 ];
buildInputs = [ pkgconfig gfortran texinfo ]
++ optional (boost != null) [ boost.out ];
++ optional (boost != null) boost;
configureFlags =
[ "--enable-shared"

View File

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

View File

@ -15,6 +15,7 @@
, withRedis ? false
, libmysql
, withMysql ? false
, json_c
, withJson ? false
, libyubikey
, withYubikey ? false
@ -42,16 +43,16 @@ stdenv.mkDerivation rec {
version = "3.0.11";
buildInputs = [ autoreconfHook openssl talloc finger_bsd perl ]
++ optional withLdap [ openldap ]
++ optional withSqlite [ sqlite ]
++ optional withPcap [ libpcap ]
++ optional withCap [ libcap ]
++ optional withMemcached [ libmemcached ]
++ optional withRedis [ hiredis ]
++ optional withMysql [ libmysql ]
++ optional withJson [ pkgs."json-c" ]
++ optional withYubikey [ libyubikey ]
++ optional withCollectd [ collectd ];
++ optional withLdap openldap
++ optional withSqlite sqlite
++ optional withPcap libpcap
++ optional withCap libcap
++ optional withMemcached libmemcached
++ optional withRedis hiredis
++ optional withMysql libmysql
++ optional withJson json_c
++ optional withYubikey libyubikey
++ optional withCollectd collectd;
# 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 ]
++ stdenv.lib.optional stdenv.isLinux [ attr e2fsprogs ];
++ stdenv.lib.optionals stdenv.isLinux [ attr e2fsprogs ];
configureFlags = [ "--disable-dar-static" ];

View File

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