about summary refs log tree commit diff
path: root/pkgs/tools/system/smartmontools
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2017-02-23 00:17:51 +0100
committerPeter Simons <simons@cryp.to>2017-02-23 00:18:40 +0100
commit7803a696cd03486a3462f83120bf5088e9af6fd5 (patch)
tree0a6cd985298c4781374b4515755ad51549581d88 /pkgs/tools/system/smartmontools
parent4509487e8227300c3aeab22a01c9fee7d6780b6f (diff)
smartmontools: update drivedb.h to latest SVN version 4391
Diffstat (limited to 'pkgs/tools/system/smartmontools')
-rw-r--r--pkgs/tools/system/smartmontools/default.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix
index 1a9e2d3b5b9ba..c3f05edd9adba 100644
--- a/pkgs/tools/system/smartmontools/default.nix
+++ b/pkgs/tools/system/smartmontools/default.nix
@@ -1,8 +1,20 @@
-{ stdenv, fetchurl,
-IOKit ? null , ApplicationServices ? null }:
+{ stdenv, fetchurl, IOKit ? null , ApplicationServices ? null }:
+
+let
 
-stdenv.mkDerivation rec {
   version = "6.5";
+
+  dbrev = "4391";
+  drivedbBranch = "RELEASE_${builtins.replaceStrings ["."] ["_"] version}_DRIVEDB";
+  driverdb = fetchurl {
+    url = "http://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw";
+    sha256 = "1da99m81wr0rjdhcz2xx0sbbrqxkxffja2kllg4srmhih7fps5p1";
+    name = "smartmontools-drivedb.h";
+  };
+
+in
+
+stdenv.mkDerivation rec {
   name = "smartmontools-${version}";
 
   src = fetchurl {
@@ -13,6 +25,7 @@ stdenv.mkDerivation rec {
   buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices];
 
   patches = [ ./smartmontools.patch ];
+  postPatch = "cp -v ${driverdb} drivedb.h";
 
   meta = with stdenv.lib; {
     description = "Tools for monitoring the health of hard drives";