bcachefs-kernel-module: Nest within bcachefs-tools (#446975)
This commit is contained in:
@@ -178,8 +178,20 @@ let
|
|||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options.boot.bcachefs.package = lib.mkPackageOption pkgs "bcachefs-tools" { } // {
|
options.boot.bcachefs = {
|
||||||
description = "Configured Bcachefs userspace package.";
|
package = lib.mkPackageOption pkgs "bcachefs-tools" {
|
||||||
|
extraDescription = ''
|
||||||
|
This package should also provide a passthru 'kernelModule'
|
||||||
|
attribute to build the out-of-tree kernel module.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
modulePackage = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
# See NOTE in linux-kernels.nix
|
||||||
|
default = config.boot.kernelPackages.callPackage cfg.package.kernelModule { };
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
options.services.bcachefs.autoScrub = {
|
options.services.bcachefs.autoScrub = {
|
||||||
@@ -245,8 +257,8 @@ in
|
|||||||
system.fsPackages = [ cfg.package ];
|
system.fsPackages = [ cfg.package ];
|
||||||
services.udev.packages = [ cfg.package ];
|
services.udev.packages = [ cfg.package ];
|
||||||
|
|
||||||
boot.extraModulePackages = lib.optionals (!config.boot.kernelPackages.bcachefs.meta.broken) [
|
boot.extraModulePackages = lib.optionals (!cfg.modulePackage.meta.broken) [
|
||||||
config.boot.kernelPackages.bcachefs
|
cfg.modulePackage
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
bcachefs-tools:
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
bcachefs-tools,
|
|
||||||
kernelModuleMakeFlags,
|
kernelModuleMakeFlags,
|
||||||
kernel,
|
kernel,
|
||||||
}:
|
}:
|
||||||
@@ -118,6 +118,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
# See NOTE in linux-kernels.nix
|
||||||
|
kernelModule = import ./kernel-module.nix finalAttrs.finalPackage;
|
||||||
|
|
||||||
tests = {
|
tests = {
|
||||||
version = testers.testVersion {
|
version = testers.testVersion {
|
||||||
package = finalAttrs.finalPackage;
|
package = finalAttrs.finalPackage;
|
||||||
|
|||||||
@@ -375,7 +375,11 @@ in
|
|||||||
|
|
||||||
bbswitch = callPackage ../os-specific/linux/bbswitch { };
|
bbswitch = callPackage ../os-specific/linux/bbswitch { };
|
||||||
|
|
||||||
bcachefs = callPackage ../os-specific/linux/bcachefs-kernel-module { };
|
# NOTE: The bcachefs module is called this way to facilitate
|
||||||
|
# easy overriding, as it is expected many users will want to
|
||||||
|
# pull from the upstream git repo, which may include
|
||||||
|
# unreleased changes to the module build process.
|
||||||
|
bcachefs = callPackage pkgs.bcachefs-tools.kernelModule { };
|
||||||
|
|
||||||
ch9344 = callPackage ../os-specific/linux/ch9344 { };
|
ch9344 = callPackage ../os-specific/linux/ch9344 { };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user