gnu: libdvdcss: Update to 1.4.3.
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
CommitLineData
8d5fe1f1 1;;; GNU Guix --- Functional package management for GNU
81763bc1 2;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
7c5cc400 3;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
4be3c3df 4;;; Copyright © 2017, 2018, 2021 Ricardo Wurmus <rekado@elephly.net>
083ce0ad 5;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
09d800cb 6;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
c341b2ad 7;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
6b219b89 8;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
37495db6 9;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
e5fcfb82 10;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
8d5fe1f1
TGR
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages file-systems)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
7c5cc400 31 #:use-module (guix git-download)
083ce0ad 32 #:use-module (guix build-system cmake)
4960a955 33 #:use-module (guix build-system copy)
8d5fe1f1 34 #:use-module (guix build-system gnu)
4be3c3df 35 #:use-module (guix build-system go)
fe338d7f 36 #:use-module (guix build-system linux-module)
cfa7d0cb 37 #:use-module (guix build-system python)
37899445 38 #:use-module (guix build-system trivial)
12a24ee8 39 #:use-module (guix utils)
8d5fe1f1 40 #:use-module (gnu packages)
12a24ee8 41 #:use-module (gnu packages acl)
7c5cc400 42 #:use-module (gnu packages attr)
12a24ee8 43 #:use-module (gnu packages autotools)
59d97bb4 44 #:use-module (gnu packages base)
12a24ee8
RW
45 #:use-module (gnu packages bison)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
cd328a73 48 #:use-module (gnu packages crypto)
3b1ada0d 49 #:use-module (gnu packages curl)
5c10200b 50 #:use-module (gnu packages cyrus-sasl)
12a24ee8 51 #:use-module (gnu packages datastructures)
8d5fe1f1
TGR
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages docbook)
12a24ee8 54 #:use-module (gnu packages flex)
59d97bb4 55 #:use-module (gnu packages gawk)
3b1ada0d 56 #:use-module (gnu packages glib)
c341b2ad 57 #:use-module (gnu packages gnupg)
4be3c3df 58 #:use-module (gnu packages golang)
5c10200b 59 #:use-module (gnu packages kerberos)
fe338d7f 60 #:use-module (gnu packages libffi)
8d5fe1f1 61 #:use-module (gnu packages linux)
fe338d7f 62 #:use-module (gnu packages nfs)
327bfe8d 63 #:use-module (gnu packages onc-rpc)
5c10200b 64 #:use-module (gnu packages openldap)
4c88ae7b 65 #:use-module (gnu packages photo)
8d5fe1f1 66 #:use-module (gnu packages pkg-config)
12a24ee8 67 #:use-module (gnu packages python)
cfa7d0cb
EF
68 #:use-module (gnu packages python-crypto)
69 #:use-module (gnu packages python-web)
4960a955 70 #:use-module (gnu packages python-xyz)
12a24ee8 71 #:use-module (gnu packages readline)
4960a955 72 #:use-module (gnu packages rsync)
5c10200b 73 #:use-module (gnu packages sssd)
cd0322a3 74 #:use-module (gnu packages sqlite)
8d5fe1f1 75 #:use-module (gnu packages tls)
cd328a73 76 #:use-module (gnu packages valgrind)
c92ec095 77 #:use-module (gnu packages version-control)
8d5fe1f1
TGR
78 #:use-module (gnu packages xml))
79
5c10200b
TGR
80(define-public autofs
81 (package
82 (name "autofs")
43469e19 83 (version "5.1.7")
5c10200b
TGR
84 (source
85 (origin
86 (method url-fetch)
87 (uri (string-append "mirror://kernel.org/linux/daemons/autofs/"
88 "v" (version-major version) "/"
89 "autofs-" version ".tar.xz"))
90 (sha256
43469e19 91 (base32 "1myfz6a3wj2c4j9h5g44zj796fdi82jhp1s92w2hg6xp2632csx3"))))
5c10200b
TGR
92 (build-system gnu-build-system)
93 (arguments
94 `(#:configure-flags
95 (list "--enable-ignore-busy" ; during shutdown
96 "--enable-sloppy-mount" ; support mount(8) -s
97 "--with-libtirpc"
98 (string-append "--with-openldap="
99 (assoc-ref %build-inputs "openldap"))
100 (string-append "--with-sasl="
101 (assoc-ref %build-inputs "cyrus-sasl"))
102 "HAVE_SSS_AUTOFS=1" ; required to make sssldir click
103 (string-append "sssldir="
104 (assoc-ref %build-inputs "sssd")
105 "/lib/sssd/modules"))
106 #:tests? #f ; no test suite
107 #:phases
108 (modify-phases %standard-phases
109 (add-before 'configure 'fix-hard-coded-search-path
110 (lambda _
111 (substitute* "configure"
112 (("^searchpath=\".*\"")
113 "searchpath=\"$PATH\""))
114 #t))
43469e19
TGR
115 (add-before 'configure 'fix-rpath
116 (lambda* (#:key outputs #:allow-other-keys)
117 (let ((out (assoc-ref outputs "out")))
118 (substitute* "Makefile.rules"
119 (("^AUTOFS_LIB_LINK.*=" match)
120 (string-append match " -Wl,-rpath=" out "/lib"))))))
5c10200b
TGR
121 (add-before 'install 'omit-obsolete-lookup_nis.so-link
122 ;; Building lookup_yp.so depends on $(YPCLNT) but this doesn't,
123 ;; leading to a make error. Since it's broken, comment it out.
124 (lambda _
125 (substitute* "modules/Makefile"
126 (("ln -fs lookup_yp.so" match)
127 (string-append "# " match)))
128 #t)))))
129 (native-inputs
130 `(("bison" ,bison)
131 ("flex" ,flex)
132 ("pkg-config" ,pkg-config)
133 ("rpcsvc-proto" ,rpcsvc-proto)))
134 (inputs
135 `(("cyrus-sasl" ,cyrus-sasl)
136 ("e2fsprogs" ,e2fsprogs) ; for e[234]fsck
137 ("libtirpc" ,libtirpc)
138 ("libxml2" ,libxml2) ; needed for LDAP, SASL
139 ("mit-krb5" ,mit-krb5) ; needed for LDAP, SASL
140 ("nfs-utils" ,nfs-utils) ; for mount.nfs
141 ("openldap" ,openldap)
142 ("openssl" ,openssl) ; needed for SASL
143 ("sssd" ,sssd)
144 ("util-linux" ,util-linux))) ; for mount, umount
145 ;; XXX A directory index is the closest thing this has to a home page.
146 (home-page "https://www.kernel.org/pub/linux/daemons/autofs/")
147 (synopsis "Kernel-based automounter for Linux")
148 (description
149 "Autofs is a kernel-based automounter for use with the Linux autofs4
150module. It automatically mounts selected file systems when they are used and
151unmounts them after a set period of inactivity. This provides
152centrally-managed, consistent file names for users and applications, even in a
153large and/or frequently changing (network) environment.")
154 ;; fedfs/ is GPL-2-only but not built.
155 (license (list license:bsd-3 ; modules/cyrus-sasl.c
156 license:gpl2+)))) ; the rest
157
6b219b89
MS
158(define-public bindfs
159 (package
160 (name "bindfs")
f4618b13 161 (version "1.15.1")
6b219b89
MS
162 (source (origin
163 (method url-fetch)
164 (uri (string-append "https://bindfs.org/downloads/bindfs-"
165 version ".tar.gz"))
166 (sha256
167 (base32
f4618b13 168 "1av8dj9i1g0105fs5r9srqqsp7yahlhwc0yl8i1szyfdls23bp84"))))
6b219b89
MS
169 (build-system gnu-build-system)
170 (arguments
171 ;; XXX: The tests have no hope of passing until there is a "nogroup"
172 ;; entry (or at least some group to which the guix builder does
173 ;; not belong) in the /etc/group file of the build environment.
174 ;; Currently we do not have such a group. Disable tests for now.
175 '(#:tests? #f))
176 (native-inputs
177 ;; Native inputs to run the tests
178 ;; ("ruby" ,ruby)
179 ;; ("valgrind" ,valgrind)
180 ;; ("which" ,which)
181 `(("pkg-config" ,pkg-config)))
182 (inputs
183 `(("fuse" ,fuse)))
184 (home-page "https://bindfs.org")
185 (synopsis "Bind mount a directory and alter permission bits")
186 (description
a8cee877 187 "@command{bindfs} is a FUSE file system for mounting a directory to
6b219b89
MS
188another location, similar to @command{mount --bind}. It can be used for:
189@itemize
190@item Making a directory read-only.
191@item Making all executables non-executable.
192@item Sharing a directory with a list of users (or groups).
193@item Modifying permission bits using rules with chmod-like syntax.
194@item Changing the permissions with which files are created.
195@end itemize ")
196 (license license:gpl2+)))
197
c92ec095
TGR
198(define-public davfs2
199 (package
200 (name "davfs2")
201 (version "1.6.0")
202 (source
203 (origin
204 (method url-fetch)
205 (uri (string-append "https://download.savannah.nongnu.org/releases/"
206 "davfs2/davfs2-" version ".tar.gz"))
207 (sha256
208 (base32 "0l1vnv5lfigciwg17p10zxwhzj4qw2d9kw30prr7g4dxhmb6fsrf"))))
209 (build-system gnu-build-system)
210 (arguments
211 `(#:configure-flags
212 (list "--sysconfdir=/etc" ; so man pages & binaries contain /etc
213 (string-append "--docdir=" (assoc-ref %outputs "out")
214 "/share/doc/" ,name "-" ,version)
215 (string-append "ssbindir=" (assoc-ref %outputs "out") "/sbin")
216 ;; The default ‘davfs2’ user and group don't exist on most systems.
217 "dav_user=nobody"
218 "dav_group=nogroup")
219 #:phases
220 (modify-phases %standard-phases
221 (add-after 'unpack 'omit-redundancy
222 ;; Don't install redundant copies of /etc examples into /share.
223 (lambda _
224 (substitute* "etc/Makefile.in"
225 (("(dist_pkgdata_DATA =.*) davfs2.conf secrets(.*)"
226 _ prefix suffix)
227 (string-append prefix suffix)))
228 #t))
229 (add-after 'unpack 'patch-file-names
230 (lambda _
231 ;; Don't auto-load the FUSE kernel module. That's up to root.
232 ;; XXX If/when we restore the previous behaviour, make sure not
233 ;; to introduce a security hole when mount.davfs is setuid.
234 (substitute* "src/kernel_interface.c"
235 (("/sbin/modprobe") "/modprobe/disabled"))
236 #t))
237 (replace 'install
238 (lambda* (#:key make-flags outputs #:allow-other-keys)
239 (let ((out (assoc-ref outputs "out")))
240 (apply invoke "make" "install"
241 (string-append "pkgsysconfdir=" out "/etc")
242 make-flags)))))))
243 (inputs
244 `(("neon" ,neon)
245
246 ;; Neon requires but doesn't propagate zlib, nor would we want that.
247 ;; XZ as well, but that's already present in the build environment.
248 ("zlib" ,zlib)))
249 (home-page "https://savannah.nongnu.org/projects/davfs2")
250 (synopsis "Mount remote WebDAV resources in the local file system")
251 (description
252 "The @acronym{WebDAV, Web Distributed Authoring and Versioning} extension
253to the HTTP protocol defines a standard way to author resources on a remote Web
a7e5d956
TGR
254server. Davfs2 exposes such resources as a typical file system which can be
255used by standard applications with no built-in support for WebDAV, such as the
256GNU coreutils (@command{cp}, @command{mv}, etc.) or a graphical word processor.
c92ec095
TGR
257
258Davfs2 works with most WebDAV servers with no or little configuration. It
259supports TLS (HTTPS), HTTP proxies, HTTP basic and digest authentication, and
260client certificates. It performs extensive caching to avoid unnecessary network
261traffic, stay responsive even over slow or unreliable connections, and prevent
262data loss. It aims to make use by unprivileged users as easy and secure as
263possible.
264
265However, davfs2 is not a full-featured WebDAV client. The file system interface
266and the WebDAV protocol are quite different. Translating between the two is not
267always possible.")
268 (license (list license:bsd-2 ; src/fuse_kernel.h
269 license:gpl3+)))) ; everything else
270
c341b2ad
TGR
271(define-public fsarchiver
272 (package
273 (name "fsarchiver")
faaf7ef3 274 (version "0.8.6")
c341b2ad
TGR
275 (source
276 (origin
277 (method git-fetch)
278 (uri
279 (git-reference
b0e7b699 280 (url "https://github.com/fdupoux/fsarchiver")
c341b2ad
TGR
281 (commit version)))
282 (file-name (git-file-name name version))
283 (sha256
faaf7ef3 284 (base32 "1ry2sdkfbg4bwcldk42g1i3wa3z4pr9yh9dil6ilhwcvhqiw41zc"))))
c341b2ad
TGR
285 (build-system gnu-build-system)
286 (native-inputs
287 `(("autoconf" ,autoconf)
288 ("automake" ,automake)
289 ("pkg-config" ,pkg-config)))
290 (inputs
291 `(("bzip2" ,bzip2)
292 ("e2fsprogs" ,e2fsprogs)
293 ("libgcrypt" ,libgcrypt)
294 ("lz4" ,lz4)
295 ("lzo" ,lzo)
296 ("util-linux" ,util-linux "lib")
297 ("xz" ,xz)
298 ("zlib" ,zlib)
299 ("zstd:lib" ,zstd "lib")))
0f30fe7e
TGR
300 (synopsis "File system back-up, deployment, and migration tool")
301 (description
302 "FSArchiver saves the contents of a file system to a compressed archive
303file, and restores it to a different file system and/or partition. This
304partition can be of a different size than the original and FSArchiver will
305create a new file system if none exists.
306
307All standard file attributes supported by the kernel are preserved, including
308file permissions, timestamps, symbolic and hard links, and extended attributes.
309
310Each file in the archive is protected by a checksum. If part of the archive
311is corrupted you'll lose the affected file(s) but not the whole back-up.")
bf8e1005 312 (home-page "https://www.fsarchiver.org/")
c341b2ad
TGR
313 (license license:gpl2)))
314
4c88ae7b
RG
315(define-public gphotofs
316 (package
317 (name "gphotofs")
318 (version "0.5.0")
319 (source
320 (origin
321 (method url-fetch)
322 (uri
323 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
324 "/gphotofs-0.5.tar.gz"))
325 (sha256
326 (base32
327 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
328 (build-system gnu-build-system)
329 (native-inputs
330 `(("pkg-config" ,pkg-config)))
331 (inputs
332 `(("fuse" ,fuse)
333 ("glib" ,glib)
334 ("libgphoto2" ,libgphoto2)))
026959f0
TGR
335 (synopsis "Virtual file system for libgphoto2 using FUSE")
336 (description "GPhotoFS is a FUSE file system module to mount your camera as
337a file system on Linux. This allow using your camera with any tool able to read
338from a mounted file system.")
4c88ae7b
RG
339 (home-page "http://www.gphoto.org/proj/gphotofs/")
340 (license license:gpl2+)))
341
cd328a73 342(define-public bcachefs-tools
fdd63e65
TGR
343 (let ((commit "ce906d661e63d4318b9f26ec145f2ff5fddf5162")
344 (revision "5"))
cd328a73
TGR
345 (package
346 (name "bcachefs-tools")
347 (version (git-version "0.1" revision commit))
348 (source
349 (origin
350 (method git-fetch)
351 (uri (git-reference
352 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
353 (commit commit)))
354 (file-name (git-file-name name version))
355 (sha256
fdd63e65 356 (base32 "1fkfqrk3q6shjr8jnpf3myd79xdpc8hbs0grwdmzb3dhw65k9isi"))))
cd328a73
TGR
357 (build-system gnu-build-system)
358 (arguments
359 `(#:make-flags
8dca40a3
TGR
360 (list ,(string-append "VERSION=" version) ; bogus vX.Y-nogit otherwise
361 (string-append "PREFIX=" (assoc-ref %outputs "out"))
cd328a73
TGR
362 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
363 "CC=gcc"
364 "PYTEST=pytest")
365 #:phases
366 (modify-phases %standard-phases
59d97bb4
TGR
367 (delete 'configure) ; no configure script
368 (add-after 'install 'promote-mount.bcachefs.sh
369 ;; XXX The (optional) mount.bcachefs helper requires rust:cargo.
370 ;; This alternative shell script does the job well enough for now.
371 (lambda* (#:key inputs outputs #:allow-other-keys)
372 (let ((out (assoc-ref outputs "out")))
373 (with-directory-excursion (string-append out "/sbin")
374 (rename-file "mount.bcachefs.sh" "mount.bcachefs")
375 ;; WRAP-SCRIPT causes bogus ‘Insufficient arguments’ errors.
376 (wrap-program "mount.bcachefs"
377 `("PATH" ":" prefix
378 ,(cons (string-append out "/sbin")
379 (map (lambda (input)
380 (string-append (assoc-ref inputs input)
381 "/bin"))
382 (list "coreutils"
383 "gawk"
384 "util-linux"))))))))))
cd328a73
TGR
385 #:tests? #f)) ; XXX 6 valgrind tests fail
386 (native-inputs
387 `(("pkg-config" ,pkg-config)
388
389 ;; For tests.
390 ("python-pytest" ,python-pytest)
391 ("valgrind" ,valgrind)))
392 (inputs
c95fbe64
TGR
393 `(("eudev" ,eudev)
394 ("keyutils" ,keyutils)
cd328a73
TGR
395 ("libaio" ,libaio)
396 ("libscrypt" ,libscrypt)
397 ("libsodium" ,libsodium)
398 ("liburcu" ,liburcu)
59d97bb4 399 ("util-linux:lib" ,util-linux "lib") ; lib{blkid,uuid}
cd328a73
TGR
400 ("lz4" ,lz4)
401 ("zlib" ,zlib)
59d97bb4
TGR
402 ("zstd:lib" ,zstd "lib")
403
404 ;; Only for mount.bcachefs.sh.
405 ("coreutils" ,coreutils-minimal)
406 ("gawk" ,gawk)
407 ("util-linux" ,util-linux)))
cd328a73
TGR
408 (home-page "https://bcachefs.org/")
409 (synopsis "Tools to create and manage bcachefs file systems")
410 (description
8ccc77a4 411 "The bcachefs-tools are command-line utilities for creating, checking,
cd328a73
TGR
412and otherwise managing bcachefs file systems.
413
414Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
415encryption, compression, snapshots, and (meta)data checksums. It can use
416multiple block devices for replication and/or performance, similar to RAID.
417
418In addition, bcachefs provides all the functionality of bcache, a block-layer
419caching system, and lets you assign different roles to each device based on its
420performance and other characteristics.")
421 (license license:gpl2+))))
422
7c5f0642
TGR
423(define-public bcachefs-tools/static
424 (package
425 (inherit bcachefs-tools)
426 (name "bcachefs-tools-static")
427 (arguments
428 (substitute-keyword-arguments (package-arguments bcachefs-tools)
429 ((#:make-flags make-flags)
430 `(append ,make-flags
431 (list "LDFLAGS=-static")))))
432 (inputs
433 `(("eudev:static" ,eudev "static")
434 ("libscrypt:static" ,libscrypt "static")
435 ("lz4:static" ,lz4 "static")
436 ("util-linux:static" ,util-linux "static") ; lib{blkid,uuid}
437 ("zlib" ,zlib "static")
438 ("zstd:static" ,zstd "static")
439 ,@(package-inputs bcachefs-tools)))))
440
16611d1c
TGR
441(define-public bcachefs/static
442 (package
443 (name "bcachefs-static")
444 (version (package-version bcachefs-tools))
445 (build-system trivial-build-system)
446 (source #f)
447 (inputs
448 `(("bcachefs-tools" ,bcachefs-tools/static)))
449 (arguments
450 `(#:modules ((guix build utils))
451 #:builder
452 (begin
453 (use-modules (guix build utils)
454 (ice-9 ftw)
455 (srfi srfi-26))
456 (let* ((bcachefs-tools (assoc-ref %build-inputs "bcachefs-tools"))
457 (out (assoc-ref %outputs "out")))
458 (mkdir-p out)
459 (with-directory-excursion out
460 (install-file (string-append bcachefs-tools
461 "/sbin/bcachefs")
462 "sbin")
463 (remove-store-references "sbin/bcachefs")
464 (invoke "sbin/bcachefs" "version") ; test suite
465 #t)))))
466 (home-page (package-home-page bcachefs-tools))
467 (synopsis "Statically-linked bcachefs command from bcachefs-tools")
468 (description "This package provides the statically-linked @command{bcachefs}
469from the bcachefs-tools package. It is meant to be used in initrds.")
470 (license (package-license bcachefs-tools))))
471
d7aef3ab
TGR
472(define-public exfatprogs
473 (package
474 (name "exfatprogs")
096a66c6 475 (version "1.1.0")
d7aef3ab
TGR
476 (source
477 (origin
478 (method git-fetch)
479 (uri (git-reference
480 (url "https://github.com/exfatprogs/exfatprogs")
481 (commit version)))
482 (file-name (git-file-name name version))
483 (sha256
096a66c6 484 (base32 "1ciy28lx7c1vr1f138qi0mkz88pzlkay6nlwmp1yjzd830x48549"))))
d7aef3ab
TGR
485 (build-system gnu-build-system)
486 (arguments
487 `(#:configure-flags
488 (list "--disable-static")))
489 (native-inputs
490 `(("autoconf" ,autoconf)
491 ("automake" ,automake)
492 ("libtool" ,libtool)
493 ("pkg-config" ,pkg-config)))
494 (home-page "https://github.com/exfatprogs/exfatprogs")
495 (synopsis "Tools to create, check, and repair exFAT file systems")
496 (description
497 "These are command-line user space tools for the @acronym{exFAT,
498Extensible File Allocation Table} file systems. Included are
499@command{mkfs.exfat} to create (format) new exFAT file systems, and
500@command{fsck.exfat} to check their consistency and repair them.")
501 (license license:gpl2+)))
502
8d5fe1f1
TGR
503(define-public httpfs2
504 (package
505 (name "httpfs2")
506 (version "0.1.5")
507 (source
508 (origin
509 (method url-fetch)
c5edec09
TGR
510 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
511 "httpfs2-" version ".tar.gz"))
8d5fe1f1
TGR
512 (sha256
513 (base32
514 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
515 (build-system gnu-build-system)
516 (native-inputs
517 `(("asciidoc" ,asciidoc)
518 ("docbook-xml" ,docbook-xml)
519 ("libxml2" ,libxml2)
520 ("libxslt" ,libxslt)
521 ("pkg-config" ,pkg-config)))
522 (inputs
523 `(("fuse" ,fuse)
524 ("gnutls" ,gnutls)))
525 (arguments
526 `(#:phases
527 (modify-phases %standard-phases
528 (delete 'configure) ; no configure script
529 (replace 'install
530 ;; There's no ‘install’ target. Install all variants manually.
531 (lambda* (#:key outputs #:allow-other-keys)
532 (let* ((out (assoc-ref outputs "out"))
533 (bin (string-append out "/bin"))
534 (man1 (string-append out "/share/man/man1")))
535 (mkdir-p bin)
536 (mkdir-p man1)
537 (for-each
538 (lambda (variant)
539 (let ((man1-page (string-append variant ".1")))
540 (install-file variant bin)
541 (install-file man1-page man1)))
542 (list "httpfs2"
543 "httpfs2-mt"
544 "httpfs2-ssl"
545 "httpfs2-ssl-mt")))
546 #t)))
547 #:make-flags (list "CC=gcc")
548 #:parallel-build? #f ; can result in missing man pages
549 #:tests? #f)) ; no tests
550 (home-page "https://sourceforge.net/projects/httpfs/")
551 (synopsis "Mount remote files over HTTP")
552 (description "httpfs2 is a @code{fuse} file system for mounting any
553@dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
554arbitrary bytes from the web server, without needing to download the entire
555file. This is particularly useful with large archives such as ZIP files and
556ISO images when you only need to inspect their contents or extract specific
557files. Since the HTTP protocol itself has no notion of directories, only a
558single file can be mounted.")
559 (license license:gpl2+)))
7c5cc400 560
e9e75da6
TGR
561(define-public jfsutils
562 (package
563 (name "jfsutils")
564 (version "1.1.15")
565 (source
566 (origin
567 (method url-fetch)
568 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
569 version ".tar.gz"))
570 (sha256
571 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
572 (patches (search-patches "jfsutils-add-sysmacros.patch"
573 "jfsutils-include-systypes.patch"))))
574 (build-system gnu-build-system)
575 (inputs
bb93042c 576 `(("util-linux" ,util-linux "lib")))
e9e75da6
TGR
577 (home-page "http://jfs.sourceforge.net/home.html")
578 (synopsis "Utilities for managing JFS file systems")
579 (description
580 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
581Journaled File System}, a 64-bit journaling file system created by IBM and later
582ported to the kernel Linux. The following commands are available:
583@enumerate
584@item @command{fsck.jfs}: check and repair a JFS file system or replay its
585transaction log.
586@item @command{logdump}: dump the JFS journal log.
587@item @command{logredo}: replay the JFS journal log.
588@item @command{mkfs.jfs}: create a new JFS file system.
589@item @command{xchklog}: save a JFS fsck log to a file.
590@item @command{xchkdmp}: dump the contents of such a log file.
591@item @command{xpeek}: a JFS file system editor with a shell-like interface.
592@end enumerate\n")
593 (license license:gpl3+))) ; no explicit version given
594
56dad973
TGR
595(define-public jfsutils/static
596 (static-package
597 (package
598 (inherit jfsutils)
599 (name "jfsutils-static")
600 (inputs
601 `(("util-linux:static" ,util-linux "static")
602 ,@(package-inputs jfsutils))))))
603
37899445
TGR
604(define-public jfs_fsck/static
605 (package
606 (name "jfs_fsck-static")
607 (version (package-version jfsutils))
608 (source #f)
609 (build-system trivial-build-system)
610 (arguments
611 `(#:modules ((guix build utils))
612 #:builder
613 (begin
614 (use-modules (guix build utils)
615 (ice-9 ftw)
616 (srfi srfi-26))
617 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
618 (fsck "jfs_fsck")
619 (out (assoc-ref %outputs "out"))
620 (sbin (string-append out "/sbin")))
621 (mkdir-p sbin)
622 (with-directory-excursion sbin
623 (install-file (string-append jfsutils "/sbin/" fsck)
624 ".")
625 (remove-store-references fsck)
626 (chmod fsck #o555))
627 #t))))
628 (inputs
629 `(("jfsutils" ,jfsutils/static)))
630 (home-page (package-home-page jfsutils))
631 (synopsis "Statically-linked jfs_fsck command from jfsutils")
632 (description "This package provides statically-linked jfs_fsck command taken
633from the jfsutils package. It is meant to be used in initrds.")
634 (license (package-license jfsutils))))
635
7c5cc400
GB
636(define-public disorderfs
637 (package
638 (name "disorderfs")
599c6414 639 (version "0.5.11")
7c5cc400
GB
640 (source
641 (origin
642 (method git-fetch)
643 (uri (git-reference
3b68a9b6
TGR
644 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
645 (commit version)))
a1dc853e 646 (file-name (git-file-name name version))
7c5cc400
GB
647 (sha256
648 (base32
599c6414 649 "1pnrj0h8sgqwgsc18vz3fkqsp6vhigdbi75vdj0si1r6wgslnr7z"))))
7c5cc400
GB
650 (build-system gnu-build-system)
651 (native-inputs
652 `(("pkg-config" ,pkg-config)))
653 (inputs
654 `(("fuse" ,fuse)
655 ("attr" ,attr)))
656 (arguments
657 `(#:phases (modify-phases %standard-phases
becee702 658 (delete 'configure)) ; no configure script
7c5cc400
GB
659 #:make-flags (let ((out (assoc-ref %outputs "out")))
660 (list (string-append "PREFIX=" out)))
661 #:test-target "test"
662 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
663 #:tests? #f))
9b478eb7 664 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
162a1374 665 (synopsis "FUSE file system that introduces non-determinism")
7c5cc400 666 (description
162a1374
TGR
667 "An overlay FUSE file system that introduces non-determinism
668into file system metadata. For example, it can randomize the order
7c5cc400
GB
669in which directory entries are read. This is useful for detecting
670non-determinism in the build process.")
671 (license license:gpl3+)))
672
12a24ee8
RW
673(define-public glusterfs
674 (package
675 (name "glusterfs")
327bfe8d 676 (version "7.0")
12a24ee8
RW
677 (source
678 (origin
679 (method url-fetch)
680 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
327bfe8d
AM
681 (version-major version) "/"
682 (version-major+minor version) "/"
683 "glusterfs-" version ".tar.gz"))
12a24ee8
RW
684 (sha256
685 (base32
327bfe8d 686 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
12a24ee8
RW
687 (build-system gnu-build-system)
688 (arguments
689 `(#:configure-flags
327bfe8d
AM
690 (let ((out (assoc-ref %outputs "out"))
691 (p2 (assoc-ref %build-inputs "python-2")))
692 (list (string-append "PYTHON=" p2 "/bin/python")
693 (string-append "--with-initdir=" out "/etc/init.d")
694 (string-append "--with-mountutildir=" out "/sbin")
695 "--enable-cmocka" ; unit tests
696 ;; "--enable-debug" ; debug build options
697 ;; "--enable-asan" ; Address Sanitizer
698 ;; "--enable-tsan" ; ThreadSanitizer
699 ))
12a24ee8
RW
700 #:phases
701 (modify-phases %standard-phases
327bfe8d
AM
702 (add-before 'configure 'autogen
703 (lambda _ (invoke "./autogen.sh"))))))
12a24ee8 704 (native-inputs
327bfe8d 705 `(("pkg-config" ,pkg-config)
1628d57b
EF
706 ("libtirpc" ,libtirpc)
707 ("rpcsvc-proto" ,rpcsvc-proto)
12a24ee8
RW
708 ("python-2" ,python-2) ; must be version 2
709 ("flex" ,flex)
710 ("bison" ,bison)
327bfe8d
AM
711 ("libtool" ,libtool)
712 ("autoconf" ,autoconf)
713 ("automake" ,automake)
714 ("cmocka" ,cmocka)))
12a24ee8
RW
715 (inputs
716 `(("acl" ,acl)
1628d57b 717 ("fuse" ,fuse)
12a24ee8
RW
718 ("openssl" ,openssl)
719 ("liburcu" ,liburcu)
bb93042c 720 ("libuuid" ,util-linux "lib")
12a24ee8 721 ("libxml2" ,libxml2)
12a24ee8 722 ("readline" ,readline)
327bfe8d 723 ("zlib" ,zlib)
1628d57b
EF
724 ("libaio" ,libaio)
725 ("rdma-core" ,rdma-core)))
12a24ee8
RW
726 (home-page "https://www.gluster.org")
727 (synopsis "Distributed file system")
162a1374 728 (description "GlusterFS is a distributed scalable network file system
12a24ee8
RW
729suitable for data-intensive tasks such as cloud storage and media streaming.
730It allows rapid provisioning of additional storage based on your storage
731consumption needs. It incorporates automatic failover as a primary feature.
732All of this is accomplished without a centralized metadata server.")
733 ;; The user may choose either LGPLv3+ or GPLv2 only.
734 (license (list license:lgpl3+ license:gpl2+))))
3b1ada0d
DM
735
736(define-public curlftpfs
737 (package
738 (name "curlftpfs")
739 (version "0.9.2")
740 (source
741 (origin
742 (method url-fetch)
743 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
744 "/curlftpfs-" version ".tar.gz"))
745 (sha256
746 (base32
747 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
748 (build-system gnu-build-system)
749 (arguments
750 `(#:phases
751 (modify-phases %standard-phases
752 (add-after 'unpack 'fix-test
753 (lambda _
754 ;; One of the 512-Byte block counts is definitely wrong.
755 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
756 (substitute* "tests/ftpfs-ls_unittest.c"
757 (("4426192") "12814800"))
758 #t)))))
759 (inputs
760 `(("curl" ,curl)
761 ("glib" ,glib)
c695fb76 762 ("fuse" ,fuse)))
3b1ada0d
DM
763 (native-inputs
764 `(("pkg-config" ,pkg-config)))
765 (home-page "http://curlftpfs.sourceforge.net/")
766 (synopsis "Mount remote file systems over FTP")
767 (description
768 "This is a file system client based on the FTP File Transfer Protocol.")
769 (license license:gpl2+)))
083ce0ad 770
3b39ae9f
RW
771(define-public libnfs
772 (package
773 (name "libnfs")
774 (version "3.0.0")
775 (source (origin
776 (method git-fetch)
777 (uri (git-reference
b0e7b699 778 (url "https://github.com/sahlberg/libnfs")
3b39ae9f
RW
779 (commit (string-append "libnfs-" version))))
780 (file-name (git-file-name name version))
781 (sha256
782 (base32
783 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
784 (build-system gnu-build-system)
785 (home-page "https://github.com/sahlberg/libnfs")
786 (native-inputs
787 `(("autoconf" ,autoconf)
788 ("automake" ,automake)
789 ("libtool" ,libtool)
790 ("pkg-config" ,pkg-config)))
791 (synopsis "Client library for accessing NFS shares")
792 (description "LIBNFS is a client library for accessing NFS shares over a
793network. LIBNFS offers three different APIs, for different use :
794
795@enumerate
796@item RAW, a fully asynchronous low level RPC library for NFS protocols. This
797 API provides very flexible and precise control of the RPC issued.
798@item NFS ASYNC, a fully asynchronous library for high level vfs functions
799@item NFS SYNC, a synchronous library for high level vfs functions.
800@end enumerate\n")
801 (license (list license:lgpl2.1+ ; library
802 license:gpl3+ ; tests
803 license:bsd-3 ; copied nsf4 files
804 ))))
805
083ce0ad 806(define-public apfs-fuse
023eea68
LF
807 ;; Later versions require FUSE 3.
808 (let ((commit "7b89418e8dc27103d3c4f8fa348086ffcd634c17")
809 (revision "1"))
083ce0ad
LF
810 (package
811 (name "apfs-fuse")
812 (version (git-version "0.0.0" revision commit))
813 (source (origin
814 (method git-fetch)
815 (uri (git-reference
816 (url "https://github.com/sgan81/apfs-fuse")
817 (recursive? #t) ; for lzfse
818 (commit commit)))
819 (sha256
820 (base32
023eea68 821 "0x2siy3cmnm9wsdfazg3xc8r3kbg73gijmnn1vjw33pp71ckylxr"))
083ce0ad
LF
822 (file-name (git-file-name name version))))
823 (build-system cmake-build-system)
824 (arguments
825 `(#:tests? #f ; No test suite
023eea68
LF
826 #:configure-flags
827 '("-DUSE_FUSE3=OFF") ; FUSE 3 is not packaged yet.
083ce0ad
LF
828 #:phases
829 (modify-phases %standard-phases
830 ;; No 'install' target in CMakeLists.txt
831 (replace 'install
832 (lambda* (#:key outputs #:allow-other-keys)
833 (let* ((out (assoc-ref outputs "out"))
834 (bin (string-append out "/bin"))
835 (lib (string-append out "/lib"))
836 (doc (string-append out "/share/doc/"
837 (string-append ,name "-" ,version))))
838 (install-file "apfs-dump" bin)
839 (install-file "apfs-dump-quick" bin)
840 (install-file "apfs-fuse" bin)
841 (install-file "libapfs.a" lib)
023eea68 842 (install-file "../source/README.md" doc)
083ce0ad
LF
843 #t))))))
844 (inputs
845 `(("bzip2" ,bzip2)
846 ("fuse" ,fuse)
847 ("zlib" ,zlib)))
c1469ab6 848 (synopsis "Read-only FUSE driver for the APFS file system")
083ce0ad
LF
849 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
850System} (APFS). It is currently in an experimental state — it may not be able
851to read all files, and it does not support all the compression methods in
852APFS.")
853 (home-page "https://github.com/sgan81/apfs-fuse")
854 (license license:gpl2+))))
fe338d7f
EF
855
856(define-public zfs
857 (package
858 (name "zfs")
495a68e8 859 (version "2.0.4")
fe338d7f
EF
860 (outputs '("out" "module" "src"))
861 (source
862 (origin
863 (method url-fetch)
864 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
865 "/download/zfs-" version
866 "/zfs-" version ".tar.gz"))
867 (sha256
495a68e8 868 (base32 "0v2zshimz5miyj8mbskb52pnzyl1s4rhpr6208zq549v8g2l84vx"))))
fe338d7f
EF
869 (build-system linux-module-build-system)
870 (arguments
871 `(;; The ZFS kernel module should not be downloaded since the license
872 ;; terms don't allow for distributing it, only building it locally.
873 #:substitutable? #f
874 ;; Tests cannot run in an unprivileged build environment.
875 #:tests? #f
876 #:phases
877 (modify-phases %standard-phases
878 (add-after 'configure 'really-configure
879 (lambda* (#:key outputs inputs #:allow-other-keys)
880 (let ((out (assoc-ref outputs "out")))
881 (substitute* "configure"
2bde4a1d 882 (("-/bin/sh") (string-append "-" (which "sh"))))
fe338d7f
EF
883 (invoke "./configure"
884 "--with-config=all"
885 (string-append "--prefix=" out)
886 (string-append "--with-dracutdir=" out "/lib/dracut")
887 (string-append "--with-udevdir=" out "/lib/udev")
888 (string-append "--with-mounthelperdir=" out "/sbin")
889 (string-append "--with-linux="
890 (assoc-ref inputs "linux-module-builder")
891 "/lib/modules/build")))))
892 (add-after 'unpack 'patch-source
893 (lambda* (#:key inputs outputs #:allow-other-keys)
894 (let ((out (assoc-ref outputs "out"))
895 (src (assoc-ref outputs "src"))
896 (util-linux (assoc-ref inputs "util-linux"))
849e3dd0 897 (nfs-utils (assoc-ref inputs "nfs-utils"))
898 (kmod (assoc-ref inputs "kmod-runtime")))
e2fe0528 899 (substitute* "etc/Makefile.in"
900 ;; This just contains an example configuration file for
901 ;; configuring ZFS on traditional init systems, skip it
902 ;; since we cannot use it anyway; the install target becomes
903 ;; misdirected.
904 (("= default ") "= "))
905 (substitute* "lib/libzfs/os/linux/libzfs_util_os.c"
906 ;; Use path to /gnu/store/*-kmod in actual path that is exec'ed.
907 (("\"/sbin/modprobe\"")
908 (string-append "\"" kmod "/bin/modprobe" "\""))
909 ;; Just use 'modprobe' in message to user, since Guix
910 ;; does not have a traditional /sbin/
911 (("'/sbin/modprobe ") "'modprobe "))
2bde4a1d
TGR
912 (substitute* "contrib/Makefile.in"
913 ;; This is not configurable nor is its hard-coded /usr prefix.
914 ((" initramfs") ""))
e2fe0528 915 (substitute* "module/os/linux/zfs/zfs_ctldir.c"
fe338d7f
EF
916 (("/usr/bin/env\", \"umount")
917 (string-append util-linux "/bin/umount\", \"-n"))
918 (("/usr/bin/env\", \"mount")
919 (string-append util-linux "/bin/mount\", \"-n")))
e2fe0528 920 (substitute* "lib/libzfs/os/linux/libzfs_mount_os.c"
fe338d7f
EF
921 (("/bin/mount") (string-append util-linux "/bin/mount"))
922 (("/bin/umount") (string-append util-linux "/bin/umount")))
e2fe0528 923 (substitute* "lib/libshare/os/linux/nfs.c"
fe338d7f
EF
924 (("/usr/sbin/exportfs")
925 (string-append nfs-utils "/sbin/exportfs")))
926 (substitute* "config/zfs-build.m4"
927 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
928 (substitute* '("etc/zfs/Makefile.am"
929 "cmd/zed/Makefile.am")
930 (("\\$\\(sysconfdir)") (string-append out "/etc")))
931 (substitute* "cmd/vdev_id/vdev_id"
932 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
933 (string-append "PATH="
934 (dirname (which "chmod")) ":"
935 (dirname (which "grep")) ":"
936 (dirname (which "sed")) ":"
937 (dirname (which "gawk")))))
938 (substitute* "contrib/pyzfs/Makefile.in"
939 ((".*install-lib.*") ""))
940 (substitute* '("Makefile.am" "Makefile.in")
849e3dd0 941 (("\\$\\(prefix)/src") (string-append src "/src")))
942 (substitute* (find-files "udev/rules.d/" ".rules.in$")
943 (("/sbin/modprobe") (string-append kmod "/bin/modprobe"))))
fe338d7f
EF
944 #t))
945 (replace 'build
946 (lambda _ (invoke "make")))
947 (replace 'install
948 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
949 (let* ((out (assoc-ref outputs "out"))
950 (moddir (assoc-ref outputs "module"))
951 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
952 (invoke "make" "install"
953 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
954 (string-append "DEPMOD=" kmod "/bin/depmod")
955 (string-append "INSTALL_PATH=" out)
956 (string-append "INSTALL_MOD_PATH=" moddir)
957 "INSTALL_MOD_STRIP=1")
958 (install-file "contrib/bash_completion.d/zfs"
959 (string-append out "/share/bash-completion/completions"))
fe338d7f
EF
960 #t))))))
961 (native-inputs
962 `(("attr" ,attr)
ed7f4d33 963 ("kmod" ,kmod)
fe338d7f
EF
964 ("pkg-config" ,pkg-config)))
965 (inputs
966 `(("eudev" ,eudev)
849e3dd0 967 ("kmod-runtime" ,kmod)
fe338d7f
EF
968 ("libaio" ,libaio)
969 ("libtirpc" ,libtirpc)
970 ("nfs-utils" ,nfs-utils)
971 ("openssl" ,openssl)
972 ("python" ,python)
973 ("python-cffi" ,python-cffi)
8d3184c5 974 ("util-linux" ,util-linux)
975 ("util-linux:lib" ,util-linux "lib")
fe338d7f
EF
976 ("zlib" ,zlib)))
977 (home-page "https://zfsonlinux.org/")
495a68e8 978 (synopsis "OpenZFS on Linux")
fe338d7f 979 (description
495a68e8 980 "OpenZFS is an advanced file system and volume manager which was
fe338d7f
EF
981originally developed for Solaris and is now maintained by the OpenZFS
982community.")
983 (license license:cddl1.0)))
639bcf20
LDB
984
985(define-public mergerfs
986 (package
987 (name "mergerfs")
ca8fa117 988 (version "2.32.4")
639bcf20
LDB
989 (source
990 (origin
991 (method url-fetch)
992 (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/"
993 version "/mergerfs-" version ".tar.gz"))
994 (sha256
995 (base32
ca8fa117 996 "0yz7nljx6axcj6hb09sgc0waspgfhp535228rjqvqgyd8y74jc3s"))))
639bcf20
LDB
997 (build-system gnu-build-system)
998 (arguments
999 `(#:tests? #f ; No tests exist.
1000 #:phases
1001 (modify-phases %standard-phases
1002 (delete 'configure)
1003 (add-after 'unpack 'fix-paths
1004 (lambda* (#:key inputs outputs #:allow-other-keys)
1005 (setenv "CC" "gcc")
1006 ;; These were copied from the package libfuse.
1007 (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c")
1008 (("/bin/(u?)mount" _ maybe-u)
1009 (string-append (assoc-ref inputs "util-linux")
1010 "/bin/" maybe-u "mount")))
1011 (substitute* '("libfuse/util/mount.mergerfs.c")
1012 (("/bin/sh")
1013 (which "sh")))
1014 ;; The Makefile does not allow overriding PREFIX via make variables.
1015 (substitute* '("Makefile" "libfuse/Makefile")
1016 (("= /usr/local") (string-append "= " (assoc-ref outputs "out")))
f13849a5 1017 (("= /sbin") "= $(EXEC_PREFIX)/sbin")
639bcf20 1018 ;; cannot chown as build user
f13849a5 1019 (("chown root(:root)?") "true"))
639bcf20
LDB
1020 #t)))))
1021 ;; mergerfs bundles a heavily modified copy of libfuse.
1022 (inputs `(("util-linux" ,util-linux)))
1023 (home-page "https://github.com/trapexit/mergerfs")
052117f8
TGR
1024 (synopsis "Featureful union file system")
1025 (description "mergerfs is a union file system geared towards simplifying
639bcf20
LDB
1026storage and management of files across numerous commodity storage devices. It
1027is similar to mhddfs, unionfs, and aufs.")
1028 (license (list
1029 license:isc ; mergerfs
1030 license:gpl2 license:lgpl2.0 ; Imported libfuse code.
1031 ))))
4960a955
LDB
1032
1033(define-public mergerfs-tools
bd994bbb
LDB
1034 (let ((commit "480296ed03d1c3c7909697d7ef96d35840ee26b8")
1035 (revision "2"))
4960a955
LDB
1036 (package
1037 (name "mergerfs-tools")
1038 ;; No released version exists.
1039 (version (git-version "0.0" revision commit))
1040 (source
1041 (origin
1042 (method git-fetch)
1043 (uri (git-reference
b0e7b699 1044 (url "https://github.com/trapexit/mergerfs-tools")
4960a955
LDB
1045 (commit commit)))
1046 (file-name (git-file-name name version))
1047 (sha256
1048 (base32
bd994bbb 1049 "0xr06gi4xcr832rzy0hkp5c1n231s7w5iq1nkjvx9kvm0dl7chpq"))))
4960a955
LDB
1050 (build-system copy-build-system)
1051 (inputs
1052 `(("python" ,python)
1053 ("python-xattr" ,python-xattr)
1054 ("rsync" ,rsync)))
1055 (arguments
1056 '(#:install-plan
1057 '(("src/" "bin/"))
1058 #:phases
1059 (modify-phases %standard-phases
1060 (add-after 'unpack 'patch-paths
1061 (lambda* (#:key inputs #:allow-other-keys)
1062 (substitute* (find-files "src" "^mergerfs\\.")
1063 (("'rsync'")
1064 (string-append "'" (assoc-ref inputs "rsync") "/bin/rsync'"))
1065 (("'rm'")
1066 (string-append "'" (assoc-ref inputs "coreutils") "/bin/rm'")))
1067 (substitute* "src/mergerfs.mktrash"
1068 (("xattr")
1069 (string-append (assoc-ref inputs "python-xattr") "/bin/xattr"))
1070 (("mkdir")
1071 (string-append (assoc-ref inputs "coreutils") "/bin/mkdir")))
1072 #t)))))
1073 (synopsis "Tools to help manage data in a mergerfs pool")
1074 (description "mergerfs-tools is a suite of programs that can audit
1075permissions and ownership of files and directories on a mergerfs volume,
1076duplicates files and directories across branches in its pool, find and remove
1077duplicate files, balance pool drives, consolidate files in a single mergerfs
1078directory onto a single drive and create FreeDesktop.org Trash specification
1079compatible directories.")
1080 (home-page "https://github.com/trapexit/mergerfs-tools")
1081 (license license:isc))))
cfa7d0cb
EF
1082
1083(define-public python-dropbox
1084 (package
1085 (name "python-dropbox")
b53e7ae6 1086 (version "11.5.0")
cfa7d0cb
EF
1087 (source
1088 (origin
1089 (method url-fetch)
1090 (uri (pypi-uri "dropbox" version))
1091 (sha256
1092 (base32
b53e7ae6 1093 "16bxx9xqx2s4d9khrw57a0bj4q7nc6kq355wl4pfddn9cqvh9rg2"))))
cfa7d0cb
EF
1094 (build-system python-build-system)
1095 (arguments '(#:tests? #f)) ; Tests require a network connection.
1096 (native-inputs
1097 `(("python-pytest" ,python-pytest)
1098 ("python-pytest-runner" ,python-pytest-runner)))
1099 (propagated-inputs
1100 `(("python-certifi" ,python-certifi)
1101 ("python-chardet" ,python-chardet)
1102 ("python-requests" ,python-requests)
1103 ("python-six" ,python-six)
ad68e30c 1104 ("python-stone" ,python-stone)
cfa7d0cb
EF
1105 ("python-urllib3" ,python-urllib3)))
1106 (home-page "https://www.dropbox.com/developers")
1107 (synopsis "Official Dropbox API Client")
1108 (description "This package provides a Python SDK for integrating with the
1109Dropbox API v2.")
1110 (license license:expat)))
e0945a02
EF
1111
1112(define-public dbxfs
1113 (package
1114 (name "dbxfs")
e81457aa 1115 (version "1.0.51")
e0945a02
EF
1116 (source
1117 (origin
1118 (method url-fetch)
1119 (uri (pypi-uri "dbxfs" version))
1120 (sha256
1121 (base32
e81457aa 1122 "1zz82d0mnql55397x4jx7z5rn857rf9zhjv895j93wpxdq10xwvk"))
e0945a02
EF
1123 (patches (search-patches "dbxfs-remove-sentry-sdk.patch"))))
1124 (build-system python-build-system)
1125 (arguments
1126 '(#:tests? #f)) ; tests requires safefs
1127 (propagated-inputs
1128 `(("python-appdirs" ,python-appdirs)
1129 ("python-block-tracing" ,python-block-tracing)
1130 ("python-dropbox" ,python-dropbox)
1131 ("python-keyring" ,python-keyring)
1132 ("python-keyrings.alt" ,python-keyrings.alt)
1133 ("python-privy" ,python-privy)
1134 ("python-userspacefs" ,python-userspacefs)))
1135 (home-page "https://github.com/rianhunter/dbxfs")
1136 (synopsis "User-space file system for Dropbox")
1137 (description
1138 "@code{dbxfs} allows you to mount your Dropbox folder as if it were a
7230f6d5 1139local file system using FUSE.")
e0945a02 1140 (license license:gpl3+)))
4be3c3df
RW
1141
1142(define-public go-github-com-hanwen-fuse
1143 (package
1144 (name "go-github-com-hanwen-fuse")
1145 (version "2.0.3")
1146 (source
1147 (origin
1148 (method git-fetch)
1149 (uri (git-reference
1150 (url "https://github.com/hanwen/go-fuse")
1151 (commit (string-append "v" version))))
1152 (file-name (git-file-name name version))
1153 (sha256
1154 (base32
1155 "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03"))))
1156 (build-system go-build-system)
1157 (arguments
1158 `(#:import-path "github.com/hanwen/go-fuse"))
1159 (propagated-inputs
1160 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
1161 (home-page "https://github.com/hanwen/go-fuse")
1162 (synopsis "FUSE bindings for Go")
1163 (description
1164 "This package provides Go native bindings for the FUSE kernel module.")
1165 (license license:bsd-3)))
a4cc03a8
RW
1166
1167(define-public tmsu
1168 (package
1169 (name "tmsu")
1170 (version "0.7.5")
1171 (source
1172 (origin
1173 (method git-fetch)
1174 (uri (git-reference
1175 (url "https://github.com/oniony/TMSU")
1176 (commit (string-append "v" version))))
1177 (file-name (git-file-name name version))
1178 (sha256
1179 (base32
1180 "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq"))))
1181 (build-system go-build-system)
1182 (arguments
1183 `(#:import-path "github.com/oniony/TMSU"
e5fcfb82
SR
1184 #:unpack-path ".."
1185 #:install-source? #f
1186 #:phases
1187 (modify-phases %standard-phases
1188 (add-after 'install 'post-install
1189 (lambda* (#:key outputs #:allow-other-keys)
1190 (let ((out (assoc-ref outputs "out")))
1191 ;; The go build system produces /bin/TMSU -> install as /bin/tmsu
1192 (rename-file (string-append out "/bin/TMSU")
1193 (string-append out "/bin/tmsu"))))))))
a4cc03a8
RW
1194 (inputs
1195 `(("go-github-com-mattn-go-sqlite3" ,go-github-com-mattn-go-sqlite3)
1196 ("go-github-com-hanwen-fuse" ,go-github-com-hanwen-fuse)))
1197 (home-page "https://github.com/oniony/TMSU")
dd4027e8 1198 (synopsis "Tag files and access them through a virtual file system")
a4cc03a8
RW
1199 (description
1200 "TMSU is a tool for tagging your files. It provides a simple
dd4027e8 1201command-line utility for applying tags and a virtual file system to give you a
a4cc03a8
RW
1202tag-based view of your files from any other program. TMSU does not alter your
1203files in any way: they remain unchanged on disk, or on the network, wherever
1204your put them. TMSU maintains its own database and you simply gain an
1205additional view, which you can mount where you like, based upon the tags you
1206set up.")
1207 (license license:gpl3+)))