summary refs log blame commit diff
path: root/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
blob: a80642334f3c0b0ee81968095782de76b7ee39d5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


            


                                                                  



                                                                                                                                            
 


                                                                                 
                                                                  
 

                        
                                                               

                    
 
                     
                                         
 
                          

                                                                                                                                       

                          
 

                                    
   
{ lib
, fetchpatch
, kernel
, commitDate ? "2022-10-31"
, currentCommit ? "77c27f28aa58e9d9037eb68c87d3283f68c371f7"
, diffHash ? "sha256-TUpI9z0ac3rjn2oT5Z7oQXevDKbGwTVjyigS5/aGwgQ="
, 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-${commitDate}";

    extraMeta = {
      branch = "master";
      maintainers = with lib.maintainers; [ davidak Madouura ];
    };
  } // argsOverride;

  kernelPatches = [ {
      name = "bcachefs-${currentCommit}";

      patch = fetchpatch {
        name = "bcachefs-${currentCommit}.diff";
        url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${currentCommit}&id2=v${lib.versions.majorMinor kernel.version}";
        sha256 = diffHash;
      };

      extraConfig = "BCACHEFS_FS m";
    } ] ++ kernelPatches;
}))