diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index eb3c8dc2e0e1..1658b4ea4df8 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -1,17 +1,25 @@ -{ lib, stdenv, fetchurl, autoreconfHook -, enableMail ? false, mailutils, inetutils -, IOKit, ApplicationServices }: +{ lib +, stdenv +, fetchurl +, autoreconfHook +, enableMail ? false +, mailutils +, inetutils +, IOKit +, ApplicationServices +}: let dbrev = "5171"; drivedbBranch = "RELEASE_7_2_DRIVEDB"; driverdb = fetchurl { - url = "https://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw"; + url = "https://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw"; sha256 = "0vncr98xagbcfsxgfgxsip2qrl9q3y8va19qhv6yknlwbdfap4mn"; - name = "smartmontools-drivedb.h"; + name = "smartmontools-drivedb.h"; }; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "smartmontools"; version = "7.2"; @@ -24,10 +32,11 @@ in stdenv.mkDerivation rec { # fixes darwin build ./smartmontools.patch ]; - postPatch = "cp -v ${driverdb} drivedb.h"; + postPatch = '' + cp -v ${driverdb} drivedb.h + ''; - configureFlags = lib.optional enableMail - "--with-scriptpath=${lib.makeBinPath [ inetutils mailutils ]}"; + configureFlags = lib.optional enableMail "--with-scriptpath=${lib.makeBinPath [ inetutils mailutils ]}"; nativeBuildInputs = [ autoreconfHook ]; buildInputs = lib.optionals stdenv.isDarwin [ IOKit ApplicationServices ]; @@ -35,10 +44,10 @@ in stdenv.mkDerivation rec { meta = with lib; { description = "Tools for monitoring the health of hard drives"; - homepage = "https://www.smartmontools.org/"; - license = licenses.gpl2Plus; + homepage = "https://www.smartmontools.org/"; + license = licenses.gpl2Plus; maintainers = with maintainers; [ peti Frostman ]; - platforms = with platforms; linux ++ darwin; + platforms = with platforms; linux ++ darwin; mainProgram = "smartctl"; }; }