2021-10-20 19:04:48 +00:00
|
|
|
{ lib
|
|
|
|
, fetchpatch
|
|
|
|
, kernel
|
2022-03-25 16:22:19 +00:00
|
|
|
, date ? "2022-03-21"
|
|
|
|
, commit ? "c38b7167aa5f3b1b91dcc93ade57f30e95064590"
|
|
|
|
, diffHash ? "04lgwnng7p2rlz9sxn74n22750kh524xwfws3agqs12pcrvfsm0j"
|
2021-10-20 19:04:48 +00:00
|
|
|
, kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage
|
|
|
|
, argsOverride ? {}
|
|
|
|
, ...
|
|
|
|
} @ args:
|
2017-08-31 10:17:54 +00:00
|
|
|
|
2021-10-20 19:04:48 +00:00
|
|
|
# NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility
|
|
|
|
(kernel.override ( args // {
|
|
|
|
argsOverride = {
|
|
|
|
version = "${kernel.version}-bcachefs-unstable-${date}";
|
2021-12-27 23:22:59 +00:00
|
|
|
|
2021-10-20 19:04:48 +00:00
|
|
|
extraMeta = {
|
|
|
|
branch = "master";
|
2022-03-14 08:52:18 +00:00
|
|
|
maintainers = with lib.maintainers; [ davidak Madouura ];
|
2021-10-20 19:04:48 +00:00
|
|
|
};
|
|
|
|
} // argsOverride;
|
2017-08-31 10:17:54 +00:00
|
|
|
|
2021-10-20 19:04:48 +00:00
|
|
|
kernelPatches = [ {
|
|
|
|
name = "bcachefs-${commit}";
|
2021-12-27 23:22:59 +00:00
|
|
|
|
2021-10-20 19:04:48 +00:00
|
|
|
patch = fetchpatch {
|
|
|
|
name = "bcachefs-${commit}.diff";
|
|
|
|
url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${commit}&id2=v${lib.versions.majorMinor kernel.version}";
|
|
|
|
sha256 = diffHash;
|
|
|
|
};
|
2021-12-27 23:22:59 +00:00
|
|
|
|
2021-10-20 19:04:48 +00:00
|
|
|
extraConfig = "BCACHEFS_FS m";
|
|
|
|
} ] ++ kernelPatches;
|
2021-11-06 21:24:16 +00:00
|
|
|
}))
|