depot/pkgs/os-specific/linux/it87/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

37 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, kernel }:
stdenv.mkDerivation rec {
name = "it87-${version}-${kernel.version}";
version = "unstable-2024-06-09";
# Original is no longer maintained.
# This is the same upstream as the AUR uses.
src = fetchFromGitHub {
owner = "frankcrawford";
repo = "it87";
rev = "a82899557b4779b87d444a43caf126615e03bb4a";
hash = "sha256-aMMK3QoeXr6mPbo4SDXE8UuWc/oJ3lpgyK7wyEDKaEM=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies;
preConfigure = ''
sed -i 's|depmod|#depmod|' Makefile
'';
makeFlags = [
"TARGET=${kernel.modDirVersion}"
"KERNEL_MODULES=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
"MODDESTDIR=$(out)/lib/modules/${kernel.modDirVersion}/kernel/drivers/hwmon"
];
meta = with lib; {
description = "Patched module for IT87xx superio chip sensors support";
homepage = "https://github.com/hannesha/it87";
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = teams.lumiguide.members;
};
}