smartmontools: drop mailutils dependency by default

mailutils depends on OpenSSL 1.0.2, which is marked as insecure and thus
prevents this package from being built on Hydra. Excluding it by default
should re-enable binary builds for users who don't need the email
feature.

This change is unlikely to cause a major disruption because there's an
existing NixOS module for smartd that handles email notifications. It
works without this package being dependant on mailutils. Since mailutils
isn't used for any other purpose besides providing email notification
for smartd, it's possible to drop it without feature loss.

This change also makes the dependance on inetutils optional. inetutils
is needed for the 'hostname' command, and is only used for providing
email support.
This commit is contained in:
midchildan 2021-02-16 21:26:59 +09:00
parent b8878b950f
commit 24499bbc6e
No known key found for this signature in database
GPG key ID: D9A5748BACC6E3C2

View file

@ -1,6 +1,5 @@
{ lib, stdenv, fetchurl, autoreconfHook
, mailutils, enableMail ? true
, inetutils
, enableMail ? false, mailutils, inetutils
, IOKit, ApplicationServices }:
let
@ -23,15 +22,17 @@ in stdenv.mkDerivation rec {
sha256 = "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw";
};
patches = [ ./smartmontools.patch ];
patches = [
# fixes darwin build
./smartmontools.patch
];
postPatch = "cp -v ${driverdb} drivedb.h";
configureFlags = [
"--with-scriptpath=${lib.makeBinPath ([ inetutils ] ++ lib.optional enableMail mailutils)}"
];
configureFlags = lib.optional enableMail
"--with-scriptpath=${lib.makeBinPath [ inetutils mailutils ]}";
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [] ++ lib.optionals stdenv.isDarwin [IOKit ApplicationServices];
buildInputs = lib.optionals stdenv.isDarwin [ IOKit ApplicationServices ];
enableParallelBuilding = true;
meta = with lib; {