Files
nixpkgs/pkgs/os-specific/linux/amdgpu-i2c/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

41 lines
1.0 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
kernel,
}:
let
KDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
in
stdenv.mkDerivation {
pname = "amdgpu-i2c";
version = "0-unstable-2024-12-16";
src = fetchFromGitHub {
owner = "twifty";
repo = "amd-gpu-i2c";
rev = "06ca41fd12fb90f970d3ebd4785cc26cc0a3f3b0";
sha256 = "sha256-GVyrwnwNSBW4OCNDqQMU6e31C4bG14arC0MPkRWfiJQ=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies;
buildPhase = "make -C ${KDIR} M=/build/source modules";
installPhase = ''
make -C ${KDIR} M=/build/source INSTALL_MOD_PATH="$out" modules_install
'';
meta = {
homepage = "https://github.com/twifty/amd-gpu-i2c";
downloadPage = "https://github.com/twifty/amd-gpu-i2c";
description = "Exposes i2c interface to set colors on AMD GPUs";
broken = kernel.kernelOlder "6.1.0" || kernel.isLibre;
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ thardin ];
};
}