git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit24499bbc6e50d4be62225614e23cd413c8749a67 authormidchildan <git@midchildan.org> dateTue 16 Feb 2021, 21:26 (6 years ago) parentb8878b9
1 file changed+8−7
pkgs/tools/system/smartmontools/default.nix+8−7
pkgs/tools/system/smartmontools/default.nix+8−7
@@ -1,6 +1,5 @@
11{ lib, stdenv, fetchurl, autoreconfHook
2−, mailutils, enableMail ? true
3−, inetutils
2+, enableMail ? false, mailutils, inetutils
43, IOKit, ApplicationServices }:
54
65let
@@ -23,15 +22,17 @@ in stdenv.mkDerivation rec {
2322 sha256 = "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw";
2423 };
2524
26− patches = [ ./smartmontools.patch ];
25+ patches = [
26+ # fixes darwin build
27+ ./smartmontools.patch
28+ ];
2729 postPatch = "cp -v ${driverdb} drivedb.h";
2830
29− configureFlags = [
30− "--with-scriptpath=${lib.makeBinPath ([ inetutils ] ++ lib.optional enableMail mailutils)}"
31− ];
31+ configureFlags = lib.optional enableMail
32+ "--with-scriptpath=${lib.makeBinPath [ inetutils mailutils ]}";
3233
3334 nativeBuildInputs = [ autoreconfHook ];
34− buildInputs = [] ++ lib.optionals stdenv.isDarwin [IOKit ApplicationServices];
35+ buildInputs = lib.optionals stdenv.isDarwin [ IOKit ApplicationServices ];
3536 enableParallelBuilding = true;
3637
3738 meta = with lib; {