2021-02-14 08:07:41 +00:00
|
|
|
{ lib, stdenv, kernel, fetchFromGitHub, }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-02-14 08:15:38 +00:00
|
|
|
pname = "mbp2018-bridge-drv";
|
2021-05-11 07:50:26 +01:00
|
|
|
version = "2020-01-31";
|
2021-02-14 08:07:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MCMrARM";
|
|
|
|
repo = "mbp2018-bridge-drv";
|
2021-05-11 07:50:26 +01:00
|
|
|
rev = "b43fcc069da73e051072fde24af4014c9c487286";
|
|
|
|
sha256 = "sha256-o6yGiR+Y5SnX1johdi7fQWP5ts7HdDMqeju75UOhgik=";
|
2021-02-14 08:07:41 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 02:24:57 +00:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
makeFlags = kernel.makeFlags;
|
|
|
|
|
2021-02-14 08:07:41 +00:00
|
|
|
buildPhase = ''
|
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
2022-02-10 02:24:57 +00:00
|
|
|
-j$NIX_BUILD_CORES M=$(pwd) modules $makeFlags
|
2021-02-14 08:07:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
2022-02-10 02:24:57 +00:00
|
|
|
INSTALL_MOD_PATH=$out M=$(pwd) modules_install $makeFlags
|
2021-02-14 08:07:41 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A driver for MacBook models 2018 and newer, which makes the keyboard, mouse and audio output work.";
|
|
|
|
longDescription = ''
|
|
|
|
A driver for MacBook models 2018 and newer, implementing the VHCI (required for mouse/keyboard/etc.) and audio functionality.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/MCMrARM/mbp2018-bridge-drv";
|
2021-02-15 14:30:26 +00:00
|
|
|
license = lib.licenses.gpl2Only;
|
2021-02-14 08:07:41 +00:00
|
|
|
platforms = platforms.linux;
|
2021-02-14 08:22:13 +00:00
|
|
|
maintainers = [ lib.maintainers.hlolli ];
|
2021-05-11 07:50:26 +01:00
|
|
|
broken = kernel.kernelOlder "5.4";
|
2021-02-14 08:07:41 +00:00
|
|
|
};
|
|
|
|
}
|