diff --git a/pkgs/os-specific/linux/kernel/bcachefs.json b/pkgs/os-specific/linux/kernel/bcachefs.json deleted file mode 100644 index 09f7ea2febaa..000000000000 --- a/pkgs/os-specific/linux/kernel/bcachefs.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "diffHash": "sha256-BmXd/5Hn/xr7gNFp6BsBMG2XeKFlPGxv66IQ8DEwh5k=", - "commit": "4d2faeb4fb58c389dc9f76b8d5ae991ef4497e04", - "date": "2023-09-28" -} diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix index 9709e698bfd7..c58c4e67e4d0 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix @@ -2,22 +2,22 @@ , 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 -, version ? lib.importJSON ./bcachefs.json +, currentCommit ? "4d2faeb4fb58c389dc9f76b8d5ae991ef4497e04" +, diffHash ? "sha256-DtMc8P4lTRzvS6PVvD7WtWEPsfnxIXSpqMsKKWs+edI=" , kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage , argsOverride ? {} , ... } @ args: -let localversion = "-bcachefs-unstable-${version.date}"; -in # NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility (kernel.override ( args // { argsOverride = { - version = "${kernel.version}${localversion}"; - modDirVersion = "${kernel.version}${localversion}"; + version = "${kernel.version}-bcachefs-unstable-${commitDate}"; + modDirVersion = kernel.modDirVersion; extraMeta = { homepage = "https://bcachefs.org/"; @@ -27,8 +27,6 @@ in } // argsOverride; structuredExtraConfig = with lib.kernel; { - # we need this for uname - LOCALVERSION = freeform localversion; BCACHEFS_FS = module; BCACHEFS_QUOTA = option yes; BCACHEFS_POSIX_ACL = option yes; @@ -37,12 +35,12 @@ in }; kernelPatches = [ { - name = "bcachefs-${version.commit}"; + name = "bcachefs-${currentCommit}"; patch = fetchpatch { - name = "bcachefs-${version.commit}.diff"; - url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${version.commit}&id2=v${lib.versions.majorMinor kernel.version}"; - sha256 = version.diffHash; + name = "bcachefs-${currentCommit}.diff"; + url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${currentCommit}&id2=v${lib.versions.majorMinor kernel.version}"; + sha256 = diffHash; }; } ] ++ kernelPatches; })) diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix index a121a2c6d93a..8ea406a5f1f2 100644 --- a/pkgs/tools/filesystems/bcachefs-tools/default.nix +++ b/pkgs/tools/filesystems/bcachefs-tools/default.nix @@ -19,13 +19,21 @@ , rustPlatform , makeWrapper , fuseSupport ? false -, version ? lib.importJSON ./version.json }: +let + rev = "6b175a022496572416918bd38d083120c23ba5f2"; +in stdenv.mkDerivation { pname = "bcachefs-tools"; - version = "unstable-${version.date}"; + version = "unstable-2023-09-29"; - src = fetchFromGitHub (builtins.removeAttrs version ["date"]); + + src = fetchFromGitHub { + owner = "koverstreet"; + repo = "bcachefs-tools"; + inherit rev; + hash = "sha256-qC6Bq2zdO8Tj+bZbIUvcVBqvuKccqDEX3HIeOXsEloQ="; + }; nativeBuildInputs = [ pkg-config @@ -63,7 +71,7 @@ stdenv.mkDerivation { makeFlags = [ "PREFIX=${placeholder "out"}" - "VERSION=${lib.strings.substring 0 7 version.rev}" + "VERSION=${lib.strings.substring 0 7 rev}" "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" ]; diff --git a/pkgs/tools/filesystems/bcachefs-tools/version.json b/pkgs/tools/filesystems/bcachefs-tools/version.json deleted file mode 100644 index 061fdcdbac67..000000000000 --- a/pkgs/tools/filesystems/bcachefs-tools/version.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "owner": "koverstreet", - "repo": "bcachefs-tools", - "rev": "6b175a022496572416918bd38d083120c23ba5f2", - "sha256": "qC6Bq2zdO8Tj+bZbIUvcVBqvuKccqDEX3HIeOXsEloQ=", - "date": "2023-09-29" -}