From 24499bbc6e50d4be62225614e23cd413c8749a67 Mon Sep 17 00:00:00 2001 From: midchildan Date: Tue, 16 Feb 2021 21:26:59 +0900 Subject: [PATCH] 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. --- pkgs/tools/system/smartmontools/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index 954c9eb4110..898522b7763 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -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; {