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>
8 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages file-systems)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix git-download)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system copy)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system linux-module)
34 #:use-module (guix build-system python)
35 #:use-module (guix build-system trivial)
36 #:use-module (guix utils)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages acl)
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages compression)
44 #:use-module (gnu packages crypto)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages cyrus-sasl)
47 #:use-module (gnu packages datastructures)
48 #:use-module (gnu packages documentation)
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages flex)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages gnupg)
53 #:use-module (gnu packages kerberos)
54 #:use-module (gnu packages libffi)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages nfs)
57 #:use-module (gnu packages onc-rpc)
58 #:use-module (gnu packages openldap)
59 #:use-module (gnu packages photo)
60 #:use-module (gnu packages pkg-config)
61 #:use-module (gnu packages python)
62 #:use-module (gnu packages python-crypto)
63 #:use-module (gnu packages python-web)
64 #:use-module (gnu packages python-xyz)
65 #:use-module (gnu packages readline)
66 #:use-module (gnu packages rsync)
67 #:use-module (gnu packages sssd)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages tls)
70 #:use-module (gnu packages valgrind)
71 #:use-module (gnu packages version-control)
72 #:use-module (gnu packages xml))
81 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
82 "v" (version-major version) "/"
83 "autofs-" version ".tar.xz"))
85 (base32 "1vya21mb4izj3khcr3flibv7xc15vvx2v0rjfk5yd31qnzcy7pnx"))))
86 (build-system gnu-build-system)
89 (list "--enable-ignore-busy" ; during shutdown
90 "--enable-sloppy-mount" ; support mount(8) -s
92 (string-append "--with-openldap="
93 (assoc-ref %build-inputs "openldap"))
94 (string-append "--with-sasl="
95 (assoc-ref %build-inputs "cyrus-sasl"))
96 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
97 (string-append "sssldir="
98 (assoc-ref %build-inputs "sssd")
100 #:tests? #f ; no test suite
102 (modify-phases %standard-phases
103 (add-before 'configure 'fix-hard-coded-search-path
105 (substitute* "configure"
106 (("^searchpath=\".*\"")
107 "searchpath=\"$PATH\""))
109 (add-before 'install 'omit-obsolete-lookup_nis.so-link
110 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
111 ;; leading to a make error. Since it's broken, comment it out.
113 (substitute* "modules/Makefile"
114 (("ln -fs lookup_yp.so" match)
115 (string-append "# " match)))
120 ("pkg-config" ,pkg-config)
121 ("rpcsvc-proto" ,rpcsvc-proto)))
123 `(("cyrus-sasl" ,cyrus-sasl)
124 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
125 ("libtirpc" ,libtirpc)
126 ("libxml2" ,libxml2) ; needed for LDAP, SASL
127 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
128 ("nfs-utils" ,nfs-utils) ; for mount.nfs
129 ("openldap" ,openldap)
130 ("openssl" ,openssl) ; needed for SASL
132 ("util-linux" ,util-linux))) ; for mount, umount
133 ;; XXX A directory index is the closest thing this has to a home page.
134 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
135 (synopsis "Kernel-based automounter for Linux")
137 "Autofs is a kernel-based automounter for use with the Linux autofs4
138 module. It automatically mounts selected file systems when they are used and
139 unmounts them after a set period of inactivity. This provides
140 centrally-managed, consistent file names for users and applications, even in a
141 large and/or frequently changing (network) environment.")
142 ;; fedfs/ is GPL-2-only but not built.
143 (license (list license:bsd-3 ; modules/cyrus-sasl.c
144 license:gpl2+)))) ; the rest
146 (define-public bindfs
152 (uri (string-append "https://bindfs.org/downloads/bindfs-"
156 "15y4brlcrqhxl6z73785m0dr1vp2q3wc6xss08x9jjr0apzmmjp5"))))
157 (build-system gnu-build-system)
159 ;; XXX: The tests have no hope of passing until there is a "nogroup"
160 ;; entry (or at least some group to which the guix builder does
161 ;; not belong) in the /etc/group file of the build environment.
162 ;; Currently we do not have such a group. Disable tests for now.
165 ;; Native inputs to run the tests
167 ;; ("valgrind" ,valgrind)
169 `(("pkg-config" ,pkg-config)))
172 (home-page "https://bindfs.org")
173 (synopsis "Bind mount a directory and alter permission bits")
175 "@command{bindfs} is a FUSE filesystem for mounting a directory to
176 another location, similar to @command{mount --bind}. It can be used for:
178 @item Making a directory read-only.
179 @item Making all executables non-executable.
180 @item Sharing a directory with a list of users (or groups).
181 @item Modifying permission bits using rules with chmod-like syntax.
182 @item Changing the permissions with which files are created.
184 (license license:gpl2+)))
186 (define-public davfs2
193 (uri (string-append "https://download.savannah.nongnu.org/releases/"
194 "davfs2/davfs2-" version ".tar.gz"))
196 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
197 (build-system gnu-build-system)
200 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
201 (string-append "--docdir=" (assoc-ref %outputs "out")
202 "/share/doc/" ,name "-" ,version)
203 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
204 ;; The default ‘davfs2’ user and group don't exist on most systems.
208 (modify-phases %standard-phases
209 (add-after 'unpack 'omit-redundancy
210 ;; Don't install redundant copies of /etc examples into /share.
212 (substitute* "etc/Makefile.in"
213 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
215 (string-append prefix suffix)))
217 (add-after 'unpack 'patch-file-names
219 ;; Don't auto-load the FUSE kernel module. That's up to root.
220 ;; XXX If/when we restore the previous behaviour, make sure not
221 ;; to introduce a security hole when mount.davfs is setuid.
222 (substitute* "src/kernel_interface.c"
223 (("/sbin/modprobe") "/modprobe/disabled"))
226 (lambda* (#:key make-flags outputs #:allow-other-keys)
227 (let ((out (assoc-ref outputs "out")))
228 (apply invoke "make" "install"
229 (string-append "pkgsysconfdir=" out "/etc")
234 ;; Neon requires but doesn't propagate zlib, nor would we want that.
235 ;; XZ as well, but that's already present in the build environment.
237 (home-page "https://savannah.nongnu.org/projects/davfs2")
238 (synopsis "Mount remote WebDAV resources in the local file system")
240 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
241 to the HTTP protocol defines a standard way to author resources on a remote Web
242 server. Davfs2 exposes such resources as a typical filesystem which can be used
243 by standard applications with no built-in support for WebDAV, such as the GNU
244 coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
246 Davfs2 works with most WebDAV servers with no or little configuration. It
247 supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
248 client certificates. It performs extensive caching to avoid unnecessary network
249 traffic, stay responsive even over slow or unreliable connections, and prevent
250 data loss. It aims to make use by unprivileged users as easy and secure as
253 However, davfs2 is not a full-featured WebDAV client. The file system interface
254 and the WebDAV protocol are quite different. Translating between the two is not
256 (license (list license:bsd-2 ; src/fuse_kernel.h
257 license:gpl3+)))) ; everything else
259 (define-public fsarchiver
268 (url "https://github.com/fdupoux/fsarchiver")
270 (file-name (git-file-name name version))
272 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
273 (build-system gnu-build-system)
275 `(("autoconf" ,autoconf)
276 ("automake" ,automake)
277 ("pkg-config" ,pkg-config)))
280 ("e2fsprogs" ,e2fsprogs)
281 ("libgcrypt" ,libgcrypt)
284 ("util-linux" ,util-linux "lib")
287 ("zstd:lib" ,zstd "lib")))
288 (synopsis "File system back-up, deployment, and migration tool")
290 "FSArchiver saves the contents of a file system to a compressed archive
291 file, and restores it to a different file system and/or partition. This
292 partition can be of a different size than the original and FSArchiver will
293 create a new file system if none exists.
295 All standard file attributes supported by the kernel are preserved, including
296 file permissions, timestamps, symbolic and hard links, and extended attributes.
298 Each file in the archive is protected by a checksum. If part of the archive
299 is corrupted you'll lose the affected file(s) but not the whole back-up.")
300 (home-page "https://www.fsarchiver.org/")
301 (license license:gpl2)))
303 (define-public gphotofs
311 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
312 "/gphotofs-0.5.tar.gz"))
315 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
316 (build-system gnu-build-system)
318 `(("pkg-config" ,pkg-config)))
322 ("libgphoto2" ,libgphoto2)))
323 (synopsis "Virtual file system for libgphoto2 using FUSE")
324 (description "GPhotoFS is a FUSE file system module to mount your camera as
325 a file system on Linux. This allow using your camera with any tool able to read
326 from a mounted file system.")
327 (home-page "http://www.gphoto.org/proj/gphotofs/")
328 (license license:gpl2+)))
330 (define-public bcachefs-tools
331 (let ((commit "742dbbdbb90efb786f05a8576917fcd0e9cbd57e")
334 (name "bcachefs-tools")
335 (version (git-version "0.1" revision commit))
340 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
342 (file-name (git-file-name name version))
344 (base32 "0kn8y3kqylz6scv47mzfmwrlh21kbb14z5vs65vks8w50i26sxnc"))))
345 (build-system gnu-build-system)
348 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
349 (string-append "PREFIX=" (assoc-ref %outputs "out"))
350 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
354 (modify-phases %standard-phases
355 (delete 'configure)) ; no configure script
356 #:tests? #f)) ; XXX 6 valgrind tests fail
358 `(("pkg-config" ,pkg-config)
361 ("python-pytest" ,python-pytest)
362 ("valgrind" ,valgrind)))
365 ("keyutils" ,keyutils)
367 ("libscrypt" ,libscrypt)
368 ("libsodium" ,libsodium)
370 ("util-linux" ,util-linux "lib") ; lib{blkid,uuid}
373 ("zstd:lib" ,zstd "lib")))
374 (home-page "https://bcachefs.org/")
375 (synopsis "Tools to create and manage bcachefs file systems")
377 "The bcachefs-tools are command-line utilities for creating, checking,
378 and otherwise managing bcachefs file systems.
380 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
381 encryption, compression, snapshots, and (meta)data checksums. It can use
382 multiple block devices for replication and/or performance, similar to RAID.
384 In addition, bcachefs provides all the functionality of bcache, a block-layer
385 caching system, and lets you assign different roles to each device based on its
386 performance and other characteristics.")
387 (license license:gpl2+))))
389 (define-public exfatprogs
397 (url "https://github.com/exfatprogs/exfatprogs")
399 (file-name (git-file-name name version))
401 (base32 "1braffz1wc4ki3nb42q85l5zg2dl2hwjr64rk27nc85wcsrbavnl"))))
402 (build-system gnu-build-system)
405 (list "--disable-static")))
407 `(("autoconf" ,autoconf)
408 ("automake" ,automake)
410 ("pkg-config" ,pkg-config)))
411 (home-page "https://github.com/exfatprogs/exfatprogs")
412 (synopsis "Tools to create, check, and repair exFAT file systems")
414 "These are command-line user space tools for the @acronym{exFAT,
415 Extensible File Allocation Table} file systems. Included are
416 @command{mkfs.exfat} to create (format) new exFAT file systems, and
417 @command{fsck.exfat} to check their consistency and repair them.")
418 (license license:gpl2+)))
420 (define-public httpfs2
427 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
428 "httpfs2-" version ".tar.gz"))
431 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
432 (build-system gnu-build-system)
434 `(("asciidoc" ,asciidoc)
435 ("docbook-xml" ,docbook-xml)
438 ("pkg-config" ,pkg-config)))
444 (modify-phases %standard-phases
445 (delete 'configure) ; no configure script
447 ;; There's no ‘install’ target. Install all variants manually.
448 (lambda* (#:key outputs #:allow-other-keys)
449 (let* ((out (assoc-ref outputs "out"))
450 (bin (string-append out "/bin"))
451 (man1 (string-append out "/share/man/man1")))
456 (let ((man1-page (string-append variant ".1")))
457 (install-file variant bin)
458 (install-file man1-page man1)))
464 #:make-flags (list "CC=gcc")
465 #:parallel-build? #f ; can result in missing man pages
466 #:tests? #f)) ; no tests
467 (home-page "https://sourceforge.net/projects/httpfs/")
468 (synopsis "Mount remote files over HTTP")
469 (description "httpfs2 is a @code{fuse} file system for mounting any
470 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
471 arbitrary bytes from the web server, without needing to download the entire
472 file. This is particularly useful with large archives such as ZIP files and
473 ISO images when you only need to inspect their contents or extract specific
474 files. Since the HTTP protocol itself has no notion of directories, only a
475 single file can be mounted.")
476 (license license:gpl2+)))
478 (define-public jfsutils
485 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
488 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
489 (patches (search-patches "jfsutils-add-sysmacros.patch"
490 "jfsutils-include-systypes.patch"))))
491 (build-system gnu-build-system)
493 `(("util-linux" ,util-linux "lib")))
494 (home-page "http://jfs.sourceforge.net/home.html")
495 (synopsis "Utilities for managing JFS file systems")
497 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
498 Journaled File System}, a 64-bit journaling file system created by IBM and later
499 ported to the kernel Linux. The following commands are available:
501 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
503 @item @command{logdump}: dump the JFS journal log.
504 @item @command{logredo}: replay the JFS journal log.
505 @item @command{mkfs.jfs}: create a new JFS file system.
506 @item @command{xchklog}: save a JFS fsck log to a file.
507 @item @command{xchkdmp}: dump the contents of such a log file.
508 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
510 (license license:gpl3+))) ; no explicit version given
512 (define-public jfsutils/static
516 (name "jfsutils-static")
518 `(("util-linux:static" ,util-linux "static")
519 ,@(package-inputs jfsutils))))))
521 (define-public jfs_fsck/static
523 (name "jfs_fsck-static")
524 (version (package-version jfsutils))
526 (build-system trivial-build-system)
528 `(#:modules ((guix build utils))
531 (use-modules (guix build utils)
534 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
536 (out (assoc-ref %outputs "out"))
537 (sbin (string-append out "/sbin")))
539 (with-directory-excursion sbin
540 (install-file (string-append jfsutils "/sbin/" fsck)
542 (remove-store-references fsck)
546 `(("jfsutils" ,jfsutils/static)))
547 (home-page (package-home-page jfsutils))
548 (synopsis "Statically-linked jfs_fsck command from jfsutils")
549 (description "This package provides statically-linked jfs_fsck command taken
550 from the jfsutils package. It is meant to be used in initrds.")
551 (license (package-license jfsutils))))
553 (define-public disorderfs
561 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
563 (file-name (git-file-name name version))
566 "0lsisx5118k0qk0b5klbxl03rvhycnznyfx05yxmjawh85bfhmlh"))))
567 (build-system gnu-build-system)
569 `(("pkg-config" ,pkg-config)))
574 `(#:phases (modify-phases %standard-phases
575 (delete 'configure)) ; no configure script
576 #:make-flags (let ((out (assoc-ref %outputs "out")))
577 (list (string-append "PREFIX=" out)))
579 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
581 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
582 (synopsis "FUSE file system that introduces non-determinism")
584 "An overlay FUSE file system that introduces non-determinism
585 into file system metadata. For example, it can randomize the order
586 in which directory entries are read. This is useful for detecting
587 non-determinism in the build process.")
588 (license license:gpl3+)))
590 (define-public glusterfs
597 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
598 (version-major version) "/"
599 (version-major+minor version) "/"
600 "glusterfs-" version ".tar.gz"))
603 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
604 (build-system gnu-build-system)
607 (let ((out (assoc-ref %outputs "out"))
608 (p2 (assoc-ref %build-inputs "python-2")))
609 (list (string-append "PYTHON=" p2 "/bin/python")
610 (string-append "--with-initdir=" out "/etc/init.d")
611 (string-append "--with-mountutildir=" out "/sbin")
612 "--enable-cmocka" ; unit tests
613 ;; "--enable-debug" ; debug build options
614 ;; "--enable-asan" ; Address Sanitizer
615 ;; "--enable-tsan" ; ThreadSanitizer
618 (modify-phases %standard-phases
619 (add-before 'configure 'autogen
620 (lambda _ (invoke "./autogen.sh"))))))
622 `(("pkg-config" ,pkg-config)
623 ("libtirpc" ,libtirpc)
624 ("rpcsvc-proto" ,rpcsvc-proto)
625 ("python-2" ,python-2) ; must be version 2
629 ("autoconf" ,autoconf)
630 ("automake" ,automake)
637 ("libuuid" ,util-linux "lib")
639 ("readline" ,readline)
642 ("rdma-core" ,rdma-core)))
643 (home-page "https://www.gluster.org")
644 (synopsis "Distributed file system")
645 (description "GlusterFS is a distributed scalable network file system
646 suitable for data-intensive tasks such as cloud storage and media streaming.
647 It allows rapid provisioning of additional storage based on your storage
648 consumption needs. It incorporates automatic failover as a primary feature.
649 All of this is accomplished without a centralized metadata server.")
650 ;; The user may choose either LGPLv3+ or GPLv2 only.
651 (license (list license:lgpl3+ license:gpl2+))))
653 (define-public curlftpfs
660 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
661 "/curlftpfs-" version ".tar.gz"))
664 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
665 (build-system gnu-build-system)
668 (modify-phases %standard-phases
669 (add-after 'unpack 'fix-test
671 ;; One of the 512-Byte block counts is definitely wrong.
672 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
673 (substitute* "tests/ftpfs-ls_unittest.c"
674 (("4426192") "12814800"))
681 `(("pkg-config" ,pkg-config)))
682 (home-page "http://curlftpfs.sourceforge.net/")
683 (synopsis "Mount remote file systems over FTP")
685 "This is a file system client based on the FTP File Transfer Protocol.")
686 (license license:gpl2+)))
688 (define-public libnfs
695 (url "https://github.com/sahlberg/libnfs")
696 (commit (string-append "libnfs-" version))))
697 (file-name (git-file-name name version))
700 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
701 (build-system gnu-build-system)
702 (home-page "https://github.com/sahlberg/libnfs")
704 `(("autoconf" ,autoconf)
705 ("automake" ,automake)
707 ("pkg-config" ,pkg-config)))
708 (synopsis "Client library for accessing NFS shares")
709 (description "LIBNFS is a client library for accessing NFS shares over a
710 network. LIBNFS offers three different APIs, for different use :
713 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
714 API provides very flexible and precise control of the RPC issued.
715 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
716 @item NFS SYNC, a synchronous library for high level vfs functions.
718 (license (list license:lgpl2.1+ ; library
719 license:gpl3+ ; tests
720 license:bsd-3 ; copied nsf4 files
723 (define-public apfs-fuse
724 ;; Later versions require FUSE 3.
725 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
729 (version (git-version "0.0.0" revision commit))
733 (url "https://github.com/sgan81/apfs-fuse")
734 (recursive? #t) ; for lzfse
738 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
739 (file-name (git-file-name name version))))
740 (build-system cmake-build-system)
742 `(#:tests? #f ; No test suite
744 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
746 (modify-phases %standard-phases
747 ;; No 'install' target in CMakeLists.txt
749 (lambda* (#:key outputs #:allow-other-keys)
750 (let* ((out (assoc-ref outputs "out"))
751 (bin (string-append out "/bin"))
752 (lib (string-append out "/lib"))
753 (doc (string-append out "/share/doc/"
754 (string-append ,name "-" ,version))))
755 (install-file "apfs-dump" bin)
756 (install-file "apfs-dump-quick" bin)
757 (install-file "apfs-fuse" bin)
758 (install-file "libapfs.a" lib)
759 (install-file "../source/README.md" doc)
765 (synopsis "Read-only FUSE driver for the APFS file system")
766 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
767 System} (APFS). It is currently in an experimental state — it may not be able
768 to read all files, and it does not support all the compression methods in
770 (home-page "https://github.com/sgan81/apfs-fuse")
771 (license license:gpl2+))))
777 (outputs '("out" "module" "src"))
781 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
782 "/download/zfs-" version
783 "/zfs-" version ".tar.gz"))
785 (base32 "0gfdnynmsxbhi97q73smrgmcw1k8zmlr1hgljfn38sk0kimivd6v"))))
786 (build-system linux-module-build-system)
788 `(;; The ZFS kernel module should not be downloaded since the license
789 ;; terms don't allow for distributing it, only building it locally.
791 ;; Tests cannot run in an unprivileged build environment.
794 (modify-phases %standard-phases
795 (add-after 'configure 'really-configure
796 (lambda* (#:key outputs inputs #:allow-other-keys)
797 (let ((out (assoc-ref outputs "out")))
798 (substitute* "configure"
799 (("-/bin/sh") (string-append "-" (which "sh"))))
800 (invoke "./configure"
802 (string-append "--prefix=" out)
803 (string-append "--with-dracutdir=" out "/lib/dracut")
804 (string-append "--with-udevdir=" out "/lib/udev")
805 (string-append "--with-mounthelperdir=" out "/sbin")
806 (string-append "--with-linux="
807 (assoc-ref inputs "linux-module-builder")
808 "/lib/modules/build")))))
809 (add-after 'unpack 'patch-source
810 (lambda* (#:key inputs outputs #:allow-other-keys)
811 (let ((out (assoc-ref outputs "out"))
812 (src (assoc-ref outputs "src"))
813 (util-linux (assoc-ref inputs "util-linux"))
814 (nfs-utils (assoc-ref inputs "nfs-utils")))
815 (substitute* "contrib/Makefile.in"
816 ;; This is not configurable nor is its hard-coded /usr prefix.
818 (substitute* "module/zfs/zfs_ctldir.c"
819 (("/usr/bin/env\", \"umount")
820 (string-append util-linux "/bin/umount\", \"-n"))
821 (("/usr/bin/env\", \"mount")
822 (string-append util-linux "/bin/mount\", \"-n")))
823 (substitute* "lib/libzfs/libzfs_mount.c"
824 (("/bin/mount") (string-append util-linux "/bin/mount"))
825 (("/bin/umount") (string-append util-linux "/bin/umount")))
826 (substitute* "lib/libshare/nfs.c"
827 (("/usr/sbin/exportfs")
828 (string-append nfs-utils "/sbin/exportfs")))
829 (substitute* "config/zfs-build.m4"
830 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
831 (substitute* '("etc/zfs/Makefile.am"
832 "cmd/zed/Makefile.am")
833 (("\\$\\(sysconfdir)") (string-append out "/etc")))
834 (substitute* "cmd/vdev_id/vdev_id"
835 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
836 (string-append "PATH="
837 (dirname (which "chmod")) ":"
838 (dirname (which "grep")) ":"
839 (dirname (which "sed")) ":"
840 (dirname (which "gawk")))))
841 (substitute* "contrib/pyzfs/Makefile.in"
842 ((".*install-lib.*") ""))
843 (substitute* '("Makefile.am" "Makefile.in")
844 (("\\$\\(prefix)/src") (string-append src "/src"))))
847 (lambda _ (invoke "make")))
849 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
850 (let* ((out (assoc-ref outputs "out"))
851 (moddir (assoc-ref outputs "module"))
852 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
853 (invoke "make" "install"
854 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
855 (string-append "DEPMOD=" kmod "/bin/depmod")
856 (string-append "INSTALL_PATH=" out)
857 (string-append "INSTALL_MOD_PATH=" moddir)
858 "INSTALL_MOD_STRIP=1")
859 (install-file "contrib/bash_completion.d/zfs"
860 (string-append out "/share/bash-completion/completions"))
865 ("pkg-config" ,pkg-config)))
869 ("libtirpc" ,libtirpc)
870 ("nfs-utils" ,nfs-utils)
873 ("python-cffi" ,python-cffi)
874 ("util-linux" ,util-linux "lib")
876 (home-page "https://zfsonlinux.org/")
877 (synopsis "Native ZFS on Linux")
879 "ZFS on Linux is an advanced file system and volume manager which was
880 originally developed for Solaris and is now maintained by the OpenZFS
882 (license license:cddl1.0)))
884 (define-public mergerfs
891 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
892 version "/mergerfs-" version ".tar.gz"))
895 "0k4asbg5n9dhy5jpjkw6simqqnr1zira2y4i71cq05091dfwm90p"))))
896 (build-system gnu-build-system)
898 `(#:tests? #f ; No tests exist.
900 (modify-phases %standard-phases
902 (add-after 'unpack 'fix-paths
903 (lambda* (#:key inputs outputs #:allow-other-keys)
905 ;; These were copied from the package libfuse.
906 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
907 (("/bin/(u?)mount" _ maybe-u)
908 (string-append (assoc-ref inputs "util-linux")
909 "/bin/" maybe-u "mount")))
910 (substitute* '("libfuse/util/mount.mergerfs.c")
913 ;; The Makefile does not allow overriding PREFIX via make variables.
914 (substitute* '("Makefile" "libfuse/Makefile")
915 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
916 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
917 ;; cannot chown as build user
918 (("chown root(:root)?") "true"))
920 ;; mergerfs bundles a heavily modified copy of libfuse.
921 (inputs `(("util-linux" ,util-linux)))
922 (home-page "https://github.com/trapexit/mergerfs")
923 (synopsis "Featureful union file system")
924 (description "mergerfs is a union file system geared towards simplifying
925 storage and management of files across numerous commodity storage devices. It
926 is similar to mhddfs, unionfs, and aufs.")
928 license:isc ; mergerfs
929 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
932 (define-public mergerfs-tools
933 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
936 (name "mergerfs-tools")
937 ;; No released version exists.
938 (version (git-version "0.0" revision commit))
943 (url "https://github.com/trapexit/mergerfs-tools")
945 (file-name (git-file-name name version))
948 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
949 (build-system copy-build-system)
952 ("python-xattr" ,python-xattr)
958 (modify-phases %standard-phases
959 (add-after 'unpack 'patch-paths
960 (lambda* (#:key inputs #:allow-other-keys)
961 (substitute* (find-files "src" "^mergerfs\\.")
963 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
965 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
966 (substitute* "src/mergerfs.mktrash"
968 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
970 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
972 (synopsis "Tools to help manage data in a mergerfs pool")
973 (description "mergerfs-tools is a suite of programs that can audit
974 permissions and ownership of files and directories on a mergerfs volume,
975 duplicates files and directories across branches in its pool, find and remove
976 duplicate files, balance pool drives, consolidate files in a single mergerfs
977 directory onto a single drive and create FreeDesktop.org Trash specification
978 compatible directories.")
979 (home-page "https://github.com/trapexit/mergerfs-tools")
980 (license license:isc))))
982 (define-public python-dropbox
984 (name "python-dropbox")
989 (uri (pypi-uri "dropbox" version))
992 "137rn9fs1bg1p1khd5lcccfxh8jsx27dh2ix5wwd8cmddbrzdrbd"))))
993 (build-system python-build-system)
994 (arguments '(#:tests? #f)) ; Tests require a network connection.
996 `(("python-pytest" ,python-pytest)
997 ("python-pytest-runner" ,python-pytest-runner)))
999 `(("python-certifi" ,python-certifi)
1000 ("python-chardet" ,python-chardet)
1001 ("python-requests" ,python-requests)
1002 ("python-six" ,python-six)
1003 ("python-urllib3" ,python-urllib3)))
1004 (home-page "https://www.dropbox.com/developers")
1005 (synopsis "Official Dropbox API Client")
1006 (description "This package provides a Python SDK for integrating with the
1008 (license license:expat)))
1010 (define-public dbxfs
1017 (uri (pypi-uri "dbxfs" version))
1020 "1f9sy2ax215dxiwszrrcadffjdsmrlxm4kwrbiap9dhxvzm226ks"))
1021 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1022 (build-system python-build-system)
1024 '(#:tests? #f)) ; tests requires safefs
1026 `(("python-appdirs" ,python-appdirs)
1027 ("python-block-tracing" ,python-block-tracing)
1028 ("python-dropbox" ,python-dropbox)
1029 ("python-keyring" ,python-keyring)
1030 ("python-keyrings.alt" ,python-keyrings.alt)
1031 ("python-privy" ,python-privy)
1032 ("python-userspacefs" ,python-userspacefs)))
1033 (home-page "https://github.com/rianhunter/dbxfs")
1034 (synopsis "User-space file system for Dropbox")
1036 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
1037 local file system using FUSE.")
1038 (license license:gpl3+)))