1 { lib, stdenv, fetchFromGitHub, kernel }:
3 stdenv.mkDerivation rec {
4 name = "asus-ec-sensors-${version}-${kernel.version}";
5 version = "unstable-2022-07-10";
7 src = fetchFromGitHub {
9 repo = "asus-ec-sensors";
10 rev = "5fbdd1461dc88fc952e02717b8120438ce5558b3";
11 sha256 = "sha256-kBGl8i7HzdItMoM7L91OfX6y+bqDfd22WICRg0n25pI=";
14 hardeningDisable = [ "pic" ];
16 nativeBuildInputs = kernel.moduleBuildDependencies;
19 "KERNELRELEASE=${kernel.modDirVersion}"
20 "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
24 install asus-ec-sensors.ko -Dm444 -t ${placeholder "out"}/lib/modules/${kernel.modDirVersion}/kernel/drivers/hwmon
28 description = "Linux HWMON sensors driver for ASUS motherboards to read sensor data from the embedded controller";
29 homepage = "https://github.com/zeule/asus-ec-sensors";
30 license = licenses.gpl2Only;
31 platforms = [ "x86_64-linux" ];
32 maintainers = with maintainers; [ nickhu ];
33 broken = kernel.kernelOlder "5.11";