2021-10-20 19:04:48 +00:00
|
|
|
{ lib
|
|
|
|
, fetchpatch
|
|
|
|
, kernel
|
2022-05-03 02:49:53 +00:00
|
|
|
, date ? "2022-04-25"
|
|
|
|
, commit ? "bdf6d7c1350497bc7b0be6027a51d9330645672d"
|
|
|
|
, diffHash ? "09bcbklvfj9i9czjdpix2iz7fvjksmavaljx8l92ay1i9fapjmhc"
|
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
|
|
|
}))
|