diff options
author | Franz Geffke <franz@pantherx.org> | 2023-11-06 20:08:14 +0000 |
---|---|---|
committer | Franz Geffke <franz@pantherx.org> | 2023-11-06 20:08:14 +0000 |
commit | 47b4c9c854915df93893dbaa993accfacf9027fe (patch) | |
tree | 4f9b1742d63fcfbc94cc6b8d84f76c4d00c3a0b7 /px/packages/backup.scm | |
parent | 0b426d7b7ed8e176bf464ef9e0683f74a6c9d20f (diff) |
rewrite: apply guix-reference formatting; cleanup some module imports
Diffstat (limited to 'px/packages/backup.scm')
-rw-r--r-- | px/packages/backup.scm | 91 |
1 files changed, 48 insertions, 43 deletions
diff --git a/px/packages/backup.scm b/px/packages/backup.scm index 6d60bd1..bd429d3 100644 --- a/px/packages/backup.scm +++ b/px/packages/backup.scm @@ -1,7 +1,8 @@ ;;; Backup Packages Module for PantherX (define-module (px packages backup) - #:use-module ((guix licenses) #:prefix license:) + #:use-module ((guix licenses) + #:prefix license:) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix gexp) @@ -19,20 +20,19 @@ #:use-module (px packages accounts) #:use-module (px packages library) #:use-module (px packages tarsnap)) - - (define-public px-org-remote-backup-service + +(define-public px-org-remote-backup-service (package (name "px-org-remote-backup-service") (version "v0.0.6") - (source (origin - (method url-fetch) - (uri (string-append - "https://source.pantherx.org/px-org-remote-backup-service_" - version - ".tgz")) - (sha256 - (base32 - "062p4p6jf8y8cw2pdxj50sw00sw9lfh404168ljhqqgzwhdxpp6p")))) + (source + (origin + (method url-fetch) + (uri (string-append + "https://source.pantherx.org/px-org-remote-backup-service_" + version ".tgz")) + (sha256 + (base32 "062p4p6jf8y8cw2pdxj50sw00sw9lfh404168ljhqqgzwhdxpp6p")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -40,50 +40,55 @@ (use-modules (guix build utils) (srfi srfi-26)) (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (ls (assoc-ref %build-inputs "source")) - (gzip (assoc-ref %build-inputs "gzip")) - (bin-dir (string-append %output "/bin")) - (backup-bin-file (string-append bin-dir "/" ,"px-org-remote-backup-create.sh")) - (restore-bin-file (string-append bin-dir "/" ,"px-org-remote-backup-restore.sh")) - (bash-bin (string-append (assoc-ref %build-inputs "bash") - "/bin"))) + (tar (assoc-ref %build-inputs "tar")) + (ls (assoc-ref %build-inputs "source")) + (gzip (assoc-ref %build-inputs "gzip")) + (bin-dir (string-append %output "/bin")) + (backup-bin-file (string-append bin-dir "/" + ,"px-org-remote-backup-create.sh")) + (restore-bin-file (string-append bin-dir "/" + ,"px-org-remote-backup-restore.sh")) + (bash-bin (string-append (assoc-ref %build-inputs + "bash") "/bin"))) (mkdir-p bin-dir) - (setenv "PATH" (string-append gzip "/bin")) - (invoke (string-append tar "/bin/tar") "xvf" source "-C" bin-dir) - (patch-shebang backup-bin-file (list bash-bin)) - (patch-shebang restore-bin-file (list bash-bin)) - (chmod backup-bin-file #o555) - (chmod restore-bin-file #o555))))) + (setenv "PATH" + (string-append gzip "/bin")) + (invoke (string-append tar "/bin/tar") "xvf" source "-C" + bin-dir) + (patch-shebang backup-bin-file + (list bash-bin)) + (patch-shebang restore-bin-file + (list bash-bin)) + (chmod backup-bin-file #o555) + (chmod restore-bin-file #o555))))) (native-inputs `(("tar" ,tar) - ("gzip" ,gzip) - )) - (inputs `(("bash" ,bash))) - (propagated-inputs `(("tarsnap" ,tarsnap))) - (home-page "https://www.pantherx.org/") + ("gzip" ,gzip))) + (inputs `(("bash" ,bash))) + (propagated-inputs `(("tarsnap" ,tarsnap))) + (home-page "https://www.pantherx.org/") (synopsis "PantherX Backup/Restore shell scripts") (description "This package provides two scripts for create backup and restore based on given user as parameter.") (license license:expat))) - (define-public px-backup (package (name "px-backup") (version "0.2.5") (source - (origin - (method url-fetch) - (uri (string-append "https://source.pantherx.org/" name "_v" version ".tgz")) - (sha256 (base32 "0pzmq8kiw740nj1iswba5k7j0rqicrai27mbl2xiqf1k5r3406ra")))) + (origin + (method url-fetch) + (uri (string-append "https://source.pantherx.org/" name "_v" version + ".tgz")) + (sha256 + (base32 "0pzmq8kiw740nj1iswba5k7j0rqicrai27mbl2xiqf1k5r3406ra")))) (build-system python-build-system) - (propagated-inputs - `(("restic", restic) - ("python-psutil", python-psutil) - ("python-appdirs", python-appdirs) - ("python-pyyaml", python-pyyaml) - ("px-secret-library-python", px-secret-library-python) - ("px-accounts-library-python", px-accounts-library-python))) + (propagated-inputs `(("restic" ,restic) + ("python-psutil" ,python-psutil) + ("python-appdirs" ,python-appdirs) + ("python-pyyaml" ,python-pyyaml) + ("px-secret-library-python" ,px-secret-library-python) + ("px-accounts-library-python" ,px-accounts-library-python))) (home-page "https://www.pantherx.org/") (synopsis "Client library and CLI tool for easy backup") (description "Python library that integrates with Accounts and Secrets |