2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-12-07 07:45:13 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, kernel
|
|
|
|
, kmod
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
kerneldir = "lib/modules/${kernel.modDirVersion}";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "gcadapter-oc-kmod";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "unstable-2021-12-11";
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "HannesMann";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "d4ddf15deb74c51dbdfc814d481ef127c371f444";
|
|
|
|
sha256 = "sha256-bHA1611rcO8/d48b1CHsiurEt3/n+5WErtHXAU7Eh1o=";
|
2020-12-07 07:45:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2020-12-07 07:45:13 +00:00
|
|
|
"KERNEL_SOURCE_DIR=${kernel.dev}/${kerneldir}/build"
|
|
|
|
"INSTALL_MOD_PATH=$(out)"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D {,$out/${kerneldir}/extra/}gcadapter_oc.ko
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-07 07:45:13 +00:00
|
|
|
description = "Kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter";
|
|
|
|
homepage = "https://github.com/HannesMann/gcadapter-oc-kmod";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ r-burns ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|