|
32 | 32 | else |
33 | 33 | abort "Invalid kernel version: ${kernelVersion}"; |
34 | 34 |
|
35 | | - # Set the version and hash for the linux-surface releases |
36 | | - pkgVersion = |
37 | | - with config.hardware.microsoft-surface; |
38 | | - if kernelVersion == "longterm" then |
39 | | - "6.12.7" |
40 | | - else if kernelVersion == "stable" then |
41 | | - "6.15.3" |
42 | | - else |
43 | | - abort "Invalid kernel version: ${kernelVersion}"; |
44 | | - |
45 | | - pkgHash = |
46 | | - with config.hardware.microsoft-surface; |
47 | | - if kernelVersion == "longterm" then |
48 | | - "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=" |
49 | | - else if kernelVersion == "stable" then |
50 | | - "sha256-ozvYrZDiVtMkdCcVnNEdlF2Kdw4jivW0aMJrDynN3Hk=" |
51 | | - else |
52 | | - abort "Invalid kernel version: ${kernelVersion}"; |
53 | | - |
54 | | - # Fetch the linux-surface package |
55 | | - repos = |
56 | | - pkgs.callPackage |
57 | | - ( |
58 | | - { |
59 | | - fetchFromGitHub, |
60 | | - rev, |
61 | | - hash, |
62 | | - }: |
63 | | - { |
64 | | - linux-surface = fetchFromGitHub { |
65 | | - owner = "linux-surface"; |
66 | | - repo = "linux-surface"; |
67 | | - rev = rev; |
68 | | - hash = hash; |
69 | | - }; |
70 | | - } |
71 | | - ) |
72 | | - { |
73 | | - hash = pkgHash; |
74 | | - rev = "arch-${pkgVersion}-1"; |
75 | | - }; |
| 35 | + # Fetch the latest linux-surface patches |
| 36 | + linux-surface = pkgs.fetchFromGitHub { |
| 37 | + owner = "linux-surface"; |
| 38 | + repo = "linux-surface"; |
| 39 | + rev = "50d0ed6be462a5fdb643cfe8469bf69158afae42"; |
| 40 | + hash = "sha256-ozvYrZDiVtMkdCcVnNEdlF2Kdw4jivW0aMJrDynN3Hk="; |
| 41 | + }; |
76 | 42 |
|
77 | | - # Fetch and build the kernel package |
78 | | - inherit (pkgs.callPackage ./kernel/linux-package.nix { inherit repos; }) |
| 43 | + # Fetch and build the kernel |
| 44 | + inherit (pkgs.callPackage ./kernel/linux-package.nix { }) |
79 | 45 | linuxPackage |
80 | 46 | surfacePatches |
81 | 47 | ; |
82 | 48 | kernelPatches = surfacePatches { |
83 | | - version = pkgVersion; |
84 | | - patchFn = ./kernel/${versions.majorMinor pkgVersion}/patches.nix; |
85 | | - patchSrc = (repos.linux-surface + "/patches/${versions.majorMinor pkgVersion}"); |
| 49 | + version = srcVersion; |
| 50 | + patchFn = ./kernel/${versions.majorMinor srcVersion}/patches.nix; |
| 51 | + patchSrc = (linux-surface + "/patches/${versions.majorMinor srcVersion}"); |
86 | 52 | }; |
87 | 53 | kernelPackages = linuxPackage { |
88 | 54 | inherit kernelPatches; |
|
0 commit comments