1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
3 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
4 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
7 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
8 ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
9 ;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages backup)
27 #:use-module (guix packages)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix download)
30 #:use-module (guix utils)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system python)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages acl)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages base)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages databases)
39 #:use-module (gnu packages dejagnu)
40 #:use-module (gnu packages ftp)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gnupg)
43 #:use-module (gnu packages gperf)
44 #:use-module (gnu packages guile)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages mcrypt)
47 #:use-module (gnu packages nettle)
48 #:use-module (gnu packages pcre)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-crypto)
53 #:use-module (gnu packages python-web)
54 #:use-module (gnu packages rsync)
55 #:use-module (gnu packages ssh)
56 #:use-module (gnu packages tls)
57 #:use-module (gnu packages xml))
59 (define-public duplicity
66 (uri (string-append "https://code.launchpad.net/duplicity/"
67 (version-major+minor version)
68 "-series/" version "/+download/duplicity-"
72 "1rhgrz2lm9vbfdp2raykrih1c6n2lw5jd572z4dsz488m52avjqi"))))
73 (build-system python-build-system)
75 `(("util-linux" ,util-linux) ;setsid command, for the tests
76 ("par2cmdline" ,par2cmdline)
77 ("python-pexpect" ,python2-pexpect)
78 ("mock" ,python2-mock)))
80 `(("lockfile" ,python2-lockfile)
81 ("urllib3" ,python2-urllib3)))
83 `(("librsync" ,librsync)
85 ("gnupg" ,gnupg) ;gpg executable needed
86 ("util-linux" ,util-linux) ;for setsid
89 `(#:python ,python-2 ;setup assumes Python 2
92 (modify-phases %standard-phases
93 (add-before 'build 'patch-source
94 (lambda* (#:key inputs #:allow-other-keys)
95 ;; embed gpg store name
96 (substitute* "duplicity/gpginterface.py"
97 (("self.call = 'gpg'")
98 (string-append "self.call = '" (assoc-ref inputs "gnupg") "/bin/gpg'")))
99 (substitute* '("testing/functional/__init__.py"
100 "testing/overrides/bin/lftp")
101 (("/bin/sh") (which "sh")))
103 (add-before 'check 'check-setup
104 (lambda* (#:key inputs #:allow-other-keys)
105 (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME
106 (setenv "TZDIR" ;some timestamp checks need TZDIR
107 (string-append (assoc-ref inputs "tzdata")
110 (home-page "http://duplicity.nongnu.org/index.html")
111 (synopsis "Encrypted backup using rsync algorithm")
113 "Duplicity backs up directories by producing encrypted tar-format volumes
114 and uploading them to a remote or local file server. Because duplicity uses
115 librsync, the incremental archives are space efficient and only record the
116 parts of files that have changed since the last backup. Because duplicity
117 uses GnuPG to encrypt and/or sign these archives, they will be safe from
118 spying and/or modification by the server.")
119 (license license:gpl2+)))
121 (define-public par2cmdline
127 (uri (string-append "https://github.com/Parchive/par2cmdline/archive/v"
129 (file-name (string-append name "-" version ".tar.gz"))
132 "0iwwskiag3262mvhinvnbk6n0qh6sh56m86y4d0m285v0jl0y9pa"))))
134 `(("automake" ,automake)
135 ("autoconf" ,autoconf)))
136 (build-system gnu-build-system)
139 (modify-phases %standard-phases
140 (add-after 'unpack 'autoreconf
141 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
142 (synopsis "File verification and repair tools")
143 (description "Par2cmdline uses Reed-Solomon error-correcting codes to
144 generate and verify PAR2 recovery files. These files can be distributed
145 alongside the source files or stored together with back-ups to protect against
146 transmission errors or @dfn{bit rot}, the degradation of storage media over
148 Unlike a simple checksum, PAR2 doesn't merely detect errors: as long as the
149 damage isn't too extensive (and smaller than the size of the recovery file), it
150 can even repair them.")
151 (home-page "https://github.com/Parchive/par2cmdline")
152 (license license:gpl3+)))
161 (uri "https://fossies.org/linux/privat/old/hdup-2.0.14.tar.bz2")
164 "02bnczg01cyhajmm4rhbnc0ja0dd9ikv9fwv28asxh1rlx9yr0b7"))))
165 (build-system gnu-build-system)
166 (native-inputs `(("pkg-config" ,pkg-config)))
176 `(,(string-append "--sbindir=" (assoc-ref %outputs "out") "/bin"))
178 (home-page "http://archive.miek.nl/projects/hdup/index.html")
179 (synopsis "Simple incremental backup tool")
181 "Hdup2 is a backup utility, its aim is to make backup really simple. The
182 backup scheduling is done by means of a cron job. It supports an
183 include/exclude mechanism, remote backups, encrypted backups and split
184 backups (called chunks) to allow easy burning to CD/DVD.")
185 (license license:gpl2)))
187 (define-public libarchive
190 (replacement libarchive-3.3.2)
195 (uri (string-append "http://libarchive.org/downloads/libarchive-"
199 "1rr40hxlm9vy5z2zb5w7pyfkgd1a4s061qapm83s19accb8mpji9"))))
200 (build-system gnu-build-system)
201 ;; TODO: Add -L/path/to/nettle in libarchive.pc.
214 (substitute* "Makefile"
215 (("/bin/pwd") (which "pwd"))))
219 ;; XXX: The test_owner_parse, test_read_disk, and
220 ;; test_write_disk_lookup tests expect user 'root' to exist, but
221 ;; the chroot's /etc/passwd doesn't have it. Turn off those tests.
223 ;; The tests allow one to disable tests matching a globbing pattern.
224 (and (zero? (system* "make"
225 "libarchive_test" "bsdcpio_test" "bsdtar_test"))
226 ;; XXX: This glob disables too much.
227 (zero? (system* "./libarchive_test" "^test_*_disk*"))
228 (zero? (system* "./bsdcpio_test" "^test_owner_parse"))
229 (zero? (system* "./bsdtar_test"))))
231 ;; libarchive/test/test_write_format_gnutar_filenames.c needs to be
232 ;; compiled with C99 or C11 or a gnu variant.
233 #:configure-flags '("CFLAGS=-O2 -g -std=c99")))
234 (home-page "http://libarchive.org/")
235 (synopsis "Multi-format archive and compression library")
237 "Libarchive provides a flexible interface for reading and writing
238 archives in various formats such as tar and cpio. Libarchive also supports
239 reading and writing archives compressed using various compression filters such
240 as gzip and bzip2. The library is inherently stream-oriented; readers
241 serially iterate through the archive, writers serially add things to the
242 archive. In particular, note that there is currently no built-in support for
243 random access nor for in-place modification.")
244 (license license:bsd-2)))
246 (define libarchive-3.3.2
253 (uri (string-append "http://libarchive.org/downloads/libarchive-"
255 (patches (search-patches "libarchive-CVE-2017-14166.patch"))
258 "1km0mzfl6in7l5vz9kl09a88ajx562rw93ng9h2jqavrailvsbgd"))))))
267 (uri (string-append "http://archive.miek.nl/projects/rdup/rdup-"
271 "0aklwd9v7ix0m4ayl762sil685f42cwljzx3jz5skrnjaq32npmj"))
272 (modules '((guix build utils)))
274 ;; Some test scripts are missing shebangs, which cause "could not
275 ;; execute" errors. Add shebangs.
278 (with-atomic-file-replacement
279 (string-append "testsuite/rdup/" testscript)
282 (format out "#!/bin/sh\n" )
283 (dump-port in out)))))
284 '("rdup.hardlink.helper"
285 "rdup.hardlink-strip.helper"
286 "rdup.hardlink-strip2.helper"
287 "rdup.pipeline.helper")))))
288 (build-system gnu-build-system)
290 `(("pkg-config" ,pkg-config)
291 ("dejagnu" ,dejagnu)))
295 ("libarchive" ,libarchive)
298 `(#:parallel-build? #f ;race conditions
300 (modify-phases %standard-phases
301 (add-before 'build 'remove-Werror
302 ;; rdup uses a deprecated function from libarchive
304 (substitute* "GNUmakefile"
305 (("^(CFLAGS=.*)-Werror" _ front) front))
307 (add-before 'check 'pre-check
309 (setenv "HOME" (getcwd))
310 (substitute* "testsuite/rdup/rdup.rdup-up-t-with-file.exp"
311 (("/bin/cat") (which "cat")))
313 (home-page "http://archive.miek.nl/projects/rdup/index.html")
314 (synopsis "Provide a list of files to backup")
316 "Rdup is a utility inspired by rsync and the plan9 way of doing backups.
317 Rdup itself does not backup anything, it only print a list of absolute
318 file names to standard output. Auxiliary scripts are needed that act on this
319 list and implement the backup strategy.")
320 (license license:gpl3+)))
329 (uri (string-append "http://vicerveza.homeunix.net/~viric/soft/btar/"
330 "btar-" version ".tar.gz"))
333 "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd"))))
334 (build-system gnu-build-system)
336 `(("librsync" ,librsync)))
338 `(#:make-flags `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
340 #:tests? #f ;test input not distributed
342 ;; no configure phase
343 (modify-phases %standard-phases
344 (delete 'configure))))
345 (home-page "http://viric.name/cgi-bin/btar/doc/trunk/doc/home.wiki")
346 (synopsis "Tar-compatible archiver")
348 "Btar is a tar-compatible archiver which allows arbitrary compression and
349 ciphering, redundancy, differential backup, indexed extraction, multicore
350 compression, input and output serialisation, and tolerance to partial archive
352 (license license:gpl3+)))
354 (define-public rdiff-backup
356 (name "rdiff-backup")
361 (uri (string-append "mirror://savannah/rdiff-backup/rdiff-backup-"
365 "1nwmmh816f96h0ff1jxk95ad38ilbhbdl5dgibx1d4cl81dsi48d"))))
366 (build-system python-build-system)
368 `(("python" ,python-2)
369 ("librsync" ,librsync)))
373 (home-page "http://www.nongnu.org/rdiff-backup/")
374 (synopsis "Local/remote mirroring+incremental backup")
376 "Rdiff-backup backs up one directory to another, possibly over a network.
377 The target directory ends up a copy of the source directory, but extra reverse
378 diffs are stored in a special subdirectory of that target directory, so you
379 can still recover files lost some time ago. The idea is to combine the best
380 features of a mirror and an incremental backup. Rdiff-backup also preserves
381 subdirectories, hard links, dev files, permissions, uid/gid ownership,
382 modification times, extended attributes, acls, and resource forks. Also,
383 rdiff-backup can operate in a bandwidth efficient manner over a pipe, like
384 rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive up
385 to a remote location, and only the differences will be transmitted. Finally,
386 rdiff-backup is easy to use and settings have sensible defaults.")
387 (license license:gpl2+)))
389 (define-public rsnapshot
397 "https://github.com/rsnapshot/rsnapshot/releases/download/"
398 version "/rsnapshot-" version ".tar.gz"))
401 "05jfy99a0xs6lvsjfp3wz21z0myqhmwl2grn3jr9clijbg282ah4"))))
402 (build-system gnu-build-system)
405 (modify-phases %standard-phases
408 (substitute* '("t/cmd-post_pre-exec/conf/pre-true-post-true.conf"
409 "t/backup_exec/conf/backup_exec_fail.conf"
410 "t/backup_exec/conf/backup_exec.conf")
411 (("/bin/true") (which "true"))
412 (("/bin/false") (which "false")))
413 (zero? (system* "make" "test")))))))
417 (home-page "http://rsnapshot.org")
418 (synopsis "Deduplicating snapshot backup utility based on rsync")
419 (description "rsnapshot is a filesystem snapshot utility based on rsync.
420 rsnapshot makes it easy to make periodic snapshots of local machines, and
421 remote machines over SSH. To reduce the disk space required for each backup,
422 rsnapshot uses hard links to deduplicate identical files.")
423 (license license:gpl2+)))
425 (define-public libchop
431 (uri (string-append "mirror://savannah/libchop/libchop-"
435 "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g"))
436 (patches (search-patches "diffutils-gets-undeclared.patch"))))
437 (build-system gnu-build-system)
439 `(("guile" ,guile-2.0)
441 ("pkg-config" ,pkg-config)))
443 `(("guile" ,guile-2.0)
444 ("util-linux" ,util-linux)
449 ("libgcrypt" ,libgcrypt)
453 (home-page "http://nongnu.org/libchop/")
454 (synopsis "Tools & library for data backup and distributed storage")
456 "Libchop is a set of utilities and library for data backup and
457 distributed storage. Its main application is @command{chop-backup}, an
458 encrypted backup program that supports data integrity checks, versioning,
459 distribution among several sites, selective sharing of stored data, adaptive
460 compression, and more. The library itself implements storage techniques such
461 as content-addressable storage, content hash keys, Merkle trees, similarity
462 detection, and lossless compression.")
463 (license license:gpl3+)))
471 (uri (pypi-uri "borgbackup" version))
474 "00jmbfysdpsb2vcckamvsxw5n8xqh4j67diam2p0lmqzsn92syq9"))
475 (modules '((guix build utils)))
478 delete-file (find-files "borg" "^(c|h|p).*\\.c$")))))
479 (build-system python-build-system)
481 `(#:modules ((srfi srfi-26) ; for cut
483 (guix build python-build-system))
485 (modify-phases %standard-phases
486 (add-after 'unpack 'set-env
487 (lambda* (#:key inputs #:allow-other-keys)
488 (let ((openssl (assoc-ref inputs "openssl"))
489 (lz4 (assoc-ref inputs "lz4")))
490 (setenv "BORG_OPENSSL_PREFIX" openssl)
491 (setenv "BORG_LZ4_PREFIX" lz4)
492 (setenv "PYTHON_EGG_CACHE" "/tmp")
493 ;; The test 'test_return_codes[python]' fails when
494 ;; HOME=/homeless-shelter.
495 (setenv "HOME" "/tmp")
497 ;; The tests need to be run after Borg is installed.
499 (add-after 'install 'check
500 (lambda* (#:key inputs outputs #:allow-other-keys)
501 ;; Make the installed package available for the test suite.
502 (add-installed-pythonpath inputs outputs)
503 ;; The tests should be run in an empty directory.
505 (with-directory-excursion "tests"
507 (system* "py.test" "-v" "--pyargs" "borg.testsuite" "-k"
509 ;; These tests need to write to '/var'.
510 "not test_get_cache_dir "
511 "and not test_get_config_dir "
512 "and not test_get_keys_dir "
513 "and not test_get_security_dir "
514 ;; These tests assume there is a root user in
516 "and not test_access_acl "
517 "and not test_default_acl "
518 "and not test_non_ascii_acl "
519 ;; This test needs the unpackaged pytest-benchmark.
521 ;; These tests assume the kernel supports FUSE.
523 "and not test_fuse_allow_damaged_files"))))))
524 (add-after 'install 'install-doc
525 (lambda* (#:key inputs outputs #:allow-other-keys)
526 (let* ((out (assoc-ref outputs "out"))
527 (man (string-append out "/share/man/man1"))
528 (misc (string-append out "/share/borg/misc")))
529 (for-each (cut install-file <> misc)
530 '("docs/misc/create_chunker-params.txt"
531 "docs/misc/internals-picture.txt"
532 "docs/misc/prune-example.txt"))
533 (add-installed-pythonpath inputs outputs)
535 (zero? (system* "python3" "setup.py" "build_man"))
537 (copy-recursively "docs/man" man)
540 `(("python-cython" ,python-cython)
541 ("python-setuptools-scm" ,python-setuptools-scm)
542 ;; Borg 1.0.8's test suite uses 'tmpdir_factory', which was introduced in
544 ("python-pytest" ,python-pytest-3.0)
545 ;; For generating the documentation.
546 ("python-sphinx" ,python-sphinx)
547 ("python-guzzle-sphinx-theme" ,python-guzzle-sphinx-theme)))
552 ("python-llfuse" ,python-llfuse)
553 ("python-msgpack" ,python-msgpack)))
554 (synopsis "Deduplicated, encrypted, authenticated and compressed backups")
555 (description "Borg is a deduplicating backup program. Optionally, it
556 supports compression and authenticated encryption. The main goal of Borg is to
557 provide an efficient and secure way to backup data. The data deduplication
558 technique used makes Borg suitable for daily backups since only changes are
559 stored. The authenticated encryption technique makes it suitable for backups
560 to not fully trusted targets. Borg is a fork of Attic.")
561 (home-page "https://borgbackup.github.io/borgbackup/")
562 (license license:bsd-3)))
571 "https://pypi.python.org/packages/source/A/Attic/Attic-"
575 "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36"))))
576 (build-system python-build-system)
578 `(;; The tests assume they are run as root:
579 ;; https://github.com/jborg/attic/issues/7
582 (modify-phases %standard-phases
584 'build 'set-openssl-prefix
585 (lambda* (#:key inputs #:allow-other-keys)
586 (setenv "ATTIC_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
591 ("python-msgpack" ,python-msgpack)
593 ;; Attic is probably incompatible with llfuse > 0.41.
594 ;; These links are to discussions of llfuse compatibility from
595 ;; the borg project. Borg is a recent fork of attic, and attic
596 ;; has not been updated since the fork, so it's likely that
597 ;; llfuse compatibility requirements are still the same.
598 ;; https://github.com/borgbackup/borg/issues/642
599 ;; https://github.com/borgbackup/borg/issues/643
600 ("python-llfuse" ,python-llfuse-0.41)))
601 (synopsis "Deduplicating backup program")
602 (description "Attic is a deduplicating backup program. The main goal of
603 Attic is to provide an efficient and secure way to backup data. The data
604 deduplication technique used makes Attic suitable for daily backups since only
605 changes are stored.")
606 (home-page "https://attic-backup.org/")
607 (license license:bsd-3)
608 (properties `((superseded . ,borg)))))
610 (define-public wimlib
616 (uri (string-append "https://wimlib.net/downloads/"
617 name "-" version ".tar.gz"))
620 "0ks6hq7vwq13ljkzxp3a490bf8dnracgl2azf57rg49ad2fzab45"))))
621 (build-system gnu-build-system)
623 `(("pkg-config" ,pkg-config)))
628 ("openssl" ,openssl)))
630 `(#:configure-flags (list "--enable-test-support")))
631 (home-page "https://wimlib.net/")
632 (synopsis "WIM file manipulation library and utilities")
633 (description "wimlib is a C library and set of command-line utilities for
634 creating, modifying, extracting, and mounting archives in the Windows Imaging
635 Format (@dfn{WIM files}). It can capture and apply WIMs directly from and to
636 NTFS volumes using @code{ntfs-3g}, preserving NTFS-specific attributes.")
637 ;; wimlib is dual-licenced under version 3 or later of either the GPL or
638 ;; LGPL, except those files explicitly marked as being released into the
639 ;; public domain (CC0) in their headers.
640 (license (list license:gpl3+
652 "http://code.liw.fi/debian/pool/main/o/obnam/obnam_"
653 version ".orig.tar.xz"))
656 "0qlipsq50hca71zc0dp1mg9zs12qm0sbblw7qfzl0hj6mk2rv1by"))))
657 (build-system python-build-system)
661 (modify-phases %standard-phases
664 (substitute* "obnamlib/vfs_local_tests.py"
665 ;; Check for the nobody user instead of root
666 (("self.fs.get_username\\(0\\), 'root'")
667 "self.fs.get_username(65534), 'nobody'")
668 ;; Disable tests checking for root group
669 (("self.fs.get_groupname\\(0\\)") "'root'"))
670 (substitute* "obnamlib/vfs_local.py"
671 ;; Don't cover get_groupname function
672 (("def get_groupname\\(self, gid\\):")
673 "def get_groupname(self, gid): # pragma: no cover"))
674 ;; Can't run network tests
675 (zero? (system* "./check" "--unit-tests")))))))
677 `(("python2-cliapp" ,python2-cliapp)
678 ("python2-larch" ,python2-larch)
679 ("python2-paramiko" ,python2-paramiko)
680 ("python2-pyaml" ,python2-pyaml)
681 ("python2-tracing" ,python2-tracing)
682 ("python2-ttystatus" ,python2-ttystatus)))
685 ("python2-coverage" ,python2-coverage)
686 ("python2-coverage-test-runner" ,python2-coverage-test-runner)
687 ("python2-pep8" ,python2-pep8)
688 ("python2-pylint" ,python2-pylint)))
689 (home-page "https://obnam.org/")
690 (synopsis "Easy and secure backup program")
691 (description "Obnam is an easy, secure backup program. Features
692 include snapshot backups, data de-duplication and encrypted backups
693 using GnuPG. Backups can be stored on local hard disks, or online via
694 the SSH SFTP protocol. The backup server, if used, does not require
695 any special software, on top of SSH.")
696 (license license:gpl3+)))
698 (define-public dirvish
702 (build-system gnu-build-system)
706 "http://dirvish.org/dirvish-" version ".tgz"))
709 "1kbxa1irszp2zw8hd5qzqnrrzb4vxfivs1vn64yxnj0lak1jjzvb"))))
711 `(#:modules ((ice-9 match) (ice-9 rdelim)
712 ,@%gnu-build-system-modules)
714 ;; This mostly mirrors the steps taken in the install.sh that ships
715 ;; with dirvish, but simplified because we aren't prompting interactively
716 (modify-phases %standard-phases
721 (lambda* (#:key inputs outputs #:allow-other-keys)
722 ;; These are mostly the same steps the install.sh that comes with
724 (let* (;; Files we'll be copying
726 '("dirvish" "dirvish-runall"
727 "dirvish-expire" "dirvish-locate"))
729 '(("dirvish" "8") ("dirvish-runall" "8")
730 ("dirvish-expire" "8") ("dirvish-locate" "8")
731 ("dirvish.conf" "5")))
734 (assoc-ref outputs "out"))
736 ;; Just a default... not so useful on guixsd though
737 ;; You probably want to a service with file(s) to point to.
738 (confdir "/etc/dirvish")
740 (perl (string-append (assoc-ref %build-inputs "perl")
742 (loadconfig.pl (call-with-input-file "loadconfig.pl"
746 (define (write-pl filename)
748 (string-append "#!" perl "\n\n"
749 "$CONFDIR = \"" confdir "\";\n\n"))
750 (define input-file-location
751 (string-append filename ".pl"))
752 (define target-file-location
753 (string-append output-dir "/bin/" filename ".pl"))
754 (define text-to-write
755 (string-append pl-header
756 (call-with-input-file input-file-location
759 (with-output-to-file target-file-location
761 (display text-to-write)))
762 (chmod target-file-location #o755)
763 (wrap-program target-file-location
764 `("PERL5LIB" ":" prefix
765 ,(map (lambda (l) (string-append (assoc-ref %build-inputs l)
766 "/lib/perl5/site_perl"))
767 '("perl-libtime-period"
768 "perl-libtime-parsedate")))))
774 (string-append file-base "." man-num))
776 (string-append output-dir
777 "/share/man/man" man-num
779 (copy-file filename output-path)))))
782 (mkdir-p (string-append output-dir "/bin/"))
783 (mkdir-p (string-append output-dir "/share/man/man8/"))
784 (mkdir-p (string-append output-dir "/share/man/man5/"))
786 ;; Write out executables
787 (for-each write-pl executables)
788 ;; Write out man pages
789 (for-each write-man man-pages)
794 ("perl-libtime-period" ,perl-libtime-period)
795 ("perl-libtime-parsedate" ,perl-libtime-parsedate)))
796 (home-page "http://dirvish.org/")
797 (synopsis "Fast, disk based, rotating network backup system")
799 "With dirvish you can maintain a set of complete images of your
800 filesystems with unattended creation and expiration. A dirvish backup vault
801 is like a time machine for your data. ")
802 (license (license:fsf-free "file://COPYING"
803 "Open Software License 2.0"))))