bcachefs: revert using json to hold bcachefs commits/hashes

The json appearantly contained the wrong checksum and we don't have a way to generate this

authored by Jörg Thalheim and committed by Jörg Thalheim 98b8e0de 1048867f

+21 -27
-5
pkgs/os-specific/linux/kernel/bcachefs.json
··· 1 - { 2 - "diffHash": "sha256-BmXd/5Hn/xr7gNFp6BsBMG2XeKFlPGxv66IQ8DEwh5k=", 3 - "commit": "4d2faeb4fb58c389dc9f76b8d5ae991ef4497e04", 4 - "date": "2023-09-28" 5 - }
···
+9 -11
pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
··· 2 , stdenv 3 , fetchpatch 4 , kernel 5 # bcachefs-tools stores the expected-revision in: 6 # https://evilpiepirate.org/git/bcachefs-tools.git/tree/.bcachefs_revision 7 # but this does not means that it'll be the latest-compatible revision 8 - , version ? lib.importJSON ./bcachefs.json 9 , kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage 10 , argsOverride ? {} 11 , ... 12 } @ args: 13 - let localversion = "-bcachefs-unstable-${version.date}"; 14 - in 15 # NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility 16 (kernel.override ( args // { 17 18 argsOverride = { 19 - version = "${kernel.version}${localversion}"; 20 - modDirVersion = "${kernel.version}${localversion}"; 21 22 extraMeta = { 23 homepage = "https://bcachefs.org/"; ··· 27 } // argsOverride; 28 29 structuredExtraConfig = with lib.kernel; { 30 - # we need this for uname 31 - LOCALVERSION = freeform localversion; 32 BCACHEFS_FS = module; 33 BCACHEFS_QUOTA = option yes; 34 BCACHEFS_POSIX_ACL = option yes; ··· 37 }; 38 39 kernelPatches = [ { 40 - name = "bcachefs-${version.commit}"; 41 42 patch = fetchpatch { 43 - name = "bcachefs-${version.commit}.diff"; 44 - url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${version.commit}&id2=v${lib.versions.majorMinor kernel.version}"; 45 - sha256 = version.diffHash; 46 }; 47 } ] ++ kernelPatches; 48 }))
··· 2 , stdenv 3 , fetchpatch 4 , kernel 5 + , commitDate ? "2023-06-28" 6 # bcachefs-tools stores the expected-revision in: 7 # https://evilpiepirate.org/git/bcachefs-tools.git/tree/.bcachefs_revision 8 # but this does not means that it'll be the latest-compatible revision 9 + , currentCommit ? "4d2faeb4fb58c389dc9f76b8d5ae991ef4497e04" 10 + , diffHash ? "sha256-DtMc8P4lTRzvS6PVvD7WtWEPsfnxIXSpqMsKKWs+edI=" 11 , kernelPatches # must always be defined in bcachefs' all-packages.nix entry because it's also a top-level attribute supplied by callPackage 12 , argsOverride ? {} 13 , ... 14 } @ args: 15 # NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility 16 (kernel.override ( args // { 17 18 argsOverride = { 19 + version = "${kernel.version}-bcachefs-unstable-${commitDate}"; 20 + modDirVersion = kernel.modDirVersion; 21 22 extraMeta = { 23 homepage = "https://bcachefs.org/"; ··· 27 } // argsOverride; 28 29 structuredExtraConfig = with lib.kernel; { 30 BCACHEFS_FS = module; 31 BCACHEFS_QUOTA = option yes; 32 BCACHEFS_POSIX_ACL = option yes; ··· 35 }; 36 37 kernelPatches = [ { 38 + name = "bcachefs-${currentCommit}"; 39 40 patch = fetchpatch { 41 + name = "bcachefs-${currentCommit}.diff"; 42 + url = "https://evilpiepirate.org/git/bcachefs.git/rawdiff/?id=${currentCommit}&id2=v${lib.versions.majorMinor kernel.version}"; 43 + sha256 = diffHash; 44 }; 45 } ] ++ kernelPatches; 46 }))
+12 -4
pkgs/tools/filesystems/bcachefs-tools/default.nix
··· 19 , rustPlatform 20 , makeWrapper 21 , fuseSupport ? false 22 - , version ? lib.importJSON ./version.json 23 }: 24 stdenv.mkDerivation { 25 pname = "bcachefs-tools"; 26 - version = "unstable-${version.date}"; 27 28 - src = fetchFromGitHub (builtins.removeAttrs version ["date"]); 29 30 nativeBuildInputs = [ 31 pkg-config ··· 63 64 makeFlags = [ 65 "PREFIX=${placeholder "out"}" 66 - "VERSION=${lib.strings.substring 0 7 version.rev}" 67 "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" 68 ]; 69
··· 19 , rustPlatform 20 , makeWrapper 21 , fuseSupport ? false 22 }: 23 + let 24 + rev = "6b175a022496572416918bd38d083120c23ba5f2"; 25 + in 26 stdenv.mkDerivation { 27 pname = "bcachefs-tools"; 28 + version = "unstable-2023-09-29"; 29 30 + 31 + src = fetchFromGitHub { 32 + owner = "koverstreet"; 33 + repo = "bcachefs-tools"; 34 + inherit rev; 35 + hash = "sha256-qC6Bq2zdO8Tj+bZbIUvcVBqvuKccqDEX3HIeOXsEloQ="; 36 + }; 37 38 nativeBuildInputs = [ 39 pkg-config ··· 71 72 makeFlags = [ 73 "PREFIX=${placeholder "out"}" 74 + "VERSION=${lib.strings.substring 0 7 rev}" 75 "INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" 76 ]; 77
-7
pkgs/tools/filesystems/bcachefs-tools/version.json
··· 1 - { 2 - "owner": "koverstreet", 3 - "repo": "bcachefs-tools", 4 - "rev": "6b175a022496572416918bd38d083120c23ba5f2", 5 - "sha256": "qC6Bq2zdO8Tj+bZbIUvcVBqvuKccqDEX3HIeOXsEloQ=", 6 - "date": "2023-09-29" 7 - }
···