depot/third_party/nixpkgs/pkgs/os-specific/linux/nct6687d/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

40 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, kernel
}:
stdenv.mkDerivation rec {
pname = "nct6687d";
version = "unstable-2023-09-22";
src = fetchFromGitHub {
owner = "Fred78290";
repo = "nct6687d";
rev = "cdfe855342a9383a9c4c918d51576c36d989070d";
hash = "sha256-iOLWxj4I6oYkNXFSkmw7meTQEnrIfb4Mw+/LkzgzDxM=";
};
setSourceRoot = ''
export sourceRoot=$(pwd)/source
'';
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags ++ [
"-C" "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"M=$(sourceRoot)"
];
buildFlags = [ "modules" ];
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
installTargets = [ "modules_install" ];
meta = with lib; {
description = "Kernel module for the Nuvoton NCT6687-R chipset found on many B550/B650 motherboards from ASUS and MSI";
license = with licenses; [ gpl2Only ];
homepage = "https://github.com/Fred78290/nct6687d/";
platforms = platforms.linux;
maintainers = with maintainers; [ atemu ];
};
}