mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ lib
|
|
, fetchpatch
|
|
, kernel
|
|
, date ? "2022-01-12"
|
|
, commit ? "0e6eb60f8be14b02e0a76cb330f4b22c80ec82e9"
|
|
, diffHash ? "091w4r7h93s5rv8hk65aix7l0rr4bd504mv998j7x360bqlb7vpi"
|
|
, 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;
|
|
}))
|