mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +00:00
35 lines
1.0 KiB
Nix
35 lines
1.0 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 ];
|
|
};
|
|
}
|