diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-11-19 19:01:25 +0100 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2021-01-02 18:54:11 +0100 |
commit | 98535733e2921685100e48337f5751910ace27bd (patch) | |
tree | 0f296c32e12a8570630cb6eb5bff02b68670be4f | |
parent | 072abfe4141833af71adb3266c46419fe5192a4b (diff) | |
download | guix-98535733e2921685100e48337f5751910ace27bd.tar.gz |
gnu: Add bcache-tools.
* gnu/packages/disk.scm (bcache-tools): New public variable.
-rw-r--r-- | gnu/packages/disk.scm | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index c4f128d14a..4070804fcb 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -89,6 +89,73 @@ #:use-module (guix packages) #:use-module (guix utils)) +(define-public bcache-tools + ;; The 1.1 release is a year old and missing new features & documentation. + (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70") + (revision "0")) + (package + (name "bcache-tools") + (version (git-version "1.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://git.kernel.org/pub/scm/" + "linux/kernel/git/colyli/bcache-tools.git")) + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test suite + #:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out") + "/lib/udev") + (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out") + "/lib/dracut") + (string-append "CC=" ,(cc-for-target))) + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-before 'install 'fix-hard-coded-file-names + (lambda _ + ;; Some rules still hard-code /usr. + (substitute* "Makefile" + (("/usr") "${PREFIX}")) + #t)) + (add-before 'install 'create-target-directories + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (for-each (lambda (dir) + (mkdir-p (string-append out dir))) + (list "/lib/udev/rules.d" + "/sbin" + "/share/man/man8")) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("util-linux:lib" ,util-linux "lib"))) ; libblkid + (home-page "https://bcache.evilpiepirate.org") + (synopsis "Tools for the Linux kernel block layer cache") + (description + "This package contains user-space utilities to create and inspect bcache +partitions. It's rather minimal as bcache is designed to work well without +configuration on any system. + +Linux's @acronym{bcache, block layer cache} lets one or more fast block devices, +such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for +one or more slower (and inexpensive) devices, such as hard disk drives or +redundant storage arrays. In fact, bcache intends to be a superior alternative +to battery-backed RAID controllers. + +Bcache is designed around the performance characteristics of SSDs and tries to +minimize write inflation. It's file-system agnostic and does both write-through +and write-back caching.") + (license license:gpl2)))) + (define-public udevil (package (name "udevil") |