From eda2dd3d2fa99b5530c927384daea3dcb2066d22 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sat, 1 Oct 2016 23:47:19 +0300 Subject: [PATCH] treewide: Fix more 'lib.optional' misuses --- pkgs/applications/editors/vis/default.nix | 2 +- pkgs/development/interpreters/erlang/R16.nix | 6 +++--- pkgs/games/residualvm/default.nix | 4 ++-- pkgs/tools/graphics/gnuplot/default.nix | 2 +- pkgs/tools/video/mjpegtools/default.nix | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/editors/vis/default.nix b/pkgs/applications/editors/vis/default.nix index 72a4bfe57b89..a28890e2466f 100644 --- a/pkgs/applications/editors/vis/default.nix +++ b/pkgs/applications/editors/vis/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { libtermkey lua lpeg - ] ++ stdenv.lib.optional stdenv.isLinux [ + ] ++ stdenv.lib.optionals stdenv.isLinux [ acl libselinux ]; diff --git a/pkgs/development/interpreters/erlang/R16.nix b/pkgs/development/interpreters/erlang/R16.nix index 02f9d1f98e81..ed30fe1522bf 100644 --- a/pkgs/development/interpreters/erlang/R16.nix +++ b/pkgs/development/interpreters/erlang/R16.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation rec { buildInputs = [ perl gnum4 ncurses openssl makeWrapper - ] ++ optional wxSupport [ mesa wxGTK xorg.libX11 ] - ++ optional odbcSupport [ unixODBC ] - ++ optional stdenv.isDarwin [ Carbon Cocoa ]; + ] ++ optionals wxSupport [ mesa wxGTK xorg.libX11 ] + ++ optional odbcSupport unixODBC + ++ optionals stdenv.isDarwin [ Carbon Cocoa ]; patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure ''; diff --git a/pkgs/games/residualvm/default.nix b/pkgs/games/residualvm/default.nix index 36c40f9bec5e..e96cf5e59322 100644 --- a/pkgs/games/residualvm/default.nix +++ b/pkgs/games/residualvm/default.nix @@ -16,9 +16,9 @@ stdenv.mkDerivation rec { }; buildInputs = [ stdenv SDL zlib libmpeg2 libmad libogg libvorbis flac alsaLib ] - ++ optional openglSupport [ mesa ]; + ++ optional openglSupport mesa; - configureFlags="--enable-all-engines"; + configureFlags = [ "--enable-all-engines" ]; meta = { description = "Interpreter for LucasArts' Lua-based 3D adventure games"; diff --git a/pkgs/tools/graphics/gnuplot/default.nix b/pkgs/tools/graphics/gnuplot/default.nix index 8fa7af3b1f8e..3b537fad91db 100644 --- a/pkgs/tools/graphics/gnuplot/default.nix +++ b/pkgs/tools/graphics/gnuplot/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ++ lib.optional withTeXLive (texlive.combine { inherit (texlive) scheme-small; }) ++ lib.optional withLua lua ++ lib.optionals withX [ libX11 libXpm libXt libXaw ] - ++ lib.optional withQt [ qt ] + ++ lib.optional withQt qt # compiling with wxGTK causes a malloc (double free) error on darwin ++ lib.optional (withWxGTK && !stdenv.isDarwin) wxGTK; diff --git a/pkgs/tools/video/mjpegtools/default.nix b/pkgs/tools/video/mjpegtools/default.nix index 71b1b43f6535..1ab0a9ae2738 100644 --- a/pkgs/tools/video/mjpegtools/default.nix +++ b/pkgs/tools/video/mjpegtools/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; buildInputs = [ libdv libjpeg libpng pkgconfig ] - ++ lib.optional (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ]; + ++ lib.optionals (!withMinimal) [ gtk2 libX11 SDL SDL_gfx ]; NIX_CFLAGS_COMPILE = lib.optional (!withMinimal) "-I${SDL.dev}/include/SDL";