Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 48 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 kernel, 6 kernelModuleMakeFlags, 7 nix-update-script, 8}: 9 10stdenv.mkDerivation { 11 pname = "nct6687d"; 12 version = "0-unstable-2025-06-30"; 13 14 src = fetchFromGitHub { 15 owner = "Fred78290"; 16 repo = "nct6687d"; 17 rev = "66ddfee6fb6b8515fb8a27698acbb9b2b8e9d2c2"; 18 hash = "sha256-orlYpmU+wIxVyPjuk/faQrGKtEcliWI2Hgxcw5DReX4="; 19 }; 20 21 setSourceRoot = '' 22 export sourceRoot=$(pwd)/source 23 ''; 24 25 nativeBuildInputs = kernel.moduleBuildDependencies; 26 27 makeFlags = kernelModuleMakeFlags ++ [ 28 "-C" 29 "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 30 "M=$(sourceRoot)" 31 ]; 32 33 buildFlags = [ "modules" ]; 34 installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; 35 installTargets = [ "modules_install" ]; 36 37 passthru.updateScript = nix-update-script { 38 extraArgs = [ "--version=branch=main" ]; 39 }; 40 41 meta = with lib; { 42 description = "Kernel module for the Nuvoton NCT6687-R chipset found on many B550/B650 motherboards from ASUS and MSI"; 43 license = with licenses; [ gpl2Only ]; 44 homepage = "https://github.com/Fred78290/nct6687d/"; 45 platforms = platforms.linux; 46 maintainers = with maintainers; [ atemu ]; 47 }; 48}