summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2020-05-24 09:53:30 +0200
committerGuix Patches Tester <>2020-05-24 21:36:39 +0100
commit9be31acc9ff431c2eb01611534de833f39f7f843 (patch)
tree5563a06acd2f904c08b5e5e92522e2cf8e106e52
parent0cbb5390e4722d985d758cb788139fa86f7764c9 (diff)
downloadpatches-series-4075.tar
patches-series-4075.tar.gz
gnu: Add mergerfs.series-4075
* gnu/packages/storage.scm (mergerfs): New variable.
-rw-r--r--gnu/packages/storage.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm
index 481ffade5c..b8090c7eaa 100644
--- a/gnu/packages/storage.scm
+++ b/gnu/packages/storage.scm
@@ -23,6 +23,7 @@
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages assembly)
@@ -248,3 +249,53 @@ storage protocols (S3, NFS, and others) through the RADOS gateway.")
license:cc-by-sa3.0 ;documentation
license:bsd-3 ;isa-l,jerasure,++
license:expat)))) ;civetweb,java bindings
+
+(define-public mergerfs
+ (package
+ (name "mergerfs")
+ (version "2.29.0")
+ ;; mergerfs bundles a heavily modified copy of libfuse
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
+ version "/mergerfs-" version ".tar.gz"))
+ (sha256
+ (base32
+ "17gizw4vgbqqjd2ykkfpp276942jb5qclp0lkiwkmq1yjgyjqfmk"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no tests exist
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (setenv "CC" "gcc")
+ ;; These were copied from the package libfuse
+ (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
+ (("/bin/(u?)mount" _ maybe-u)
+ (string-append (assoc-ref inputs "util-linux")
+ "/bin/" maybe-u "mount")))
+ (substitute* '("libfuse/util/mount.mergerfs.c")
+ (("/bin/sh")
+ (which "sh")))
+ ;; The Makefile does not allow overriding PREFIX via make variables
+ (substitute* '("Makefile" "libfuse/Makefile")
+ (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
+ ;; cannot chown as build user
+ (("chown root:root") "true"))
+ #t)))))
+ (inputs `(("util-linux" ,util-linux)))
+ (home-page "https://github.com/trapexit/mergerfs")
+ (synopsis
+ "Featureful union filesystem")
+ (description
+ "mergerfs is a union filesystem geared towards simplifying storage and
+ management of files across numerous commodity storage devices. It is
+ similar to mhddfs, unionfs, and aufs.")
+ (license (list
+ ;; mergerfs
+ license:isc
+ ;; imported libfuse code
+ license:gpl2 license:lgpl2.0))))