gnu: fsarchiver: Move to (gnu packages file-systems).
[jackhill/guix/guix.git] / gnu / packages / file-systems.scm
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 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
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.
15 ;;;
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.
20 ;;;
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/>.
23
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 gnu)
31 #:use-module (guix build-system linux-module)
32 #:use-module (guix build-system trivial)
33 #:use-module (guix utils)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages acl)
36 #:use-module (gnu packages attr)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages bison)
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages crypto)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages datastructures)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages docbook)
46 #:use-module (gnu packages flex)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages libffi)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages nfs)
52 #:use-module (gnu packages onc-rpc)
53 #:use-module (gnu packages photo)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages readline)
57 #:use-module (gnu packages sqlite)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages valgrind)
60 #:use-module (gnu packages xml))
61
62 (define-public fsarchiver
63 (package
64 (name "fsarchiver")
65 (version "0.8.5")
66 (source
67 (origin
68 (method git-fetch)
69 (uri
70 (git-reference
71 (url "https://github.com/fdupoux/fsarchiver.git")
72 (commit version)))
73 (file-name (git-file-name name version))
74 (sha256
75 (base32 "1rvwq5v3rl14bqxjm1ibfapyicf0sa44nw7451v10kx39lp56ylp"))))
76 (build-system gnu-build-system)
77 (native-inputs
78 `(("autoconf" ,autoconf)
79 ("automake" ,automake)
80 ("pkg-config" ,pkg-config)))
81 (inputs
82 `(("bzip2" ,bzip2)
83 ("e2fsprogs" ,e2fsprogs)
84 ("libgcrypt" ,libgcrypt)
85 ("lz4" ,lz4)
86 ("lzo" ,lzo)
87 ("util-linux" ,util-linux "lib")
88 ("xz" ,xz)
89 ("zlib" ,zlib)
90 ("zstd:lib" ,zstd "lib")))
91 (synopsis "Filesystem Backup/Deployment Tool")
92 (description "FSArchiver allows you to save the contents of a file-system to
93 a compressed archive file. The file-system can be restored on a partition which
94 has a different size and it can be restored on a different file-system.")
95 (home-page "http://www.fsarchiver.org/")
96 (license license:gpl2)))
97
98 (define-public gphotofs
99 (package
100 (name "gphotofs")
101 (version "0.5.0")
102 (source
103 (origin
104 (method url-fetch)
105 (uri
106 (string-append "mirror://sourceforge/gphoto/gphotofs/" version
107 "/gphotofs-0.5.tar.gz"))
108 (sha256
109 (base32
110 "04slwhr6ap9xcc27wphk22ad8yn79ngyy5z10lxams3k5liahvc2"))))
111 (build-system gnu-build-system)
112 (native-inputs
113 `(("pkg-config" ,pkg-config)))
114 (inputs
115 `(("fuse" ,fuse)
116 ("glib" ,glib)
117 ("libgphoto2" ,libgphoto2)))
118 (synopsis "Virtual filesystem for libgphoto2 using FUSE")
119 (description "GPhotoFS is a FUSE filesystem module to mount your camera as
120 a filesystem on Linux. This allow using your camera with any tool able to read
121 from a mounted filesystem.")
122 (home-page "http://www.gphoto.org/proj/gphotofs/")
123 (license license:gpl2+)))
124
125 (define-public bcachefs-tools
126 (let ((commit "ab2f1ec24f5307b0cf1e3c4ad19bf350d9f54d9f")
127 (revision "0"))
128 (package
129 (name "bcachefs-tools")
130 (version (git-version "0.1" revision commit))
131 (source
132 (origin
133 (method git-fetch)
134 (uri (git-reference
135 (url "https://evilpiepirate.org/git/bcachefs-tools.git")
136 (commit commit)))
137 (file-name (git-file-name name version))
138 (sha256
139 (base32 "10pafvaxg1lvwnqjv3a4rsi96bghbpcsgh3vhqilndi334k3b0hd"))))
140 (build-system gnu-build-system)
141 (arguments
142 `(#:make-flags
143 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
144 "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
145 "CC=gcc"
146 "PYTEST=pytest")
147 #:phases
148 (modify-phases %standard-phases
149 (delete 'configure)) ; no configure script
150 #:tests? #f)) ; XXX 6 valgrind tests fail
151 (native-inputs
152 `(("pkg-config" ,pkg-config)
153
154 ;; For tests.
155 ("python-pytest" ,python-pytest)
156 ("valgrind" ,valgrind)))
157 (inputs
158 `(("keyutils" ,keyutils)
159 ("libaio" ,libaio)
160 ("libscrypt" ,libscrypt)
161 ("libsodium" ,libsodium)
162 ("liburcu" ,liburcu)
163 ("util-linux" ,util-linux "lib") ; lib{blkid,uuid}
164 ("lz4" ,lz4)
165 ("zlib" ,zlib)
166 ("zstd:lib" ,zstd "lib")))
167 (home-page "https://bcachefs.org/")
168 (synopsis "Tools to create and manage bcachefs file systems")
169 (description
170 "The bcachefs-tools are command-line utilities for creating, checking,
171 and otherwise managing bcachefs file systems.
172
173 Bcachefs is a @acronym{CoW, copy-on-write} file system supporting native
174 encryption, compression, snapshots, and (meta)data checksums. It can use
175 multiple block devices for replication and/or performance, similar to RAID.
176
177 In addition, bcachefs provides all the functionality of bcache, a block-layer
178 caching system, and lets you assign different roles to each device based on its
179 performance and other characteristics.")
180 (license license:gpl2+))))
181
182 (define-public httpfs2
183 (package
184 (name "httpfs2")
185 (version "0.1.5")
186 (source
187 (origin
188 (method url-fetch)
189 (uri (string-append "mirror://sourceforge/httpfs/httpfs2/"
190 "httpfs2-" version ".tar.gz"))
191 (sha256
192 (base32
193 "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"))))
194 (build-system gnu-build-system)
195 (native-inputs
196 `(("asciidoc" ,asciidoc)
197 ("docbook-xml" ,docbook-xml)
198 ("libxml2" ,libxml2)
199 ("libxslt" ,libxslt)
200 ("pkg-config" ,pkg-config)))
201 (inputs
202 `(("fuse" ,fuse)
203 ("gnutls" ,gnutls)))
204 (arguments
205 `(#:phases
206 (modify-phases %standard-phases
207 (delete 'configure) ; no configure script
208 (replace 'install
209 ;; There's no ‘install’ target. Install all variants manually.
210 (lambda* (#:key outputs #:allow-other-keys)
211 (let* ((out (assoc-ref outputs "out"))
212 (bin (string-append out "/bin"))
213 (man1 (string-append out "/share/man/man1")))
214 (mkdir-p bin)
215 (mkdir-p man1)
216 (for-each
217 (lambda (variant)
218 (let ((man1-page (string-append variant ".1")))
219 (install-file variant bin)
220 (install-file man1-page man1)))
221 (list "httpfs2"
222 "httpfs2-mt"
223 "httpfs2-ssl"
224 "httpfs2-ssl-mt")))
225 #t)))
226 #:make-flags (list "CC=gcc")
227 #:parallel-build? #f ; can result in missing man pages
228 #:tests? #f)) ; no tests
229 (home-page "https://sourceforge.net/projects/httpfs/")
230 (synopsis "Mount remote files over HTTP")
231 (description "httpfs2 is a @code{fuse} file system for mounting any
232 @dfn{HyperText} (HTTP or HTTPS) URL. It uses HTTP/1.1 byte ranges to request
233 arbitrary bytes from the web server, without needing to download the entire
234 file. This is particularly useful with large archives such as ZIP files and
235 ISO images when you only need to inspect their contents or extract specific
236 files. Since the HTTP protocol itself has no notion of directories, only a
237 single file can be mounted.")
238 (license license:gpl2+)))
239
240 (define-public jfsutils
241 (package
242 (name "jfsutils")
243 (version "1.1.15")
244 (source
245 (origin
246 (method url-fetch)
247 (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-"
248 version ".tar.gz"))
249 (sha256
250 (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4"))
251 (patches (search-patches "jfsutils-add-sysmacros.patch"
252 "jfsutils-include-systypes.patch"))))
253 (build-system gnu-build-system)
254 (inputs
255 `(("util-linux" ,util-linux "lib")))
256 (home-page "http://jfs.sourceforge.net/home.html")
257 (synopsis "Utilities for managing JFS file systems")
258 (description
259 "The JFSutils are a collection of utilities for managing the @acronym{JFS,
260 Journaled File System}, a 64-bit journaling file system created by IBM and later
261 ported to the kernel Linux. The following commands are available:
262 @enumerate
263 @item @command{fsck.jfs}: check and repair a JFS file system or replay its
264 transaction log.
265 @item @command{logdump}: dump the JFS journal log.
266 @item @command{logredo}: replay the JFS journal log.
267 @item @command{mkfs.jfs}: create a new JFS file system.
268 @item @command{xchklog}: save a JFS fsck log to a file.
269 @item @command{xchkdmp}: dump the contents of such a log file.
270 @item @command{xpeek}: a JFS file system editor with a shell-like interface.
271 @end enumerate\n")
272 (license license:gpl3+))) ; no explicit version given
273
274 (define-public jfsutils/static
275 (static-package
276 (package
277 (inherit jfsutils)
278 (name "jfsutils-static")
279 (inputs
280 `(("util-linux:static" ,util-linux "static")
281 ,@(package-inputs jfsutils))))))
282
283 (define-public jfs_fsck/static
284 (package
285 (name "jfs_fsck-static")
286 (version (package-version jfsutils))
287 (source #f)
288 (build-system trivial-build-system)
289 (arguments
290 `(#:modules ((guix build utils))
291 #:builder
292 (begin
293 (use-modules (guix build utils)
294 (ice-9 ftw)
295 (srfi srfi-26))
296 (let* ((jfsutils (assoc-ref %build-inputs "jfsutils"))
297 (fsck "jfs_fsck")
298 (out (assoc-ref %outputs "out"))
299 (sbin (string-append out "/sbin")))
300 (mkdir-p sbin)
301 (with-directory-excursion sbin
302 (install-file (string-append jfsutils "/sbin/" fsck)
303 ".")
304 (remove-store-references fsck)
305 (chmod fsck #o555))
306 #t))))
307 (inputs
308 `(("jfsutils" ,jfsutils/static)))
309 (home-page (package-home-page jfsutils))
310 (synopsis "Statically-linked jfs_fsck command from jfsutils")
311 (description "This package provides statically-linked jfs_fsck command taken
312 from the jfsutils package. It is meant to be used in initrds.")
313 (license (package-license jfsutils))))
314
315 (define-public disorderfs
316 (package
317 (name "disorderfs")
318 (version "0.5.9")
319 (source
320 (origin
321 (method git-fetch)
322 (uri (git-reference
323 (url "https://salsa.debian.org/reproducible-builds/disorderfs.git")
324 (commit version)))
325 (file-name (git-file-name name version))
326 (sha256
327 (base32
328 "0irgr9hkm9icx1s44m9382484yx8hddzjxbsz621ip9c946pif0g"))))
329 (build-system gnu-build-system)
330 (native-inputs
331 `(("pkg-config" ,pkg-config)))
332 (inputs
333 `(("fuse" ,fuse)
334 ("attr" ,attr)))
335 (arguments
336 `(#:phases (modify-phases %standard-phases
337 (delete 'configure)) ; no configure script
338 #:make-flags (let ((out (assoc-ref %outputs "out")))
339 (list (string-append "PREFIX=" out)))
340 #:test-target "test"
341 ;; FIXME: Tests require 'run-parts' which is not in Guix yet.
342 #:tests? #f))
343 (home-page "https://salsa.debian.org/reproducible-builds/disorderfs")
344 (synopsis "FUSE file system that introduces non-determinism")
345 (description
346 "An overlay FUSE file system that introduces non-determinism
347 into file system metadata. For example, it can randomize the order
348 in which directory entries are read. This is useful for detecting
349 non-determinism in the build process.")
350 (license license:gpl3+)))
351
352 (define-public glusterfs
353 (package
354 (name "glusterfs")
355 (version "7.0")
356 (source
357 (origin
358 (method url-fetch)
359 (uri (string-append "https://download.gluster.org/pub/gluster/glusterfs/"
360 (version-major version) "/"
361 (version-major+minor version) "/"
362 "glusterfs-" version ".tar.gz"))
363 (sha256
364 (base32
365 "0yzhx710ypj0j3m5dcgmmgvkp7p0rmmp2p7ld0axrm4vpwc2b1wa"))))
366 (build-system gnu-build-system)
367 (arguments
368 `(#:configure-flags
369 (let ((out (assoc-ref %outputs "out"))
370 (p2 (assoc-ref %build-inputs "python-2")))
371 (list (string-append "PYTHON=" p2 "/bin/python")
372 (string-append "--with-initdir=" out "/etc/init.d")
373 (string-append "--with-mountutildir=" out "/sbin")
374 "--enable-cmocka" ; unit tests
375 ;; "--enable-debug" ; debug build options
376 ;; "--enable-asan" ; Address Sanitizer
377 ;; "--enable-tsan" ; ThreadSanitizer
378 ))
379 #:phases
380 (modify-phases %standard-phases
381 (add-before 'configure 'autogen
382 (lambda _ (invoke "./autogen.sh"))))))
383 (native-inputs
384 `(("pkg-config" ,pkg-config)
385 ("libtirpc", libtirpc)
386 ("rpcsvc-proto", rpcsvc-proto)
387 ("python-2" ,python-2) ; must be version 2
388 ("flex" ,flex)
389 ("bison" ,bison)
390 ("libtool" ,libtool)
391 ("autoconf" ,autoconf)
392 ("automake" ,automake)
393 ("cmocka" ,cmocka)))
394 (inputs
395 `(("acl" ,acl)
396 ("fuse", fuse)
397 ("openssl" ,openssl)
398 ("liburcu" ,liburcu)
399 ("libuuid" ,util-linux "lib")
400 ("libxml2" ,libxml2)
401 ("readline" ,readline)
402 ("zlib" ,zlib)
403 ("libaio", libaio)
404 ("rdma-core", rdma-core)))
405 (home-page "https://www.gluster.org")
406 (synopsis "Distributed file system")
407 (description "GlusterFS is a distributed scalable network file system
408 suitable for data-intensive tasks such as cloud storage and media streaming.
409 It allows rapid provisioning of additional storage based on your storage
410 consumption needs. It incorporates automatic failover as a primary feature.
411 All of this is accomplished without a centralized metadata server.")
412 ;; The user may choose either LGPLv3+ or GPLv2 only.
413 (license (list license:lgpl3+ license:gpl2+))))
414
415 (define-public curlftpfs
416 (package
417 (name "curlftpfs")
418 (version "0.9.2")
419 (source
420 (origin
421 (method url-fetch)
422 (uri (string-append "mirror://sourceforge/curlftpfs/curlftpfs/" version
423 "/curlftpfs-" version ".tar.gz"))
424 (sha256
425 (base32
426 "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"))))
427 (build-system gnu-build-system)
428 (arguments
429 `(#:phases
430 (modify-phases %standard-phases
431 (add-after 'unpack 'fix-test
432 (lambda _
433 ;; One of the 512-Byte block counts is definitely wrong.
434 ;; See <https://sourceforge.net/p/curlftpfs/bugs/73/>.
435 (substitute* "tests/ftpfs-ls_unittest.c"
436 (("4426192") "12814800"))
437 #t)))))
438 (inputs
439 `(("curl" ,curl)
440 ("glib" ,glib)
441 ("fuse" ,fuse)))
442 (native-inputs
443 `(("pkg-config" ,pkg-config)))
444 (home-page "http://curlftpfs.sourceforge.net/")
445 (synopsis "Mount remote file systems over FTP")
446 (description
447 "This is a file system client based on the FTP File Transfer Protocol.")
448 (license license:gpl2+)))
449
450 (define-public libnfs
451 (package
452 (name "libnfs")
453 (version "3.0.0")
454 (source (origin
455 (method git-fetch)
456 (uri (git-reference
457 (url "https://github.com/sahlberg/libnfs.git")
458 (commit (string-append "libnfs-" version))))
459 (file-name (git-file-name name version))
460 (sha256
461 (base32
462 "115p55y2cbs92z5lmcnjx1v29lwinpgq4sha9v1kq1vd8674h404"))))
463 (build-system gnu-build-system)
464 (home-page "https://github.com/sahlberg/libnfs")
465 (native-inputs
466 `(("autoconf" ,autoconf)
467 ("automake" ,automake)
468 ("libtool" ,libtool)
469 ("pkg-config" ,pkg-config)))
470 (synopsis "Client library for accessing NFS shares")
471 (description "LIBNFS is a client library for accessing NFS shares over a
472 network. LIBNFS offers three different APIs, for different use :
473
474 @enumerate
475 @item RAW, a fully asynchronous low level RPC library for NFS protocols. This
476 API provides very flexible and precise control of the RPC issued.
477 @item NFS ASYNC, a fully asynchronous library for high level vfs functions
478 @item NFS SYNC, a synchronous library for high level vfs functions.
479 @end enumerate\n")
480 (license (list license:lgpl2.1+ ; library
481 license:gpl3+ ; tests
482 license:bsd-3 ; copied nsf4 files
483 ))))
484
485 (define-public apfs-fuse
486 (let ((commit "c7036a3030d128bcecefc1eabc47c039ccfdcec9")
487 (revision "0"))
488 (package
489 (name "apfs-fuse")
490 (version (git-version "0.0.0" revision commit))
491 (source (origin
492 (method git-fetch)
493 (uri (git-reference
494 (url "https://github.com/sgan81/apfs-fuse")
495 (recursive? #t) ; for lzfse
496 (commit commit)))
497 (sha256
498 (base32
499 "1akd4cx1f9cyq6sfk9ybv4chhjwjlnqi8ic4z5ajnd5x0g76nz3r"))
500 (file-name (git-file-name name version))))
501 (build-system cmake-build-system)
502 (arguments
503 `(#:tests? #f ; No test suite
504 #:phases
505 (modify-phases %standard-phases
506 ;; No 'install' target in CMakeLists.txt
507 (replace 'install
508 (lambda* (#:key outputs #:allow-other-keys)
509 (let* ((out (assoc-ref outputs "out"))
510 (bin (string-append out "/bin"))
511 (lib (string-append out "/lib"))
512 (doc (string-append out "/share/doc/"
513 (string-append ,name "-" ,version))))
514 (install-file "apfs-dump" bin)
515 (install-file "apfs-dump-quick" bin)
516 (install-file "apfs-fuse" bin)
517 (install-file "libapfs.a" lib)
518 #t))))))
519 (inputs
520 `(("bzip2" ,bzip2)
521 ("fuse" ,fuse)
522 ("zlib" ,zlib)))
523 (synopsis "Read-only FUSE driver for the APFS file system")
524 (description "APFS-FUSE is a read-only FUSE driver for the @dfn{Apple File
525 System} (APFS). It is currently in an experimental state — it may not be able
526 to read all files, and it does not support all the compression methods in
527 APFS.")
528 (home-page "https://github.com/sgan81/apfs-fuse")
529 (license license:gpl2+))))
530
531 (define-public zfs
532 (package
533 (name "zfs")
534 (version "0.8.2")
535 (outputs '("out" "module" "src"))
536 (source
537 (origin
538 (method url-fetch)
539 (uri (string-append "https://github.com/zfsonlinux/zfs/releases"
540 "/download/zfs-" version
541 "/zfs-" version ".tar.gz"))
542 (sha256
543 (base32
544 "1f7aig15q3z832pr2n48j3clafic2yk1vvqlh28vpklfghjqwq27"))))
545 (build-system linux-module-build-system)
546 (arguments
547 `(;; The ZFS kernel module should not be downloaded since the license
548 ;; terms don't allow for distributing it, only building it locally.
549 #:substitutable? #f
550 ;; Tests cannot run in an unprivileged build environment.
551 #:tests? #f
552 #:phases
553 (modify-phases %standard-phases
554 (add-after 'configure 'really-configure
555 (lambda* (#:key outputs inputs #:allow-other-keys)
556 (let ((out (assoc-ref outputs "out")))
557 (substitute* "configure"
558 (("-/bin/sh") (string-append "-" (which "sh")))
559 ((" /bin/sh") (string-append " " (which "sh"))))
560 (invoke "./configure"
561 "--with-config=all"
562 (string-append "--prefix=" out)
563 (string-append "--with-dracutdir=" out "/lib/dracut")
564 (string-append "--with-udevdir=" out "/lib/udev")
565 (string-append "--with-mounthelperdir=" out "/sbin")
566 (string-append "--with-linux="
567 (assoc-ref inputs "linux-module-builder")
568 "/lib/modules/build")))))
569 (add-after 'unpack 'patch-source
570 (lambda* (#:key inputs outputs #:allow-other-keys)
571 (let ((out (assoc-ref outputs "out"))
572 (src (assoc-ref outputs "src"))
573 (util-linux (assoc-ref inputs "util-linux"))
574 (nfs-utils (assoc-ref inputs "nfs-utils")))
575 (substitute* "module/zfs/zfs_ctldir.c"
576 (("/usr/bin/env\", \"umount")
577 (string-append util-linux "/bin/umount\", \"-n"))
578 (("/usr/bin/env\", \"mount")
579 (string-append util-linux "/bin/mount\", \"-n")))
580 (substitute* "lib/libzfs/libzfs_mount.c"
581 (("/bin/mount") (string-append util-linux "/bin/mount"))
582 (("/bin/umount") (string-append util-linux "/bin/umount")))
583 (substitute* "lib/libshare/nfs.c"
584 (("/usr/sbin/exportfs")
585 (string-append nfs-utils "/sbin/exportfs")))
586 (substitute* "config/zfs-build.m4"
587 (("\\$sysconfdir/init.d") (string-append out "/etc/init.d")))
588 (substitute* '("etc/zfs/Makefile.am"
589 "cmd/zed/Makefile.am")
590 (("\\$\\(sysconfdir)") (string-append out "/etc")))
591 (substitute* "cmd/vdev_id/vdev_id"
592 (("PATH=/bin:/sbin:/usr/bin:/usr/sbin")
593 (string-append "PATH="
594 (dirname (which "chmod")) ":"
595 (dirname (which "grep")) ":"
596 (dirname (which "sed")) ":"
597 (dirname (which "gawk")))))
598 (substitute* "contrib/pyzfs/Makefile.in"
599 ((".*install-lib.*") ""))
600 (substitute* '("Makefile.am" "Makefile.in")
601 (("\\$\\(prefix)/src") (string-append src "/src"))))
602 #t))
603 (replace 'build
604 (lambda _ (invoke "make")))
605 (replace 'install
606 (lambda* (#:key outputs inputs native-inputs #:allow-other-keys)
607 (let* ((out (assoc-ref outputs "out"))
608 (moddir (assoc-ref outputs "module"))
609 (kmod (assoc-ref (or native-inputs inputs) "kmod")))
610 (invoke "make" "install"
611 (string-append "DEFAULT_INITCONF_DIR=" out "/etc/default")
612 (string-append "DEPMOD=" kmod "/bin/depmod")
613 (string-append "INSTALL_PATH=" out)
614 (string-append "INSTALL_MOD_PATH=" moddir)
615 "INSTALL_MOD_STRIP=1")
616 (install-file "contrib/bash_completion.d/zfs"
617 (string-append out "/share/bash-completion/completions"))
618 (symlink "../share/pkgconfig/" (string-append out "/lib/pkgconfig"))
619 #t))))))
620 (native-inputs
621 `(("attr" ,attr)
622 ("kmod" ,kmod)
623 ("pkg-config" ,pkg-config)))
624 (inputs
625 `(("eudev" ,eudev)
626 ("libaio" ,libaio)
627 ("libtirpc" ,libtirpc)
628 ("nfs-utils" ,nfs-utils)
629 ("openssl" ,openssl)
630 ("python" ,python)
631 ("python-cffi" ,python-cffi)
632 ("util-linux" ,util-linux "lib")
633 ("zlib" ,zlib)))
634 (home-page "https://zfsonlinux.org/")
635 (synopsis "Native ZFS on Linux")
636 (description
637 "ZFS on Linux is an advanced file system and volume manager which was
638 originally developed for Solaris and is now maintained by the OpenZFS
639 community.")
640 (license license:cddl1.0)))