nixpkgs/pkgs/tools/system/smartmontools/default.nix

44 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, autoreconfHook
, mailutils, inetutils
, IOKit, ApplicationServices }:
let
version = "7.2";
dbrev = "5164";
drivedbBranch = "RELEASE_7_2_DRIVEDB";
driverdb = fetchurl {
2018-11-24 18:58:03 +00:00
url = "https://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw";
sha256 = "1vj0sv3bgcd0lwk5x450brfyxksa5fn1mjgvmj994ab8spmicc43";
2017-10-17 03:51:26 +01:00
name = "smartmontools-drivedb.h";
};
in stdenv.mkDerivation rec {
2019-08-13 22:52:01 +01:00
pname = "smartmontools";
inherit version;
src = fetchurl {
2019-08-13 22:52:01 +01:00
url = "mirror://sourceforge/smartmontools/${pname}-${version}.tar.gz";
sha256 = "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw";
};
patches = [ ./smartmontools.patch ];
postPatch = "cp -v ${driverdb} drivedb.h";
configureFlags = [
2021-01-15 09:19:50 +00:00
"--with-scriptpath=${lib.makeBinPath [ mailutils inetutils ]}"
];
nativeBuildInputs = [ autoreconfHook ];
2021-01-15 09:19:50 +00:00
buildInputs = [] ++ lib.optionals stdenv.isDarwin [IOKit ApplicationServices];
enableParallelBuilding = true;
meta = with lib; {
description = "Tools for monitoring the health of hard drives";
homepage = "https://www.smartmontools.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ peti Frostman ];
platforms = with platforms; linux ++ darwin;
};
}