From 55b97f7ce62eb93e353b1d8af332f4c9323b5f8f Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 2 Feb 2021 02:47:36 +0100 Subject: [PATCH] thinkfan: cleanup - Remove the custom installPhase: upstream has added an install target and it does a better job than we do - Improve meta: description -> longDescription and add a short one - Fix license: GPL3 -> GPL3+ --- pkgs/tools/system/thinkfan/default.nix | 43 ++++++++++++-------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index c9af119fb73..4f9e1e28998 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -1,5 +1,13 @@ -{ lib, stdenv, fetchFromGitHub, cmake, libyamlcpp, pkg-config -, smartSupport ? false, libatasmart }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, libyamlcpp +, pkg-config +, procps +, coreutils +, smartSupport ? false, libatasmart +}: stdenv.mkDerivation rec { pname = "thinkfan"; @@ -21,27 +29,16 @@ stdenv.mkDerivation rec { buildInputs = [ libyamlcpp ] ++ 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.md - cp -R examples $out/share/doc/thinkfan - install -Dm644 {src,$out/share/man/man1}/thinkfan.1 - - runHook postInstall - ''; - - meta = with lib; { - description = "A minimalist fan control program"; - longDescription = "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; + meta = { + description = "A simple, lightweight fan control program"; + longDescription = '' + Thinkfan is 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 = lib.licenses.gpl3Plus; homepage = "https://github.com/vmatare/thinkfan"; - maintainers = with maintainers; [ domenkozar ]; - platforms = platforms.linux; + maintainers = with lib.maintainers; [ domenkozar ]; + platforms = lib.platforms.linux; }; }