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
This commit is contained in:
Michael Hanley 2022-08-28 08:21:33 -04:00
parent b6966e5ccc
commit 26afe025c7

View file

@ -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 {