2021-12-21 02:18:32 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, kernel }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "asus-ec-sensors-${version}-${kernel.version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "unstable-2022-07-10";
|
2021-12-21 02:18:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zeule";
|
|
|
|
repo = "asus-ec-sensors";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "5fbdd1461dc88fc952e02717b8120438ce5558b3";
|
|
|
|
sha256 = "sha256-kBGl8i7HzdItMoM7L91OfX6y+bqDfd22WICRg0n25pI=";
|
2021-12-21 02:18:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install asus-ec-sensors.ko -Dm444 -t ${placeholder "out"}/lib/modules/${kernel.modDirVersion}/kernel/drivers/hwmon
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Linux HWMON sensors driver for ASUS motherboards to read sensor data from the embedded controller";
|
|
|
|
homepage = "https://github.com/zeule/asus-ec-sensors";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ nickhu ];
|
2022-09-09 14:08:57 +00:00
|
|
|
broken = kernel.kernelOlder "5.11";
|
2021-12-21 02:18:32 +00:00
|
|
|
};
|
|
|
|
}
|