forked from mirrors/nixpkgs
Merge pull request #58207 from teto/kernelPackages_check
boot.kernelPackages: check for conflicts It's currently possible to set conflicting `boot.kernelPackages` several times. Nixos now warns when this is the case instead of just picking one.
This commit is contained in:
commit
3b205ad3a7
4 changed files with 11 additions and 5 deletions
|
@ -36,6 +36,7 @@ in
|
||||||
|
|
||||||
boot.kernelPackages = mkOption {
|
boot.kernelPackages = mkOption {
|
||||||
default = pkgs.linuxPackages;
|
default = pkgs.linuxPackages;
|
||||||
|
type = types.unspecified // { merge = mergeEqualOption; };
|
||||||
apply = kernelPackages: kernelPackages.extend (self: super: {
|
apply = kernelPackages: kernelPackages.extend (self: super: {
|
||||||
kernel = super.kernel.override {
|
kernel = super.kernel.override {
|
||||||
inherit randstructSeed;
|
inherit randstructSeed;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# BLCR version 0.8.6 should works with linux kernel up to version 3.17.x
|
# BLCR version 0.8.6 should works with linux kernel up to version 3.17.x
|
||||||
|
|
||||||
assert builtins.compareVersions "3.18" kernel.version == 1;
|
assert stdenv.lib.versionOlder "3.18" kernel.version;
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "blcr_${kernel.version}-0.8.6pre4";
|
name = "blcr_${kernel.version}-0.8.6pre4";
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
{ lib, callPackage, fetchurl, stdenv }:
|
{ lib, callPackage, fetchurl, stdenv }:
|
||||||
|
|
||||||
let
|
let
|
||||||
generic = args: callPackage (import ./generic.nix args) { };
|
|
||||||
|
generic = args:
|
||||||
|
if ((!lib.versionOlder args.version "391")
|
||||||
|
&& stdenv.hostPlatform.system != "x86_64-linux") then null
|
||||||
|
else callPackage (import ./generic.nix args) { };
|
||||||
kernel = callPackage # a hacky way of extracting parameters from callPackage
|
kernel = callPackage # a hacky way of extracting parameters from callPackage
|
||||||
({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { };
|
({ kernel, libsOnly ? false }: if libsOnly then { } else kernel) { };
|
||||||
|
|
||||||
|
|
|
@ -15716,7 +15716,7 @@ in
|
||||||
|
|
||||||
ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { };
|
ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { };
|
||||||
|
|
||||||
blcr = callPackage ../os-specific/linux/blcr { };
|
blcr = if stdenv.lib.versionOlder "3.18" kernel.version then callPackage ../os-specific/linux/blcr { } else null;
|
||||||
|
|
||||||
chipsec = callPackage ../tools/security/chipsec {
|
chipsec = callPackage ../tools/security/chipsec {
|
||||||
inherit kernel;
|
inherit kernel;
|
||||||
|
@ -15737,7 +15737,7 @@ in
|
||||||
|
|
||||||
hyperv-daemons = callPackage ../os-specific/linux/hyperv-daemons { };
|
hyperv-daemons = callPackage ../os-specific/linux/hyperv-daemons { };
|
||||||
|
|
||||||
e1000e = callPackage ../os-specific/linux/e1000e {};
|
e1000e = if stdenv.lib.versionOlder kernel.version "4.10" then callPackage ../os-specific/linux/e1000e {} else null;
|
||||||
|
|
||||||
ixgbevf = callPackage ../os-specific/linux/ixgbevf {};
|
ixgbevf = callPackage ../os-specific/linux/ixgbevf {};
|
||||||
|
|
||||||
|
@ -15805,7 +15805,8 @@ in
|
||||||
|
|
||||||
phc-intel = callPackage ../os-specific/linux/phc-intel { };
|
phc-intel = callPackage ../os-specific/linux/phc-intel { };
|
||||||
|
|
||||||
prl-tools = callPackage ../os-specific/linux/prl-tools { };
|
# Disable for kernels 4.15 and above due to compatibility issues
|
||||||
|
prl-tools = if stdenv.lib.versionOlder kernel.version "4.15" then callPackage ../os-specific/linux/prl-tools { } else null;
|
||||||
|
|
||||||
sch_cake = callPackage ../os-specific/linux/sch_cake { };
|
sch_cake = callPackage ../os-specific/linux/sch_cake { };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue