thinkfan: add option for libatasmart support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{ stdenv, fetchurl, cmake }:
|
||||
{ stdenv, fetchurl, cmake
|
||||
, smartSupport ? false, libatasmart }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "thinkfan-${version}";
|
||||
@@ -11,6 +12,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = stdenv.lib.optional smartSupport libatasmart;
|
||||
|
||||
cmakeFlags = stdenv.lib.optional smartSupport "-DUSE_ATASMART=ON";
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 {.,$out/bin}/thinkfan
|
||||
|
||||
|
||||
Reference in New Issue
Block a user