depot/third_party/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

41 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchpatch
, kernel
, commitDate ? "2023-06-28"
# bcachefs-tools stores the expected-revision in:
# https://evilpiepirate.org/git/bcachefs-tools.git/tree/.bcachefs_revision
# but this does not means that it'll be the latest-compatible revision
, currentCommit ? "84f132d5696138bb038d2dc8f1162d2fab5ac832"
, diffHash ? "sha256-RaBWBU7rXjJFb1euFAFBHWCBQAG7npaCodjp/vMYpyw="
, 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 // {
version = "${kernel.version}-bcachefs-unstable-${commitDate}";
extraMeta = {
branch = "master";
broken = stdenv.isAarch64;
maintainers = with lib.maintainers; [ davidak Madouura pedrohlc raitobezarius ];
};
structuredExtraConfig = with lib.kernel; {
BCACHEFS_FS = module;
BCACHEFS_QUOTA = option yes;
BCACHEFS_POSIX_ACL = option yes;
};
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;
};
} ] ++ kernelPatches;
}))