1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
3 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
4 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages file-systems)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system copy)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system linux-module)
33 #:use-module (guix build-system python)
34 #:use-module (guix build-system trivial)
35 #:use-module (guix utils)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages acl)
38 #:use-module (gnu packages attr)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages check)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages crypto)
44 #:use-module (gnu packages curl)
45 #:use-module (gnu packages cyrus-sasl)
46 #:use-module (gnu packages datastructures)
47 #:use-module (gnu packages documentation)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages flex)
50 #:use-module (gnu packages glib)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages kerberos)
53 #:use-module (gnu packages libffi)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages nfs)
56 #:use-module (gnu packages onc-rpc)
57 #:use-module (gnu packages openldap)
58 #:use-module (gnu packages photo)
59 #:use-module (gnu packages pkg-config)
60 #:use-module (gnu packages python)
61 #:use-module (gnu packages python-crypto)
62 #:use-module (gnu packages python-web)
63 #:use-module (gnu packages python-xyz)
64 #:use-module (gnu packages readline)
65 #:use-module (gnu packages rsync)
66 #:use-module (gnu packages sssd)
67 #:use-module (gnu packages sqlite)
68 #:use-module (gnu packages tls)
69 #:use-module (gnu packages valgrind)
70 #:use-module (gnu packages xml))
79 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
80 "v" (version-major version) "/"
81 "autofs-" version ".tar.xz"))
83 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
84 (build-system gnu-build-system)
87 (list "--enable-ignore-busy" ; during shutdown
88 "--enable-sloppy-mount" ; support mount(8) -s
90 (string-append "--with-openldap="
91 (assoc-ref %build-inputs "openldap"))
92 (string-append "--with-sasl="
93 (assoc-ref %build-inputs "cyrus-sasl"))
94 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
95 (string-append "sssldir="
96 (assoc-ref %build-inputs "sssd")
98 #:tests? #f ; no test suite
100 (modify-phases %standard-phases
101 (add-before 'configure 'fix-hard-coded-search-path
103 (substitute* "configure"
104 (("^searchpath=\".*\"")
105 "searchpath=\"$PATH\""))
107 (add-before 'install 'omit-obsolete-lookup_nis.so-link
108 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
109 ;; leading to a make error. Since it's broken, comment it out.
111 (substitute* "modules/Makefile"
112 (("ln -fs lookup_yp.so" match)
113 (string-append "# " match)))
118 ("pkg-config" ,pkg-config)
119 ("rpcsvc-proto" ,rpcsvc-proto)))
121 `(("cyrus-sasl" ,cyrus-sasl)
122 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
123 ("libtirpc" ,libtirpc)
124 ("libxml2" ,libxml2) ; needed for LDAP, SASL
125 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
126 ("nfs-utils" ,nfs-utils) ; for mount.nfs
127 ("openldap" ,openldap)
128 ("openssl" ,openssl) ; needed for SASL
130 ("util-linux" ,util-linux))) ; for mount, umount
131 ;; XXX A directory index is the closest thing this has to a home page.
132 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
133 (synopsis "Kernel-based automounter for Linux")
135 "Autofs is a kernel-based automounter for use with the Linux autofs4
136 module. It automatically mounts selected file systems when they are used and
137 unmounts them after a set period of inactivity. This provides
138 centrally-managed, consistent file names for users and applications, even in a
139 large and/or frequently changing (network) environment.")
140 ;; fedfs/ is GPL-2-only but not built.
141 (license (list license:bsd-3 ; modules/cyrus-sasl.c
142 license:gpl2+)))) ; the rest
144 (define-public fsarchiver
153 (url "https://github.com/fdupoux/fsarchiver")
155 (file-name (git-file-name name version))
157 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
158 (build-system gnu-build-system)
160 `(("autoconf" ,autoconf)
161 ("automake" ,automake)
162 ("pkg-config" ,pkg-config)))
165 ("e2fsprogs" ,e2fsprogs)
166 ("libgcrypt" ,libgcrypt)
169 ("util-linux" ,util-linux "lib")
172 ("zstd:lib" ,zstd "lib")))
173 (synopsis "File system back-up, deployment, and migration tool")
175 "FSArchiver saves the contents of a file system to a compressed archive
176 file, and restores it to a different file system and/or partition. This
177 partition can be of a different size than the original and FSArchiver will
178 create a new file system if none exists.
180 All standard file attributes supported by the kernel are preserved, including
181 file permissions, timestamps, symbolic and hard links, and extended attributes.
183 Each file in the archive is protected by a checksum. If part of the archive
184 is corrupted you'll lose the affected file(s) but not the whole back-up.")
185 (home-page "https://www.fsarchiver.org/")
186 (license license:gpl2)))
188 (define-public gphotofs
196 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
197 "/gphotofs-0.5.tar.gz"))
200 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
201 (build-system gnu-build-system)
203 `(("pkg-config" ,pkg-config)))
207 ("libgphoto2" ,libgphoto2)))
208 (synopsis "Virtual file system for libgphoto2 using FUSE")
209 (description "GPhotoFS is a FUSE file system module to mount your camera as
210 a file system on Linux. This allow using your camera with any tool able to read
211 from a mounted file system.")
212 (home-page "http://www.gphoto.org/proj/gphotofs/")
213 (license license:gpl2+)))
215 (define-public bcachefs-tools
216 (let ((commit "ab2f1ec24f5307b0cf1e3c4ad19bf350d9f54d9f")
219 (name "bcachefs-tools")
220 (version (git-version "0.1" revision commit))
225 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
227 (file-name (git-file-name name version))
229 (base32 "10pafvaxg1lvwnqjv3a4rsi96bghbpcsgh3vhqilndi334k3b0hd"))))
230 (build-system gnu-build-system)
233 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
234 (string-append "PREFIX=" (assoc-ref %outputs "out"))
235 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
239 (modify-phases %standard-phases
240 (delete 'configure)) ; no configure script
241 #:tests? #f)) ; XXX 6 valgrind tests fail
243 `(("pkg-config" ,pkg-config)
246 ("python-pytest" ,python-pytest)
247 ("valgrind" ,valgrind)))
249 `(("keyutils" ,keyutils)
251 ("libscrypt" ,libscrypt)
252 ("libsodium" ,libsodium)
254 ("util-linux" ,util-linux "lib") ; lib{blkid,uuid}
257 ("zstd:lib" ,zstd "lib")))
258 (home-page "https://bcachefs.org/")
259 (synopsis "Tools to create and manage bcachefs file systems")
261 "The bcachefs-tools are command-line utilities for creating, checking,
262 and otherwise managing bcachefs file systems.
264 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
265 encryption, compression, snapshots, and (meta)data checksums. It can use
266 multiple block devices for replication and/or performance, similar to RAID.
268 In addition, bcachefs provides all the functionality of bcache, a block-layer
269 caching system, and lets you assign different roles to each device based on its
270 performance and other characteristics.")
271 (license license:gpl2+))))
273 (define-public exfatprogs
281 (url "https://github.com/exfatprogs/exfatprogs")
283 (file-name (git-file-name name version))
285 (base32 "1braffz1wc4ki3nb42q85l5zg2dl2hwjr64rk27nc85wcsrbavnl"))))
286 (build-system gnu-build-system)
289 (list "--disable-static")))
291 `(("autoconf" ,autoconf)
292 ("automake" ,automake)
294 ("pkg-config" ,pkg-config)))
295 (home-page "https://github.com/exfatprogs/exfatprogs")
296 (synopsis "Tools to create, check, and repair exFAT file systems")
298 "These are command-line user space tools for the @acronym{exFAT,
299 Extensible File Allocation Table} file systems. Included are
300 @command{mkfs.exfat} to create (format) new exFAT file systems, and
301 @command{fsck.exfat} to check their consistency and repair them.")
302 (license license:gpl2+)))
304 (define-public httpfs2
311 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
312 "httpfs2-" version ".tar.gz"))
315 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
316 (build-system gnu-build-system)
318 `(("asciidoc" ,asciidoc)
319 ("docbook-xml" ,docbook-xml)
322 ("pkg-config" ,pkg-config)))
328 (modify-phases %standard-phases
329 (delete 'configure) ; no configure script
331 ;; There's no ‘install’ target. Install all variants manually.
332 (lambda* (#:key outputs #:allow-other-keys)
333 (let* ((out (assoc-ref outputs "out"))
334 (bin (string-append out "/bin"))
335 (man1 (string-append out "/share/man/man1")))
340 (let ((man1-page (string-append variant ".1")))
341 (install-file variant bin)
342 (install-file man1-page man1)))
348 #:make-flags (list "CC=gcc")
349 #:parallel-build? #f ; can result in missing man pages
350 #:tests? #f)) ; no tests
351 (home-page "https://sourceforge.net/projects/httpfs/")
352 (synopsis "Mount remote files over HTTP")
353 (description "httpfs2 is a @code{fuse} file system for mounting any
354 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
355 arbitrary bytes from the web server, without needing to download the entire
356 file. This is particularly useful with large archives such as ZIP files and
357 ISO images when you only need to inspect their contents or extract specific
358 files. Since the HTTP protocol itself has no notion of directories, only a
359 single file can be mounted.")
360 (license license:gpl2+)))
362 (define-public jfsutils
369 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
372 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
373 (patches (search-patches "jfsutils-add-sysmacros.patch"
374 "jfsutils-include-systypes.patch"))))
375 (build-system gnu-build-system)
377 `(("util-linux" ,util-linux "lib")))
378 (home-page "http://jfs.sourceforge.net/home.html")
379 (synopsis "Utilities for managing JFS file systems")
381 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
382 Journaled File System}, a 64-bit journaling file system created by IBM and later
383 ported to the kernel Linux. The following commands are available:
385 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
387 @item @command{logdump}: dump the JFS journal log.
388 @item @command{logredo}: replay the JFS journal log.
389 @item @command{mkfs.jfs}: create a new JFS file system.
390 @item @command{xchklog}: save a JFS fsck log to a file.
391 @item @command{xchkdmp}: dump the contents of such a log file.
392 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
394 (license license:gpl3+))) ; no explicit version given
396 (define-public jfsutils/static
400 (name "jfsutils-static")
402 `(("util-linux:static" ,util-linux "static")
403 ,@(package-inputs jfsutils))))))
405 (define-public jfs_fsck/static
407 (name "jfs_fsck-static")
408 (version (package-version jfsutils))
410 (build-system trivial-build-system)
412 `(#:modules ((guix build utils))
415 (use-modules (guix build utils)
418 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
420 (out (assoc-ref %outputs "out"))
421 (sbin (string-append out "/sbin")))
423 (with-directory-excursion sbin
424 (install-file (string-append jfsutils "/sbin/" fsck)
426 (remove-store-references fsck)
430 `(("jfsutils" ,jfsutils/static)))
431 (home-page (package-home-page jfsutils))
432 (synopsis "Statically-linked jfs_fsck command from jfsutils")
433 (description "This package provides statically-linked jfs_fsck command taken
434 from the jfsutils package. It is meant to be used in initrds.")
435 (license (package-license jfsutils))))
437 (define-public disorderfs
445 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
447 (file-name (git-file-name name version))
450 "0lsisx5118k0qk0b5klbxl03rvhycnznyfx05yxmjawh85bfhmlh"))))
451 (build-system gnu-build-system)
453 `(("pkg-config" ,pkg-config)))
458 `(#:phases (modify-phases %standard-phases
459 (delete 'configure)) ; no configure script
460 #:make-flags (let ((out (assoc-ref %outputs "out")))
461 (list (string-append "PREFIX=" out)))
463 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
465 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
466 (synopsis "FUSE file system that introduces non-determinism")
468 "An overlay FUSE file system that introduces non-determinism
469 into file system metadata. For example, it can randomize the order
470 in which directory entries are read. This is useful for detecting
471 non-determinism in the build process.")
472 (license license:gpl3+)))
474 (define-public glusterfs
481 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
482 (version-major version) "/"
483 (version-major+minor version) "/"
484 "glusterfs-" version ".tar.gz"))
487 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
488 (build-system gnu-build-system)
491 (let ((out (assoc-ref %outputs "out"))
492 (p2 (assoc-ref %build-inputs "python-2")))
493 (list (string-append "PYTHON=" p2 "/bin/python")
494 (string-append "--with-initdir=" out "/etc/init.d")
495 (string-append "--with-mountutildir=" out "/sbin")
496 "--enable-cmocka" ; unit tests
497 ;; "--enable-debug" ; debug build options
498 ;; "--enable-asan" ; Address Sanitizer
499 ;; "--enable-tsan" ; ThreadSanitizer
502 (modify-phases %standard-phases
503 (add-before 'configure 'autogen
504 (lambda _ (invoke "./autogen.sh"))))))
506 `(("pkg-config" ,pkg-config)
507 ("libtirpc", libtirpc)
508 ("rpcsvc-proto", rpcsvc-proto)
509 ("python-2" ,python-2) ; must be version 2
513 ("autoconf" ,autoconf)
514 ("automake" ,automake)
521 ("libuuid" ,util-linux "lib")
523 ("readline" ,readline)
526 ("rdma-core", rdma-core)))
527 (home-page "https://www.gluster.org")
528 (synopsis "Distributed file system")
529 (description "GlusterFS is a distributed scalable network file system
530 suitable for data-intensive tasks such as cloud storage and media streaming.
531 It allows rapid provisioning of additional storage based on your storage
532 consumption needs. It incorporates automatic failover as a primary feature.
533 All of this is accomplished without a centralized metadata server.")
534 ;; The user may choose either LGPLv3+ or GPLv2 only.
535 (license (list license:lgpl3+ license:gpl2+))))
537 (define-public curlftpfs
544 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
545 "/curlftpfs-" version ".tar.gz"))
548 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
549 (build-system gnu-build-system)
552 (modify-phases %standard-phases
553 (add-after 'unpack 'fix-test
555 ;; One of the 512-Byte block counts is definitely wrong.
556 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
557 (substitute* "tests/ftpfs-ls_unittest.c"
558 (("4426192") "12814800"))
565 `(("pkg-config" ,pkg-config)))
566 (home-page "http://curlftpfs.sourceforge.net/")
567 (synopsis "Mount remote file systems over FTP")
569 "This is a file system client based on the FTP File Transfer Protocol.")
570 (license license:gpl2+)))
572 (define-public libnfs
579 (url "https://github.com/sahlberg/libnfs")
580 (commit (string-append "libnfs-" version))))
581 (file-name (git-file-name name version))
584 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
585 (build-system gnu-build-system)
586 (home-page "https://github.com/sahlberg/libnfs")
588 `(("autoconf" ,autoconf)
589 ("automake" ,automake)
591 ("pkg-config" ,pkg-config)))
592 (synopsis "Client library for accessing NFS shares")
593 (description "LIBNFS is a client library for accessing NFS shares over a
594 network. LIBNFS offers three different APIs, for different use :
597 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
598 API provides very flexible and precise control of the RPC issued.
599 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
600 @item NFS SYNC, a synchronous library for high level vfs functions.
602 (license (list license:lgpl2.1+ ; library
603 license:gpl3+ ; tests
604 license:bsd-3 ; copied nsf4 files
607 (define-public apfs-fuse
608 ;; Later versions require FUSE 3.
609 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
613 (version (git-version "0.0.0" revision commit))
617 (url "https://github.com/sgan81/apfs-fuse")
618 (recursive? #t) ; for lzfse
622 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
623 (file-name (git-file-name name version))))
624 (build-system cmake-build-system)
626 `(#:tests? #f ; No test suite
628 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
630 (modify-phases %standard-phases
631 ;; No 'install' target in CMakeLists.txt
633 (lambda* (#:key outputs #:allow-other-keys)
634 (let* ((out (assoc-ref outputs "out"))
635 (bin (string-append out "/bin"))
636 (lib (string-append out "/lib"))
637 (doc (string-append out "/share/doc/"
638 (string-append ,name "-" ,version))))
639 (install-file "apfs-dump" bin)
640 (install-file "apfs-dump-quick" bin)
641 (install-file "apfs-fuse" bin)
642 (install-file "libapfs.a" lib)
643 (install-file "../source/README.md" doc)
649 (synopsis "Read-only FUSE driver for the APFS file system")
650 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
651 System} (APFS). It is currently in an experimental state — it may not be able
652 to read all files, and it does not support all the compression methods in
654 (home-page "https://github.com/sgan81/apfs-fuse")
655 (license license:gpl2+))))
661 (outputs '("out" "module" "src"))
665 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
666 "/download/zfs-" version
667 "/zfs-" version ".tar.gz"))
670 "1f7aig15q3z832pr2n48j3clafic2yk1vvqlh28vpklfghjqwq27"))))
671 (build-system linux-module-build-system)
673 `(;; The ZFS kernel module should not be downloaded since the license
674 ;; terms don't allow for distributing it, only building it locally.
676 ;; Tests cannot run in an unprivileged build environment.
679 (modify-phases %standard-phases
680 (add-after 'configure 'really-configure
681 (lambda* (#:key outputs inputs #:allow-other-keys)
682 (let ((out (assoc-ref outputs "out")))
683 (substitute* "configure"
684 (("-/bin/sh") (string-append "-" (which "sh")))
685 ((" /bin/sh") (string-append " " (which "sh"))))
686 (invoke "./configure"
688 (string-append "--prefix=" out)
689 (string-append "--with-dracutdir=" out "/lib/dracut")
690 (string-append "--with-udevdir=" out "/lib/udev")
691 (string-append "--with-mounthelperdir=" out "/sbin")
692 (string-append "--with-linux="
693 (assoc-ref inputs "linux-module-builder")
694 "/lib/modules/build")))))
695 (add-after 'unpack 'patch-source
696 (lambda* (#:key inputs outputs #:allow-other-keys)
697 (let ((out (assoc-ref outputs "out"))
698 (src (assoc-ref outputs "src"))
699 (util-linux (assoc-ref inputs "util-linux"))
700 (nfs-utils (assoc-ref inputs "nfs-utils")))
701 (substitute* "module/zfs/zfs_ctldir.c"
702 (("/usr/bin/env\", \"umount")
703 (string-append util-linux "/bin/umount\", \"-n"))
704 (("/usr/bin/env\", \"mount")
705 (string-append util-linux "/bin/mount\", \"-n")))
706 (substitute* "lib/libzfs/libzfs_mount.c"
707 (("/bin/mount") (string-append util-linux "/bin/mount"))
708 (("/bin/umount") (string-append util-linux "/bin/umount")))
709 (substitute* "lib/libshare/nfs.c"
710 (("/usr/sbin/exportfs")
711 (string-append nfs-utils "/sbin/exportfs")))
712 (substitute* "config/zfs-build.m4"
713 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
714 (substitute* '("etc/zfs/Makefile.am"
715 "cmd/zed/Makefile.am")
716 (("\\$\\(sysconfdir)") (string-append out "/etc")))
717 (substitute* "cmd/vdev_id/vdev_id"
718 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
719 (string-append "PATH="
720 (dirname (which "chmod")) ":"
721 (dirname (which "grep")) ":"
722 (dirname (which "sed")) ":"
723 (dirname (which "gawk")))))
724 (substitute* "contrib/pyzfs/Makefile.in"
725 ((".*install-lib.*") ""))
726 (substitute* '("Makefile.am" "Makefile.in")
727 (("\\$\\(prefix)/src") (string-append src "/src"))))
730 (lambda _ (invoke "make")))
732 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
733 (let* ((out (assoc-ref outputs "out"))
734 (moddir (assoc-ref outputs "module"))
735 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
736 (invoke "make" "install"
737 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
738 (string-append "DEPMOD=" kmod "/bin/depmod")
739 (string-append "INSTALL_PATH=" out)
740 (string-append "INSTALL_MOD_PATH=" moddir)
741 "INSTALL_MOD_STRIP=1")
742 (install-file "contrib/bash_completion.d/zfs"
743 (string-append out "/share/bash-completion/completions"))
744 (symlink "../share/pkgconfig/" (string-append out "/lib/pkgconfig"))
749 ("pkg-config" ,pkg-config)))
753 ("libtirpc" ,libtirpc)
754 ("nfs-utils" ,nfs-utils)
757 ("python-cffi" ,python-cffi)
758 ("util-linux" ,util-linux "lib")
760 (home-page "https://zfsonlinux.org/")
761 (synopsis "Native ZFS on Linux")
763 "ZFS on Linux is an advanced file system and volume manager which was
764 originally developed for Solaris and is now maintained by the OpenZFS
766 (license license:cddl1.0)))
768 (define-public mergerfs
775 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
776 version "/mergerfs-" version ".tar.gz"))
779 "17gizw4vgbqqjd2ykkfpp276942jb5qclp0lkiwkmq1yjgyjqfmk"))))
780 (build-system gnu-build-system)
782 `(#:tests? #f ; No tests exist.
784 (modify-phases %standard-phases
786 (add-after 'unpack 'fix-paths
787 (lambda* (#:key inputs outputs #:allow-other-keys)
789 ;; These were copied from the package libfuse.
790 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
791 (("/bin/(u?)mount" _ maybe-u)
792 (string-append (assoc-ref inputs "util-linux")
793 "/bin/" maybe-u "mount")))
794 (substitute* '("libfuse/util/mount.mergerfs.c")
797 ;; The Makefile does not allow overriding PREFIX via make variables.
798 (substitute* '("Makefile" "libfuse/Makefile")
799 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
800 ;; cannot chown as build user
801 (("chown root:root") "true"))
803 ;; mergerfs bundles a heavily modified copy of libfuse.
804 (inputs `(("util-linux" ,util-linux)))
805 (home-page "https://github.com/trapexit/mergerfs")
806 (synopsis "Featureful union file system")
807 (description "mergerfs is a union file system geared towards simplifying
808 storage and management of files across numerous commodity storage devices. It
809 is similar to mhddfs, unionfs, and aufs.")
811 license:isc ; mergerfs
812 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
815 (define-public mergerfs-tools
816 (let ((commit "c926779d87458d103f3b674603bf97801ae2486d")
819 (name "mergerfs-tools")
820 ;; No released version exists.
821 (version (git-version "0.0" revision commit))
826 (url "https://github.com/trapexit/mergerfs-tools")
828 (file-name (git-file-name name version))
831 "04hhwcib0xv4cf1mkj8zrp2aqpxkncml9iqg4m1mz6a5zhzsk0vm"))))
832 (build-system copy-build-system)
835 ("python-xattr" ,python-xattr)
841 (modify-phases %standard-phases
842 (add-after 'unpack 'patch-paths
843 (lambda* (#:key inputs #:allow-other-keys)
844 (substitute* (find-files "src" "^mergerfs\\.")
846 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
848 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
849 (substitute* "src/mergerfs.mktrash"
851 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
853 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
855 (synopsis "Tools to help manage data in a mergerfs pool")
856 (description "mergerfs-tools is a suite of programs that can audit
857 permissions and ownership of files and directories on a mergerfs volume,
858 duplicates files and directories across branches in its pool, find and remove
859 duplicate files, balance pool drives, consolidate files in a single mergerfs
860 directory onto a single drive and create FreeDesktop.org Trash specification
861 compatible directories.")
862 (home-page "https://github.com/trapexit/mergerfs-tools")
863 (license license:isc))))
865 (define-public python-dropbox
867 (name "python-dropbox")
872 (uri (pypi-uri "dropbox" version))
875 "137rn9fs1bg1p1khd5lcccfxh8jsx27dh2ix5wwd8cmddbrzdrbd"))))
876 (build-system python-build-system)
877 (arguments '(#:tests? #f)) ; Tests require a network connection.
879 `(("python-pytest" ,python-pytest)
880 ("python-pytest-runner" ,python-pytest-runner)))
882 `(("python-certifi" ,python-certifi)
883 ("python-chardet" ,python-chardet)
884 ("python-requests" ,python-requests)
885 ("python-six" ,python-six)
886 ("python-urllib3" ,python-urllib3)))
887 (home-page "https://www.dropbox.com/developers")
888 (synopsis "Official Dropbox API Client")
889 (description "This package provides a Python SDK for integrating with the
891 (license license:expat)))
900 (uri (pypi-uri "dbxfs" version))
903 "1f9sy2ax215dxiwszrrcadffjdsmrlxm4kwrbiap9dhxvzm226ks"))
904 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
905 (build-system python-build-system)
907 '(#:tests? #f)) ; tests requires safefs
909 `(("python-appdirs" ,python-appdirs)
910 ("python-block-tracing" ,python-block-tracing)
911 ("python-dropbox" ,python-dropbox)
912 ("python-keyring" ,python-keyring)
913 ("python-keyrings.alt" ,python-keyrings.alt)
914 ("python-privy" ,python-privy)
915 ("python-userspacefs" ,python-userspacefs)))
916 (home-page "https://github.com/rianhunter/dbxfs")
917 (synopsis "User-space file system for Dropbox")
919 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
920 local filesystem using FUSE.")
921 (license license:gpl3+)))