diff options
author | Peter Hoeg <peter@hoeg.com> | 2019-09-30 19:53:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-30 19:53:26 +0800 |
commit | aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9 (patch) | |
tree | 387466a4e1aeb56027590d6e995d771cf6527a9b /pkgs/tools/system | |
parent | 7a7e9c1b27c11a8e2248fae3240396b7275f6429 (diff) | |
parent | e00ce8c983c71f554eac2a755206bb4651ed6bba (diff) | |
download | nixpkgs-aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9.tar nixpkgs-aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9.tar.gz nixpkgs-aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9.tar.bz2 nixpkgs-aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9.tar.lz nixpkgs-aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9.tar.xz nixpkgs-aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9.tar.zst nixpkgs-aab7e12a872e46c466ab3cb9c93dd1974dcd6eb9.zip |
Merge pull request #69375 from cko/thinkfan-1.0.2
thinkfan: 0.9.3 -> 1.0.2 (replaces #55895)
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r-- | pkgs/tools/system/thinkfan/default.nix | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index 8c803400584..f3b4ab8440e 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -1,34 +1,46 @@ -{ stdenv, fetchurl, cmake +{ stdenv, fetchFromGitHub, cmake, libyamlcpp, pkgconfig , smartSupport ? false, libatasmart }: stdenv.mkDerivation rec { pname = "thinkfan"; - version = "0.9.3"; + version = "1.0.2"; - src = fetchurl { - url = "mirror://sourceforge/thinkfan/thinkfan-${version}.tar.gz"; - sha256 = "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"; + src = fetchFromGitHub { + owner = "vmatare"; + repo = "thinkfan"; + rev = version; + sha256 = "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"; }; - nativeBuildInputs = [ cmake ]; + cmakeFlags = [ + "-DCMAKE_INSTALL_DOCDIR=share/doc/${pname}" + "-DUSE_NVML=OFF" + ] ++ stdenv.lib.optional smartSupport "-DUSE_ATASMART=ON"; - buildInputs = stdenv.lib.optional smartSupport libatasmart; + nativeBuildInputs = [ cmake pkgconfig ]; - cmakeFlags = stdenv.lib.optional smartSupport "-DUSE_ATASMART=ON"; + buildInputs = [ libyamlcpp ] ++ stdenv.lib.optional smartSupport libatasmart; installPhase = '' + runHook preInstall + install -Dm755 {.,$out/bin}/thinkfan cd "$NIX_BUILD_TOP"; cd "$sourceRoot" # attempt to be a bit robust install -Dm644 {.,$out/share/doc/thinkfan}/README cp -R examples $out/share/doc/thinkfan install -Dm644 {src,$out/share/man/man1}/thinkfan.1 + + runHook postInstall ''; - meta = { - license = stdenv.lib.licenses.gpl3; - homepage = http://thinkfan.sourceforge.net/; - maintainers = with stdenv.lib.maintainers; [ domenkozar ]; - platforms = stdenv.lib.platforms.linux; + meta = with stdenv.lib; { + description = "A minimalist fan control program. Originally designed +specifically for IBM/Lenovo Thinkpads, it now supports any kind of system via +the sysfs hwmon interface (/sys/class/hwmon)."; + license = licenses.gpl3; + homepage = "https://github.com/vmatare/thinkfan"; + maintainers = with maintainers; [ domenkozar ]; + platforms = platforms.linux; }; } |