2021-10-28 06:52:43 +00:00
|
|
|
{ lib
|
|
|
|
, fetchpatch
|
|
|
|
, kernel
|
2023-02-09 11:40:11 +00:00
|
|
|
, commitDate ? "2023-02-01"
|
|
|
|
, currentCommit ? "65960c284ad149cc4bfbd64f21e6889c1e3d1c5f"
|
|
|
|
, diffHash ? "sha256-4wpY3aYZ93OXSU4wmQs9K62nPyIzjKu4RBQTwksmyyk="
|
2023-01-11 07:51:40 +00:00
|
|
|
|
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 = {
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "${kernel.version}-bcachefs-unstable-${commitDate}";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
extraMeta = {
|
|
|
|
branch = "master";
|
2023-02-09 11:40:11 +00:00
|
|
|
maintainers = with lib.maintainers; [ davidak Madouura pedrohlc ];
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
} // argsOverride;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
kernelPatches = [ {
|
2022-10-21 18:38:19 +00:00
|
|
|
name = "bcachefs-${currentCommit}";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
patch = fetchpatch {
|
2022-10-21 18:38:19 +00:00
|
|
|
name = "bcachefs-${currentCommit}.diff";
|
|
|
|
url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${currentCommit}&id2=v${lib.versions.majorMinor kernel.version}";
|
2021-10-28 06:52:43 +00:00
|
|
|
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
|
|
|
}))
|