mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
39 lines
910 B
Nix
39 lines
910 B
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, kernel
|
|
, kmod
|
|
}:
|
|
|
|
let
|
|
kerneldir = "lib/modules/${kernel.modDirVersion}";
|
|
in stdenv.mkDerivation rec {
|
|
pname = "gcadapter-oc-kmod";
|
|
version = "1.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "HannesMann";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1nqhj3vqq9rnj37cnm2c4867mnxkr8di3i036shcz44h9qmy9d40";
|
|
};
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = [
|
|
"KERNEL_SOURCE_DIR=${kernel.dev}/${kerneldir}/build"
|
|
"INSTALL_MOD_PATH=$(out)"
|
|
];
|
|
|
|
installPhase = ''
|
|
install -D {,$out/${kerneldir}/extra/}gcadapter_oc.ko
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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;
|
|
};
|
|
}
|