2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2021-02-05 17:12:51 +00:00
|
|
|
let
|
|
|
|
db = fetchurl {
|
2020-04-24 23:36:52 +00:00
|
|
|
url = "mirror://savannah/hddtemp/hddtemp.db";
|
|
|
|
sha256 = "1fr6qgns6qv7cr40lic5yqwkkc7yjmmgx8j0z6d93csg3smzhhya";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hddtemp";
|
|
|
|
version = "0.3-beta15";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
url = "mirror://savannah/hddtemp/hddtemp-${version}.tar.bz2";
|
|
|
|
sha256 = "sha256-YYVBWEBUCT1TvootnoHJcXTzDwCvkcuHAKl+RC1571s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# from Gentoo
|
|
|
|
patches = [ ./byteswap.patch ./dontwake.patch ./execinfo.patch ./satacmds.patch ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-db-path=${placeholder "out"}/share/${pname}/hddtemp.db"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 ${db} $out/share/${pname}/hddtemp.db
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tool for displaying hard disk temperature";
|
|
|
|
homepage = "https://savannah.nongnu.org/projects/hddtemp/";
|
|
|
|
license = licenses.gpl2Plus;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|