From 859b3b7f90d6072d962a6d7628349b2820eeb64b Mon Sep 17 00:00:00 2001 From: Andrey Ovcharov Date: Sat, 16 Feb 2019 17:51:59 +0700 Subject: [PATCH 1/6] thinkfan: 0.9.3 -> 1.0.1 --- pkgs/tools/system/thinkfan/default.nix | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index 8c8034005844..0310d6faf2ee 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -1,18 +1,27 @@ -{ stdenv, fetchurl, cmake +{ stdenv, fetchFromGitHub, cmakeCurses, libyamlcpp, pkgconfig , smartSupport ? false, libatasmart }: stdenv.mkDerivation rec { pname = "thinkfan"; - version = "0.9.3"; + version = "1.0.1"; - src = fetchurl { - url = "mirror://sourceforge/thinkfan/thinkfan-${version}.tar.gz"; - sha256 = "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"; + src = fetchFromGitHub { + owner = "vmatare"; + repo = "thinkfan"; + rev = "${version}"; + sha256 = "1983p8aryfgpyhflh5r5xz27y136a4vvm7plgrg44q4aicqbcp8j"; }; - nativeBuildInputs = [ cmake ]; + configureFlags = [ + "-DCMAKE_INSTALL_DOCDIR==share/doc/${pname}" + "-DUSE_NVML=OFF" + "-DUSE_ATASMART=ON" + "-DUSE_YAML=ON" + ]; - buildInputs = stdenv.lib.optional smartSupport libatasmart; + nativeBuildInputs = [ cmakeCurses pkgconfig ]; + + buildInputs = [libyamlcpp] ++ stdenv.lib.optional smartSupport libatasmart; cmakeFlags = stdenv.lib.optional smartSupport "-DUSE_ATASMART=ON"; @@ -27,7 +36,7 @@ stdenv.mkDerivation rec { meta = { license = stdenv.lib.licenses.gpl3; - homepage = http://thinkfan.sourceforge.net/; + homepage = https://github.com/vmatare/thinkfan; maintainers = with stdenv.lib.maintainers; [ domenkozar ]; platforms = stdenv.lib.platforms.linux; }; From 15f4112f53a0028e51d62fb7f9f06b7ec7491b10 Mon Sep 17 00:00:00 2001 From: Christine Koppelt Date: Tue, 24 Sep 2019 21:00:03 +0200 Subject: [PATCH 2/6] fixing remarks from #55895 (thinkfan: 0.9.3 -> 1.0.1) --- pkgs/tools/system/thinkfan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index 0310d6faf2ee..22bee93cb958 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -8,12 +8,12 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "vmatare"; repo = "thinkfan"; - rev = "${version}"; + rev = version; sha256 = "1983p8aryfgpyhflh5r5xz27y136a4vvm7plgrg44q4aicqbcp8j"; }; configureFlags = [ - "-DCMAKE_INSTALL_DOCDIR==share/doc/${pname}" + "-DCMAKE_INSTALL_DOCDIR=share/doc/${pname}" "-DUSE_NVML=OFF" "-DUSE_ATASMART=ON" "-DUSE_YAML=ON" From 482a9537b2718300455544ef482432501ba87fa0 Mon Sep 17 00:00:00 2001 From: Christine Koppelt Date: Tue, 24 Sep 2019 21:22:55 +0200 Subject: [PATCH 3/6] thinkfan: 1.0.1 -> 1.0.2 --- pkgs/tools/system/thinkfan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index 22bee93cb958..f5a8a48c9f2e 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "thinkfan"; - version = "1.0.1"; + version = "1.0.2"; src = fetchFromGitHub { owner = "vmatare"; repo = "thinkfan"; rev = version; - sha256 = "1983p8aryfgpyhflh5r5xz27y136a4vvm7plgrg44q4aicqbcp8j"; + sha256 = "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"; }; configureFlags = [ From c3a562f3e2affed5b583230a63841fe9191cd193 Mon Sep 17 00:00:00 2001 From: Christine Koppelt Date: Wed, 25 Sep 2019 00:33:22 +0200 Subject: [PATCH 4/6] addressing remarks from @peterhoeg ( thinkfan: 0.9.3 -> 1.0.2) --- pkgs/tools/system/thinkfan/default.nix | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index f5a8a48c9f2e..60d47dab20e6 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmakeCurses, libyamlcpp, pkgconfig +{ stdenv, fetchFromGitHub, cmake, libyamlcpp, pkgconfig , smartSupport ? false, libatasmart }: stdenv.mkDerivation rec { @@ -12,18 +12,14 @@ stdenv.mkDerivation rec { sha256 = "107vw0962hrwva3wra9n3hxlbfzg82ldc10qssv3dspja88g8psr"; }; - configureFlags = [ + cmakeFlags = [ "-DCMAKE_INSTALL_DOCDIR=share/doc/${pname}" "-DUSE_NVML=OFF" - "-DUSE_ATASMART=ON" - "-DUSE_YAML=ON" - ]; + ] ++ stdenv.lib.optional smartSupport "-DUSE_ATASMART=ON"; - nativeBuildInputs = [ cmakeCurses pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [libyamlcpp] ++ stdenv.lib.optional smartSupport libatasmart; - - cmakeFlags = stdenv.lib.optional smartSupport "-DUSE_ATASMART=ON"; + buildInputs = [ libyamlcpp ] ++ stdenv.lib.optional smartSupport libatasmart; installPhase = '' install -Dm755 {.,$out/bin}/thinkfan @@ -34,10 +30,10 @@ stdenv.mkDerivation rec { install -Dm644 {src,$out/share/man/man1}/thinkfan.1 ''; - meta = { - license = stdenv.lib.licenses.gpl3; - homepage = https://github.com/vmatare/thinkfan; - maintainers = with stdenv.lib.maintainers; [ domenkozar ]; - platforms = stdenv.lib.platforms.linux; + meta = with stdenv.lib; { + license = licenses.gpl3; + homepage = "https://github.com/vmatare/thinkfan"; + maintainers = with maintainers; [ domenkozar ]; + platforms = platforms.linux; }; } From 3966d0d30091a9113f76f2e96e33196784c3caf0 Mon Sep 17 00:00:00 2001 From: Christine Koppelt Date: Wed, 25 Sep 2019 08:57:10 +0200 Subject: [PATCH 5/6] addressing remarks from @peterhoeg ( thinkfan: 0.9.3 -> 1.0.2) --- pkgs/tools/system/thinkfan/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index 60d47dab20e6..e0a061a45b88 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -31,6 +31,9 @@ stdenv.mkDerivation rec { ''; 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 ]; From e00ce8c983c71f554eac2a755206bb4651ed6bba Mon Sep 17 00:00:00 2001 From: Christine Koppelt Date: Sun, 29 Sep 2019 23:59:13 +0200 Subject: [PATCH 6/6] addressing remarks from @peterhoeg ( thinkfan: 0.9.3 -> 1.0.2) --- pkgs/tools/system/thinkfan/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index e0a061a45b88..f3b4ab8440e3 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -22,12 +22,16 @@ stdenv.mkDerivation rec { 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 = with stdenv.lib; {