mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-03 00:00:07 +03:00
add kernel nix builder
This commit is contained in:
parent
0d122879d1
commit
b7254160d9
34
nix/bcachefs-kernel.nix
Normal file
34
nix/bcachefs-kernel.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchpatch
|
||||||
|
, fetchgit
|
||||||
|
, fetchFromGitHub
|
||||||
|
, buildLinux
|
||||||
|
, commit
|
||||||
|
, diffHash ? lib.fakeSha256
|
||||||
|
, kernelVersion ? "5.13.0"
|
||||||
|
, kernelPatches ? [] # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage
|
||||||
|
, argsOverride ? {}
|
||||||
|
, versionString ? (builtins.substring 0 8 commit)
|
||||||
|
, ...
|
||||||
|
} @ args:
|
||||||
|
|
||||||
|
buildLinux {
|
||||||
|
inherit kernelPatches;
|
||||||
|
|
||||||
|
# pname = "linux";
|
||||||
|
version = "${kernelVersion}-bcachefs-${versionString}";
|
||||||
|
|
||||||
|
modDirVersion = kernelVersion;
|
||||||
|
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
name = "bcachefs-kernel-src";
|
||||||
|
owner = "koverstreet";
|
||||||
|
repo = "bcachefs";
|
||||||
|
rev = commit;
|
||||||
|
sha256 = diffHash;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = "BCACHEFS_FS m";
|
||||||
|
# NIX_DEBUG=5;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user