at 22.05-pre 32 lines 1.0 kB view raw
1{ lib 2, fetchpatch 3, kernel 4, date ? "2021-11-06" 5, commit ? "10669a2c540de3276c8d2fc0e43be62f2886f377" 6, diffHash ? "1rn72wd8jg919j74x8banl70b2bdd6r9fgvnw693j20dq96j5cnw" 7, kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage 8, argsOverride ? {} 9, ... 10} @ args: 11 12# NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility 13(kernel.override ( args // { 14 argsOverride = { 15 version = "${kernel.version}-bcachefs-unstable-${date}"; 16 extraMeta = { 17 branch = "master"; 18 maintainers = with lib.maintainers; [ davidak chiiruno ]; 19 }; 20 } // argsOverride; 21 22 kernelPatches = [ { 23 name = "bcachefs-${commit}"; 24 patch = fetchpatch { 25 name = "bcachefs-${commit}.diff"; 26 url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${commit}&id2=v${lib.versions.majorMinor kernel.version}"; 27 sha256 = diffHash; 28 }; 29 extraConfig = "BCACHEFS_FS m"; 30 } ] ++ kernelPatches; 31 32}))