mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-26 21:09:42 +01:00
apple/t2: factor out kernel definition for improved readability
This commit is contained in:
parent
6e253f12b1
commit
f75ab8b22c
1 changed files with 8 additions and 6 deletions
|
@ -2,6 +2,9 @@
|
||||||
, ... } @ args:
|
, ... } @ args:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
version = "6.9.4";
|
||||||
|
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
||||||
|
|
||||||
patchRepo = fetchFromGitHub {
|
patchRepo = fetchFromGitHub {
|
||||||
owner = "t2linux";
|
owner = "t2linux";
|
||||||
repo = "linux-t2-patches";
|
repo = "linux-t2-patches";
|
||||||
|
@ -9,8 +12,10 @@ let
|
||||||
hash = "sha256-mwT4cuIBrz3tz8+fAxVKmnRtkPRp3lWmNbocuXCsm44=";
|
hash = "sha256-mwT4cuIBrz3tz8+fAxVKmnRtkPRp3lWmNbocuXCsm44=";
|
||||||
};
|
};
|
||||||
|
|
||||||
version = "6.9.4";
|
kernel = fetchzip {
|
||||||
majorVersion = with lib; (elemAt (take 1 (splitVersion version)) 0);
|
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
||||||
|
hash = "sha256-8jC5DpPi6poig1gmJPIIZ2HMwQQt1kTK4PcvyYm+Hsg=";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
buildLinux (args // {
|
buildLinux (args // {
|
||||||
inherit version;
|
inherit version;
|
||||||
|
@ -20,10 +25,7 @@ buildLinux (args // {
|
||||||
modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}";
|
modDirVersion = with lib; "${concatStringsSep "." (take 3 (splitVersion "${version}.0"))}";
|
||||||
|
|
||||||
src = runCommand "patched-source" {} ''
|
src = runCommand "patched-source" {} ''
|
||||||
cp -r ${fetchzip {
|
cp -r ${kernel} $out
|
||||||
url = "mirror://kernel/linux/kernel/v${majorVersion}.x/linux-${version}.tar.xz";
|
|
||||||
hash = "sha256-8jC5DpPi6poig1gmJPIIZ2HMwQQt1kTK4PcvyYm+Hsg=";
|
|
||||||
}} $out
|
|
||||||
chmod -R u+w $out
|
chmod -R u+w $out
|
||||||
cd $out
|
cd $out
|
||||||
while read -r patch; do
|
while read -r patch; do
|
||||||
|
|
Loading…
Reference in a new issue