nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, fetchpatch
3, kernel
4, date ? "2022-04-25"
5, commit ? "bdf6d7c1350497bc7b0be6027a51d9330645672d"
6, diffHash ? "09bcbklvfj9i9czjdpix2iz7fvjksmavaljx8l92ay1i9fapjmhc"
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
17 extraMeta = {
18 branch = "master";
19 maintainers = with lib.maintainers; [ davidak Madouura ];
20 };
21 } // argsOverride;
22
23 kernelPatches = [ {
24 name = "bcachefs-${commit}";
25
26 patch = fetchpatch {
27 name = "bcachefs-${commit}.diff";
28 url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${commit}&id2=v${lib.versions.majorMinor kernel.version}";
29 sha256 = diffHash;
30 };
31
32 extraConfig = "BCACHEFS_FS m";
33 } ] ++ kernelPatches;
34}))