mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-05 15:33:29 +01:00
1 parent
2a807ad6e8
commit
8e28b9ee43
6 files changed
+140
No files matched your search
@@ -0,0 +1,46 @@
|
||||
{ lib, buildLinux, fetchFromGitHub, fetchurl, ... } @ args:
|
||||
|
||||
let
|
||||
patchRepo = fetchFromGitHub {
|
||||
owner = "t2linux";
|
||||
repo = "linux-t2-patches";
|
||||
rev = "c0db79a25bc37dbd0c27636914b3903016a2fc39";
|
||||
hash = "sha256-VILJAK7F0E/8Z3sOzsUpS9dmtpull2XVXQkakZ0UTIA=";
|
||||
};
|
||||
|
||||
version = "6.4";
|
||||
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
||||
in
|
||||
buildLinux (args // {
|
||||
inherit version;
|
||||
|
||||
pname = "linux-t2";
|
||||
# Snippet from nixpkgs
|
||||
modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
||||
hash = "sha256-j6BYjwws7KRMrHeg45ukjJ8AprncaXYcAqXT76yNp/M=";
|
||||
};
|
||||
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
APPLE_BCE = module;
|
||||
APPLE_GMUX = module;
|
||||
BRCMFMAC = module;
|
||||
BT_BCM = module;
|
||||
BT_HCIBCM4377 = module;
|
||||
BT_HCIUART_BCM = yes;
|
||||
BT_HCIUART = module;
|
||||
HID_APPLE_IBRIDGE = module;
|
||||
HID_APPLE = module;
|
||||
HID_APPLE_MAGIC_BACKLIGHT = module;
|
||||
HID_APPLE_TOUCHBAR = module;
|
||||
HID_SENSOR_ALS = module;
|
||||
SND_PCM = module;
|
||||
STAGING = yes;
|
||||
};
|
||||
|
||||
kernelPatches = lib.attrsets.mapAttrsToList (file: type: { name = file; patch = "${patchRepo}/${file}"; })
|
||||
(lib.attrsets.filterAttrs (file: type: type == "regular" && lib.strings.hasSuffix ".patch" file)
|
||||
(builtins.readDir patchRepo));
|
||||
} // (args.argsOverride or {}))
|
||||
Reference in new issue
Block a user