mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 00:53:57 +00:00
158789753f
This should fix a bug causing kernel panics when your fs has snapshots enabled. See: https://lore.kernel.org/all/bc622d24-9fad-7b3-22cb-da4bf2dd32d@ewheeler.net/T/ This patch also bumps the kernel version to 5.16, as bcachefs is devel- oping against that now.
35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ lib
|
|
, fetchpatch
|
|
, kernel
|
|
, date ? "2022-03-21"
|
|
, commit ? "c38b7167aa5f3b1b91dcc93ade57f30e95064590"
|
|
, diffHash ? "04lgwnng7p2rlz9sxn74n22750kh524xwfws3agqs12pcrvfsm0j"
|
|
, 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 Madouura ];
|
|
};
|
|
} // 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;
|
|
}))
|