mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 11:29:42 +01:00
Fix-ups
This commit is contained in:
parent
a51973c994
commit
87adbffa11
2 changed files with 37 additions and 5 deletions
|
@ -1,5 +1,36 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
# To test the kernel build:
|
||||||
boot.kernelPackages = pkgs.callPackage ./linux-5.16.11.nix { };
|
# nix-build -E "with import <nixpkgs> {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel"
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) kernel recurseIntoAttrs;
|
||||||
|
inherit (pkgs) buildLinux linuxPackagesFor;
|
||||||
|
repos = pkgs.callPackage ../repos.nix {};
|
||||||
|
|
||||||
|
linuxPackage =
|
||||||
|
{ version,
|
||||||
|
modDirVersion ? version,
|
||||||
|
branch,
|
||||||
|
src,
|
||||||
|
kernelPatches ? [],
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
buildLinux' = buildLinux {
|
||||||
|
inherit version src kernelPatches;
|
||||||
|
modDirVersion = version;
|
||||||
|
extraMeta.branch = branch;
|
||||||
|
};
|
||||||
|
linuxPackagesFor' = linuxPackagesFor buildLinux';
|
||||||
|
in recurseIntoAttrs linuxPackagesFor';
|
||||||
|
|
||||||
|
linux-5_16_11 = linuxPackage (
|
||||||
|
pkgs.callPackage ./linux-5.16.11.nix { inherit repos; }
|
||||||
|
);
|
||||||
|
linux-5_19_2 = linuxPackage (
|
||||||
|
pkgs.callPackage ./linux-5.19.2.nix { inherit repos; }
|
||||||
|
);
|
||||||
|
|
||||||
|
in {
|
||||||
|
boot.kernelPackages = linux-5_19_2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
{ lib,
|
{ lib,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
|
repos,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) kernel;
|
inherit (lib) kernel;
|
||||||
version = "5.19.2";
|
version = "5.19.2";
|
||||||
|
branch = "5.19";
|
||||||
|
patches = repos.linux-surface + "/patches/${branch}";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
inherit version;
|
inherit version branch;
|
||||||
modDirVersion = version;
|
modDirVersion = version;
|
||||||
branch = "5.19";
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
|
||||||
sha256 = "sha256-SOQKH1UB7GxA48htPVMZIAtojy2TYPcoMwhNdIAf5j0=";
|
sha256 = "sha256-SOQKH1UB7GxA48htPVMZIAtojy2TYPcoMwhNdIAf5j0=";
|
||||||
};
|
};
|
||||||
patches = repos.linux-surface + "/patches/${branch}";
|
|
||||||
|
|
||||||
kernelPatches = [
|
kernelPatches = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue