2021-10-20 19:04:48 +00:00
|
|
|
{ lib
|
|
|
|
, fetchpatch
|
|
|
|
, kernel
|
2022-01-28 14:29:01 +00:00
|
|
|
, date ? "2022-01-12"
|
|
|
|
, commit ? "0e6eb60f8be14b02e0a76cb330f4b22c80ec82e9"
|
|
|
|
, diffHash ? "091w4r7h93s5rv8hk65aix7l0rr4bd504mv998j7x360bqlb7vpi"
|
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";
|
|
|
|
maintainers = with lib.maintainers; [ davidak chiiruno ];
|
|
|
|
};
|
|
|
|
} // 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
|
|
|
}))
|