mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 03:03:37 +00:00
8f4289267c
bcachefs now supports snapshots so we need the latest version to use them. Additionally, it appears to build on AArch64 so I've removed the x86 requirement.
33 lines
1.0 KiB
Nix
33 lines
1.0 KiB
Nix
{ lib
|
|
, fetchpatch
|
|
, kernel
|
|
, date ? "2021-11-06"
|
|
, commit ? "10669a2c540de3276c8d2fc0e43be62f2886f377"
|
|
, diffHash ? "1rn72wd8jg919j74x8banl70b2bdd6r9fgvnw693j20dq96j5cnw"
|
|
, 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;
|
|
|
|
}))
|