3
0
Fork 0
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:
Matthieu Coudron 2019-08-20 14:15:51 +09:00 committed by GitHub
commit 3b205ad3a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View file

@ -36,6 +36,7 @@ in
boot.kernelPackages = mkOption {
default = pkgs.linuxPackages;
type = types.unspecified // { merge = mergeEqualOption; };
apply = kernelPackages: kernelPackages.extend (self: super: {
kernel = super.kernel.override {
inherit randstructSeed;

View file

@ -2,7 +2,7 @@
# 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 {
name = "blcr_${kernel.version}-0.8.6pre4";

View file

@ -1,7 +1,11 @@
{ lib, callPackage, fetchurl, stdenv }:
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, libsOnly ? false }: if libsOnly then { } else kernel) { };

View file

@ -15716,7 +15716,7 @@ in
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 {
inherit kernel;
@ -15737,7 +15737,7 @@ in
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 {};
@ -15805,7 +15805,8 @@ in
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 { };