Unverified Commit b03e4733 authored by Bjørn Forsman's avatar Bjørn Forsman Committed by GitHub
Browse files

smartmontools: build with systemdLibs on linux (#342407)

parents 490abc3b 94bc565c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -269,7 +269,10 @@ in
    systemd.services.smartd = {
      description = "S.M.A.R.T. Daemon";
      wantedBy = [ "multi-user.target" ];
      serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd ${lib.concatStringsSep " " cfg.extraOptions} --no-fork --configfile=${smartdConf}";
      serviceConfig = {
        Type = "notify";
        ExecStart = "${pkgs.smartmontools}/sbin/smartd ${lib.concatStringsSep " " cfg.extraOptions} --no-fork --configfile=${smartdConf}";
      };
    };

    services.systembus-notify.enable = mkDefault ns.enable;
+25 −12
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, autoreconfHook
, enableMail ? false
, gnused
, hostname
, mailutils
, IOKit
, ApplicationServices
{
  lib,
  stdenv,
  fetchurl,
  autoreconfHook,
  enableMail ? false,
  gnused,
  hostname,
  mailutils,
  systemdLibs,
  IOKit,
  ApplicationServices,
}:

let
@@ -18,7 +20,13 @@ let
    sha256 = "sha256-0dtLev4JjeHsS259+qOgg19rz4yjkeX4D3ooUgS4RTI=";
    name = "smartmontools-drivedb.h";
  };
  scriptPath = lib.makeBinPath ([ gnused hostname ] ++ lib.optionals enableMail [ mailutils ]);
  scriptPath = lib.makeBinPath (
    [
      gnused
      hostname
    ]
    ++ lib.optionals enableMail [ mailutils ]
  );

in
stdenv.mkDerivation rec {
@@ -45,7 +53,12 @@ stdenv.mkDerivation rec {
  ];

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = lib.optionals stdenv.isDarwin [ IOKit ApplicationServices ];
  buildInputs =
    lib.optionals stdenv.isLinux [ systemdLibs ]
    ++ lib.optionals stdenv.isDarwin [
      IOKit
      ApplicationServices
    ];
  enableParallelBuilding = true;

  meta = with lib; {