34 lines
1 KiB
Nix
34 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, kernel }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "asus-ec-sensors-${version}-${kernel.version}";
|
|
version = "unstable-2021-12-16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zeule";
|
|
repo = "asus-ec-sensors";
|
|
rev = "3621741c4ecb93216d546942707a9c413e971787";
|
|
sha256 = "0akdga2854q3w0pyi0jywa6cxr32541ifz0ka1hgn6j4czk39kyn";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|