2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, fetchpatch
|
|
|
|
, kernel
|
2021-12-06 16:07:01 +00:00
|
|
|
, date ? "2021-11-06"
|
|
|
|
, commit ? "10669a2c540de3276c8d2fc0e43be62f2886f377"
|
|
|
|
, diffHash ? "1rn72wd8jg919j74x8banl70b2bdd6r9fgvnw693j20dq96j5cnw"
|
2021-10-28 06:52:43 +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:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
# NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility
|
|
|
|
(kernel.override ( args // {
|
|
|
|
argsOverride = {
|
|
|
|
version = "${kernel.version}-bcachefs-unstable-${date}";
|
|
|
|
extraMeta = {
|
|
|
|
branch = "master";
|
|
|
|
maintainers = with lib.maintainers; [ davidak chiiruno ];
|
|
|
|
};
|
|
|
|
} // argsOverride;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
kernelPatches = [ {
|
|
|
|
name = "bcachefs-${commit}";
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
extraConfig = "BCACHEFS_FS m";
|
|
|
|
} ] ++ kernelPatches;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
}))
|