2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, fetchpatch
|
|
|
|
, kernel
|
2022-02-10 20:34:41 +00:00
|
|
|
, date ? "2022-01-12"
|
|
|
|
, commit ? "0e6eb60f8be14b02e0a76cb330f4b22c80ec82e9"
|
|
|
|
, diffHash ? "091w4r7h93s5rv8hk65aix7l0rr4bd504mv998j7x360bqlb7vpi"
|
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}";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
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}";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2021-10-28 06:52:43 +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-30 13:39:12 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
extraConfig = "BCACHEFS_FS m";
|
|
|
|
} ] ++ kernelPatches;
|
2021-12-06 16:07:01 +00:00
|
|
|
}))
|