From 26afe025c78608b9671135dbdf5286e5c819a8f5 Mon Sep 17 00:00:00 2001 From: Michael Hanley Date: Sun, 28 Aug 2022 08:21:33 -0400 Subject: [PATCH] smartmontools: fix lib.optional -> lib.optionals Fixes the following errror when `enableMail=true`: ``` error: cannot coerce a list to a string ``` See: https://discourse.nixos.org/t/lib-optional-considered-harmful/7081 --- pkgs/tools/system/smartmontools/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index 10ec02369dc..d7bc0a2cb82 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -18,7 +18,7 @@ let sha256 = "sha256-0dtLev4JjeHsS259+qOgg19rz4yjkeX4D3ooUgS4RTI="; name = "smartmontools-drivedb.h"; }; - scriptPath = lib.makeBinPath ([ gnused ] ++ lib.optional enableMail [ inetutils mailutils ]); + scriptPath = lib.makeBinPath ([ gnused ] ++ lib.optionals enableMail [ inetutils mailutils ]); in stdenv.mkDerivation rec {