mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ 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;
|
|
}))
|