guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/07: gnu: Add mergerfs-tools.


From: guix-commits
Subject: 07/07: gnu: Add mergerfs-tools.
Date: Wed, 3 Jun 2020 12:06:48 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 4960a955f8f77cc4c35d0db749cd6f3de8787bff
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Sat May 30 19:10:55 2020 +0200

    gnu: Add mergerfs-tools.
    
    * gnu/packages/storage.scm (mergerfs-tools): New variable.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/file-systems.scm | 53 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index bb435d7..ca02a1e 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -27,6 +27,7 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system linux-module)
   #:use-module (guix build-system trivial)
@@ -53,7 +54,9 @@
   #:use-module (gnu packages photo)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages rsync)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
@@ -729,3 +732,53 @@ is similar to mhddfs, unionfs, and aufs.")
               license:isc                   ; mergerfs
               license:gpl2 license:lgpl2.0  ; Imported libfuse code.
               ))))
+
+(define-public mergerfs-tools
+  (let ((commit "c926779d87458d103f3b674603bf97801ae2486d")
+        (revision "1"))
+    (package
+      (name "mergerfs-tools")
+      ;; No released version exists.
+      (version (git-version "0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/trapexit/mergerfs-tools.git";)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "04hhwcib0xv4cf1mkj8zrp2aqpxkncml9iqg4m1mz6a5zhzsk0vm"))))
+      (build-system copy-build-system)
+      (inputs
+       `(("python" ,python)
+         ("python-xattr" ,python-xattr)
+         ("rsync" ,rsync)))
+      (arguments
+       '(#:install-plan
+         '(("src/" "bin/"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* (find-files "src" "^mergerfs\\.")
+                 (("'rsync'")
+                  (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
+                 (("'rm'")
+                  (string-append "'" (assoc-ref inputs "coreutils") 
"/bin/rm'")))
+               (substitute* "src/mergerfs.mktrash"
+                 (("xattr")
+                  (string-append (assoc-ref inputs "python-xattr") 
"/bin/xattr"))
+                 (("mkdir")
+                  (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
+               #t)))))
+      (synopsis "Tools to help manage data in a mergerfs pool")
+      (description "mergerfs-tools is a suite of programs that can audit
+permissions and ownership of files and directories on a mergerfs volume,
+duplicates files and directories across branches in its pool, find and remove
+duplicate files, balance pool drives, consolidate files in a single mergerfs
+directory onto a single drive and create FreeDesktop.org Trash specification
+compatible directories.")
+      (home-page "https://github.com/trapexit/mergerfs-tools";)
+      (license license:isc))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]