Skip to content

Instantly share code, notes, and snippets.

@YellowOnion
Created October 17, 2021 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save YellowOnion/4c7749261a2acd07c865853d9a390f75 to your computer and use it in GitHub Desktop.
Save YellowOnion/4c7749261a2acd07c865853d9a390f75 to your computer and use it in GitHub Desktop.
bcachefs support (needs fixing)
{ config, lib, pkgs, ... }:
with lib;
let
kernel = {
date = "2021-10-01";
commit = "4114ced1db46";
hash = "05rnr7d704cq60k4yfw070ph9z6zjkrl68c07rca9cwx6km34zqf";
version = "5.13";
};
tools = {
date = "2021-06-23";
commit = "3f7b0b0832a61ccaf590f3503521eb7cf8f14f64";
hash = "06a81dhnm3qfwin6rh4nryyrz4yhaqbcmac9s4jdcyg5707lp49w";
};
nixkernel = "linux_5_14";
in
{
disabledModules = [ "tasks/filesystems/zfs.nix" ];
nixpkgs.overlays = [
(self: oldpkgs: {
linux_testing_bcachefs = oldpkgs.linux_testing_bcachefs.override {
doCheck = false;
argsOverride = rec {
version = "5.13.19";
modDirVersion = "5.13.19";
src = oldpkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "0yxbcd1k4l4cmdn0hzcck4s0yvhvq9fpwp120dv9cz4i9rrfqxz8";
};
};
kernelPatches = oldpkgs.linux_testing_bcachefs.kernelPatches ++ [(
rec {
name = "bcachefs-${kernel.date}";
patch = oldpkgs.fetchurl {
name = "bcachefs-${kernel.commit}-v${kernel.version}.patch";
url = "https://raw.githubusercontent.com/YellowOnion/bcachefs-patches/master/v${kernel.version}/bcachefs-v${kernel.version}-${kernel.date}-${kernel.commit}.patch";
sha256 = kernel.hash;
};
})];
dontStrip = true;
extraConfig = "BCACHEFS_FS m";
};
#bcachefs-tools = pkgs.callPackage (pkgs.fetchgit {
# url = "https://evilpiepirate.org/git/bcachefs-tools.git";
# rev = tools.commit;
# sha256 = tools.hash;
#}) {};
#bcachefs-tools = oldpkgs.bcachefs-tools.overrideDerivation ( oldAttrs: with oldpkgs; {
# version = "2021-08-04";
#nativeBuildInputs = [ git pkgconfig ];
# buildInputs =
# [
# git pkgconfig
# liburcu libuuid libaio zlib attr keyutils
# libsodium libscrypt
# ];
# enableParallelBuilding = true;
# makeFlags =
# [ "PREFIX=$(out)"
# ];
# src = oldpkgs.fetchgit {
# url = "https://evilpiepirate.org/git/bcachefs-tools.git";
# rev = tools.commit;
# sha256 = tools.hash;
# };
# });
})];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment