2021-02-14 09:07:41 +01:00
|
|
|
{ lib, stdenv, kernel, fetchFromGitHub, }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-02-14 09:15:38 +01:00
|
|
|
pname = "mbp2018-bridge-drv";
|
2021-02-15 15:23:14 +01:00
|
|
|
version = "0.01";
|
2021-02-14 09:07:41 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MCMrARM";
|
|
|
|
repo = "mbp2018-bridge-drv";
|
2021-02-15 15:28:18 +01:00
|
|
|
rev = "${version}";
|
2021-02-14 09:07:41 +01:00
|
|
|
sha256 = "0ac2l51ybfrvg8m36x67rsvgjqs1vwp7c89ssvbjkrcq3y4qdb53";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
2021-02-14 09:22:13 +01:00
|
|
|
-j$NIX_BUILD_CORES M=$(pwd) modules
|
2021-02-14 09:07:41 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
|
|
|
INSTALL_MOD_PATH=$out M=$(pwd) modules_install
|
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2021-02-14 09:22:13 +01:00
|
|
|
maintainers = [ lib.maintainers.hlolli ];
|
2021-02-14 09:07:41 +01:00
|
|
|
};
|
|
|
|
}
|