1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware.git synced 2024-10-18 14:35:21 -04:00

Use the newly refactored code

This commit is contained in:
mexisme 2022-11-28 20:28:52 +13:00
parent 158f86bb32
commit 3de7b6e0c5
2 changed files with 79 additions and 79 deletions

View file

@ -6,7 +6,7 @@
}: }:
# To test the kernel build: # To test the kernel build:
# nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./. {}).kernel" # nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel"
let let
inherit (lib) kernel recurseIntoAttrs; inherit (lib) kernel recurseIntoAttrs;

View file

@ -1,24 +1,24 @@
{ lib, callPackage, linuxPackagesFor, ... }: { lib,
# To test the kernel build: repos,
# nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./linux-5.16.11.nix {}).kernel" }:
let
repos = callPackage ../repos.nix {};
linuxPkg = { fetchurl, buildLinux, ... }@args:
buildLinux (args // rec {
version = "5.16.11";
modDirVersion = version;
extraMeta.branch = "5.16";
let
inherit (lib) kernel;
version = "5.16.11";
in {
inherit version;
modDirVersion = version;
branch = "5.16";
src = repos.linux-surface-kernel { src = repos.linux-surface-kernel {
# Kernel 5.16.11 # Kernel 5.16.11 from the linux-surface/kernel repo:
rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f"; rev = "db94c89f56d6ceae03ca3802e11197f48e6c539f";
sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2"; sha256 = "0c58ri0i9gdb4w7l361pnkvq6ap17kmgnxngh0bcdmgn4dc88wx2";
}; };
kernelPatches = [{ kernelPatches = [{
name = "microsoft-surface-patches-linux-5.16.2"; name = "microsoft-surface-patches-linux-${version}";
patch = null; patch = null;
structuredExtraConfig = with lib.kernel; { structuredExtraConfig = with kernel; {
# #
# Surface Aggregator Module # Surface Aggregator Module
# #
@ -87,5 +87,5 @@ let
SURFACE_BOOK1_DGPU_SWITCH = module; SURFACE_BOOK1_DGPU_SWITCH = module;
}; };
}]; }];
} // (args.argsOverride or {})); }
in lib.recurseIntoAttrs (linuxPackagesFor (callPackage linuxPkg {}))