From 48fa6de73684b544d904f66e7de50860cec95ee3 Mon Sep 17 00:00:00 2001 From: Ahmad Draidi Date: Sun, 23 Nov 2025 12:58:51 +0400 Subject: [PATCH] gnu: Add bcachefs-linux-module. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/file-systems.scm (bcachefs-linux-module): New variable. Change-Id: Ib0e9ff3ba121d3b45c3f79b2acd31782ea93dc6c Signed-off-by: Ludovic Courtès --- gnu/packages/file-systems.scm | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 79d91aa2dc85434946e8fe958bdb6ed1cb4b7836..be894bec76e31434bd47027b6c1a2559aa4298c2 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -949,6 +949,55 @@ performance and other characteristics.") minimal bcachefs-tools package. It is meant to be used in initrds.") (license (package-license bcachefs-tools-minimal/static)))) +(define-public bcachefs-linux-module + (package + (name "bcachefs-linux-module") + (version "1.32.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://evilpiepirate.org/git/bcachefs-tools.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0m85s00i1xfb9lr73j41f80akkhcijh9m0b602r76b15a0l5v3a9")))) + (build-system linux-module-build-system) + (arguments + (list + #:tests? #f ;no 'check' target + #:source-directory "build/src/fs/bcachefs" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda* (#:key version #:allow-other-keys) + (substitute* "Makefile" + ;; Remove unnecessary dependency on cargo + (("^VERSION=\\$.*$") + (string-append "VERSION=\"" + #$version "\"")) + ;; Remove unnecessary dependencies + (("^.*PKG_CONFIG.*$") + "")))) + (add-before 'configure 'prepare-build-dir + (lambda _ + (invoke "make" "install_dkms" + (string-append "DESTDIR=" + (getcwd) "/") "DKMSDIR=build/")))))) + (home-page (package-home-page bcachefs-tools-minimal/static)) + (synopsis "Bcachefs Linux kernel module") + (description + "This package provides the Linux kernel module for Bcachefs. + +@dfn{Bcachefs} is a @acronym{CoW, copy-on-write} file system supporting native +encryption, compression, snapshots, and (meta)data checksums. It can use +multiple block devices for replication and/or performance, similar to RAID. + +In addition, Bcachefs provides all the functionality of bcache, a block-layer +caching system, and lets you assign different roles to each device based on its +performance and other characteristics.") + (license license:gpl2))) + (define-public exfatprogs (package (name "exfatprogs")