From b7254160d9b7445cc3954dc1197e0b997f31c071 Mon Sep 17 00:00:00 2001 From: Kayla Firestack Date: Thu, 14 Oct 2021 10:16:32 -0400 Subject: [PATCH] add kernel nix builder --- nix/bcachefs-kernel.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 nix/bcachefs-kernel.nix diff --git a/nix/bcachefs-kernel.nix b/nix/bcachefs-kernel.nix new file mode 100644 index 00000000..2e4f339d --- /dev/null +++ b/nix/bcachefs-kernel.nix @@ -0,0 +1,34 @@ +{ lib +, fetchpatch +, fetchgit +, fetchFromGitHub +, buildLinux +, commit +, diffHash ? lib.fakeSha256 +, kernelVersion ? "5.13.0" +, kernelPatches ? [] # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage +, argsOverride ? {} +, versionString ? (builtins.substring 0 8 commit) +, ... +} @ args: + +buildLinux { + inherit kernelPatches; + + # pname = "linux"; + version = "${kernelVersion}-bcachefs-${versionString}"; + + modDirVersion = kernelVersion; + + + src = fetchFromGitHub { + name = "bcachefs-kernel-src"; + owner = "koverstreet"; + repo = "bcachefs"; + rev = commit; + sha256 = diffHash; + }; + + extraConfig = "BCACHEFS_FS m"; + # NIX_DEBUG=5; +} \ No newline at end of file