17 drivedbBranch = "RELEASE_7_3_DRIVEDB";
19 url = "https://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw";
20 sha256 = "sha256-0dtLev4JjeHsS259+qOgg19rz4yjkeX4D3ooUgS4RTI=";
21 name = "smartmontools-drivedb.h";
23 scriptPath = lib.makeBinPath (
28 ++ lib.optionals enableMail [ mailutils ]
32 stdenv.mkDerivation rec {
33 pname = "smartmontools";
37 url = "mirror://sourceforge/smartmontools/${pname}-${version}.tar.gz";
38 hash = "sha256-6aYfZB/5bKlTGe37F5SM0pfQzTNCc2ssScmdRxb7mT0=";
46 cp -v ${driverdb} drivedb.h
50 "--with-scriptpath=${scriptPath}"
51 # does not work on NixOS
52 "--without-update-smart-drivedb"
55 nativeBuildInputs = [ autoreconfHook ];
57 lib.optionals stdenv.hostPlatform.isLinux [ systemdLibs ]
58 ++ lib.optionals stdenv.hostPlatform.isDarwin [
62 enableParallelBuilding = true;
65 description = "Tools for monitoring the health of hard drives";
66 homepage = "https://www.smartmontools.org/";
67 license = licenses.gpl2Plus;
68 maintainers = with maintainers; [ Frostman ];
69 platforms = with platforms; linux ++ darwin;
70 mainProgram = "smartctl";