packages/*bcachefs*: introduce flag for switching between upstream and custom bcachefs kernel and tools

This commit is contained in:
Max Headroom 2023-02-10 18:29:23 +01:00
parent f5bfd50e69
commit 9dd8d021ff

View file

@ -15,11 +15,17 @@ let
};
sandbox = path: extra: (pkgs.callPackage path ({ inherit mkNixPak; } // extra)).config.env;
useUpstreamBcachefs = true;
in
{
amberol = sandbox ./nixpak/amberol { };
bcachefs-tools = pkgs.callPackage ./tools/bcachefs-tools { };
bcachefs-tools = if useUpstreamBcachefs
then
pkgs.bcachefs-tools
else
pkgs.callPackage ./tools/bcachefs-tools { };
brig = pkgs.callPackage ./tools/brig { };
@ -49,10 +55,14 @@ in
identity = pkgs.callPackage ./apps/identity { };
linux-bcachefs = pkgs.callPackage ./kernels/linux-bcachefs rec {
kernel = pkgs.linux_6_0;
inherit (kernel) kernelPatches;
};
linux-bcachefs = if useUpstreamBcachefs
then
pkgs.linuxKernel.kernels.linux_testing_bcachefs
else
pkgs.callPackage ./kernels/linux-bcachefs rec {
kernel = pkgs.linux_6_0;
inherit (kernel) kernelPatches;
};
obfuscate = pkgs.callPackage ./apps/obfuscate { };