35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ lib
|
|
, fetchpatch
|
|
, kernel
|
|
, date ? "2021-12-26"
|
|
, commit ? "b034dfb24fece43a7677b9a29781495aeb62767f"
|
|
, diffHash ? "0m7qrnfrcx3dki9lmsq3jk3mcrfm99djh83gwwjh401ql0cycx5p"
|
|
, kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage
|
|
, argsOverride ? {}
|
|
, ...
|
|
} @ args:
|
|
|
|
# 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;
|
|
|
|
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;
|
|
}))
|