diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-03-19 10:31:16 +0000 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-03-29 15:23:58 +0100 |
| commit | 76e3a33a1df09da4892e7d62f0bd73b63131a119 (patch) | |
| tree | 4b4c71bc7b9a5a75a06e520f79ec4ade2c2cd21a /gnu/packages | |
| parent | 504c8a3592a86bf3d8fc6bc21095ce108ddf8da5 (diff) | |
gnu: restic: Update to 0.17.3.
* gnu/packages/backup.scm (restic): Update to 0.17.3. Use G-Expressions.
[source]: Switch to git-fetch.
[arguments] <go>: Use defult (go-1.24).
<tests?, test-flags, test-subdirs>: Enable tests, skip only 2 tests and
step up from "cmd/restic".
<phases>: Use default 'build, 'check and 'install; remove
'install-shell-comletion, no longer provided.
[native-inputs]: Add go-cloud-google-com-go-storage,
go-github-com-anacrolix-fuse,
go-github-com-azure-azure-sdk-for-go-sdk-azcore,
go-github-com-azure-azure-sdk-for-go-sdk-azidentity,
go-github-com-azure-azure-sdk-for-go-sdk-storage-azblob,
go-github-com-backblaze-blazer, go-github-com-cenkalti-backoff-v4,
go-github-com-cespare-xxhash-v2, go-github-com-elithrar-simple-scrypt,
go-github-com-google-go-cmp, go-github-com-hashicorp-golang-lru-v2,
go-github-com-klauspost-compress, go-github-com-minio-minio-go-v7,
go-github-com-minio-sha256-simd, go-github-com-ncw-swift-v2,
go-github-com-peterbourgon-unixtransport, go-github-com-pkg-errors,
go-github-com-pkg-profile, go-github-com-pkg-sftp,
go-github-com-pkg-xattr, go-github-com-restic-chunker,
go-github-com-spf13-cobra, go-github-com-spf13-pflag,
go-go-uber-org-automaxprocs, go-golang-org-x-crypto,
go-golang-org-x-net, go-golang-org-x-oauth2, go-golang-org-x-sync,
go-golang-org-x-sys, go-golang-org-x-term, go-golang-org-x-text,
go-golang-org-x-time, go-google-golang-org-api,
go-github-com-envoyproxy-go-control-plane, and
go-github-com-envoyproxy-go-control-plane-envoy.
Fixes: guix/guix#4915
Change-Id: I8f470a16e97cf2081a8cb3a798f7e931a96cae1f
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/backup.scm | 163 |
1 files changed, 78 insertions, 85 deletions
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 11dbb8382e1..17b274364c6 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm | |||
| @@ -77,6 +77,8 @@ | |||
| 77 | #:use-module (gnu packages gnupg) | 77 | #:use-module (gnu packages gnupg) |
| 78 | #:use-module (gnu packages golang) | 78 | #:use-module (gnu packages golang) |
| 79 | #:use-module (gnu packages golang-build) | 79 | #:use-module (gnu packages golang-build) |
| 80 | #:use-module (gnu packages golang-check) | ||
| 81 | #:use-module (gnu packages golang-compression) | ||
| 80 | #:use-module (gnu packages golang-crypto) | 82 | #:use-module (gnu packages golang-crypto) |
| 81 | #:use-module (gnu packages golang-web) | 83 | #:use-module (gnu packages golang-web) |
| 82 | #:use-module (gnu packages golang-xyz) | 84 | #:use-module (gnu packages golang-xyz) |
| @@ -891,94 +893,85 @@ is like a time machine for your data.") | |||
| 891 | (define-public restic | 893 | (define-public restic |
| 892 | (package | 894 | (package |
| 893 | (name "restic") | 895 | (name "restic") |
| 894 | (version "0.9.6") | 896 | (version "0.17.3") |
| 895 | ;; TODO Try packaging the bundled / vendored dependencies in the 'vendor/' | 897 | (source |
| 896 | ;; directory. | 898 | (origin |
| 897 | (source (origin | 899 | (method git-fetch) |
| 898 | (method url-fetch) | 900 | (uri (git-reference |
| 899 | (uri (string-append | 901 | (url "https://github.com/restic/restic") |
| 900 | "https://github.com/restic/restic/releases/download/" | 902 | (commit (string-append "v" version)))) |
| 901 | "v" version "/restic-" version ".tar.gz")) | 903 | (file-name (git-file-name name version)) |
| 902 | (file-name (string-append name "-" version ".tar.gz")) | 904 | (sha256 |
| 903 | (sha256 | 905 | (base32 "1wsgq7f0bfi0i5iiwcc3hlf2lhxcnz3zfs8p8bc6l913r9hvyg1x")))) |
| 904 | (base32 | ||
| 905 | "1zmh42aah32ah8w5n6ilz9bci0y2xrf8p7qshy3yf1lzm5gnbj0w")) | ||
| 906 | (patches | ||
| 907 | (search-patches "restic-0.9.6-fix-tests-for-go1.15.patch")))) | ||
| 908 | (build-system go-build-system) | 906 | (build-system go-build-system) |
| 909 | (arguments | 907 | (arguments |
| 910 | `(;; XXX: Tests failed on a newer version of Golang, newer version of | 908 | (list |
| 911 | ;; restic does not provide vendor folder any longer which means - a | 909 | #:go go-1.25 |
| 912 | ;; long way of packaging missing inputs. | 910 | #:install-source? #f |
| 913 | #:go ,go-1.17 | 911 | #:import-path "github.com/restic/restic/cmd/restic" |
| 914 | #:import-path "github.com/restic/restic" | 912 | #:unpack-path "github.com/restic/restic" |
| 915 | ;; We don't need to install the source code for end-user applications. | 913 | #:embed-files #~(list "children" "nodes" "text") |
| 916 | #:install-source? #f | 914 | #:test-flags |
| 917 | #:phases | 915 | ;; Python is required. |
| 918 | (modify-phases %standard-phases | 916 | #~(list "-skip" "TestStdinFromCommand|TestStdinFromCommandNoOutput") |
| 919 | (replace 'build | 917 | #:test-subdirs #~(list "../../...") |
| 920 | (lambda* (#:key inputs #:allow-other-keys) | 918 | #:phases |
| 921 | (with-directory-excursion "src/github.com/restic/restic" | 919 | #~(modify-phases %standard-phases |
| 922 | ;; Disable 'restic self-update'. It makes little sense in Guix. | 920 | (add-after 'install 'install-docs |
| 923 | (substitute* "build.go" (("selfupdate") "")) | 921 | (lambda* (#:key import-path #:allow-other-keys) |
| 924 | (setenv "HOME" (getcwd)) ; for $HOME/.cache/go-build | 922 | (with-directory-excursion (string-append "src/" import-path) |
| 925 | (invoke "go" "run" "build.go")))) | 923 | (let* ((man "/share/man") |
| 926 | 924 | (man-section (string-append man "/man"))) | |
| 927 | (replace 'check | 925 | ;; Install all the man pages to "out". |
| 928 | (lambda* (#:key tests? #:allow-other-keys) | 926 | (for-each |
| 929 | (when tests? | 927 | (lambda (file) |
| 930 | (with-directory-excursion "src/github.com/restic/restic" | 928 | (install-file file |
| 931 | ;; Disable FUSE tests. | 929 | (string-append #$output man-section |
| 932 | (setenv "RESTIC_TEST_FUSE" "0") | 930 | (string-take-right file 1)))) |
| 933 | (invoke "go" "run" "build.go" "--test"))))) | 931 | (find-files "doc/man" "\\.[1-9]")))))) |
| 934 | 932 | (add-before 'check 'pre-check | |
| 935 | (replace 'install | 933 | (lambda _ |
| 936 | (lambda* (#:key outputs #:allow-other-keys) | 934 | (setenv "RESTIC_TEST_FUSE" "0")))))) |
| 937 | (let ((out (assoc-ref outputs "out")) | 935 | (native-inputs |
| 938 | (src "src/github.com/restic/restic")) | 936 | (list go-cloud-google-com-go-storage |
| 939 | (install-file (string-append src "/restic") | 937 | go-github-com-anacrolix-fuse |
| 940 | (string-append out "/bin")) | 938 | go-github-com-azure-azure-sdk-for-go-sdk-azcore |
| 941 | #t))) | 939 | go-github-com-azure-azure-sdk-for-go-sdk-azidentity |
| 942 | 940 | go-github-com-azure-azure-sdk-for-go-sdk-storage-azblob | |
| 943 | (add-after 'install 'install-docs | 941 | go-github-com-backblaze-blazer |
| 944 | (lambda* (#:key outputs #:allow-other-keys) | 942 | go-github-com-cenkalti-backoff-v4 |
| 945 | (let* ((out (assoc-ref outputs "out")) | 943 | go-github-com-cespare-xxhash-v2 |
| 946 | (man "/share/man") | 944 | go-github-com-elithrar-simple-scrypt |
| 947 | (man-section (string-append man "/man")) | 945 | ;; go-github-com-go-ole-go-ole ;windows only |
| 948 | (src "src/github.com/restic/restic/doc/man/")) | 946 | go-github-com-google-go-cmp |
| 949 | ;; Install all the man pages to "out". | 947 | go-github-com-hashicorp-golang-lru-v2 |
| 950 | (for-each | 948 | go-github-com-klauspost-compress |
| 951 | (lambda (file) | 949 | go-github-com-minio-minio-go-v7 |
| 952 | (install-file file | 950 | go-github-com-minio-sha256-simd |
| 953 | (string-append out man-section | 951 | go-github-com-ncw-swift-v2 |
| 954 | (string-take-right file 1)))) | 952 | go-github-com-peterbourgon-unixtransport |
| 955 | (find-files src "\\.[1-9]")) | 953 | go-github-com-pkg-errors |
| 956 | #t))) | 954 | go-github-com-pkg-profile |
| 955 | go-github-com-pkg-sftp | ||
| 956 | go-github-com-pkg-xattr | ||
| 957 | go-github-com-restic-chunker | ||
| 958 | go-github-com-spf13-cobra | ||
| 959 | go-github-com-spf13-pflag | ||
| 960 | go-go-uber-org-automaxprocs | ||
| 961 | go-golang-org-x-crypto | ||
| 962 | go-golang-org-x-net | ||
| 963 | go-golang-org-x-oauth2 | ||
| 964 | go-golang-org-x-sync | ||
| 965 | go-golang-org-x-sys | ||
| 966 | go-golang-org-x-term | ||
| 967 | go-golang-org-x-text | ||
| 968 | go-golang-org-x-time | ||
| 969 | go-google-golang-org-api | ||
| 957 | 970 | ||
| 958 | (add-after 'install-docs 'install-shell-completion | 971 | ;; XXX: These packages have to be bootstrapped to break cycle with |
| 959 | (lambda* (#:key outputs #:allow-other-keys) | 972 | ;; go-google-golang-org-grpc. |
| 960 | (let* ((out (assoc-ref outputs "out")) | 973 | go-github-com-envoyproxy-go-control-plane |
| 961 | (bin (string-append out "/bin")) | 974 | go-github-com-envoyproxy-go-control-plane-envoy)) |
| 962 | (etc (string-append out "/etc")) | ||
| 963 | (share (string-append out "/share"))) | ||
| 964 | (for-each | ||
| 965 | (lambda (shell) | ||
| 966 | (let* ((shell-name (symbol->string shell)) | ||
| 967 | (dir (string-append "etc/completion/" shell-name))) | ||
| 968 | (mkdir-p dir) | ||
| 969 | (invoke (string-append bin "/restic") "generate" | ||
| 970 | (string-append "--" shell-name "-completion") | ||
| 971 | (string-append dir "/" | ||
| 972 | (case shell | ||
| 973 | ((bash) "restic") | ||
| 974 | ((zsh) "_restic")))))) | ||
| 975 | '(bash zsh)) | ||
| 976 | (with-directory-excursion "etc/completion" | ||
| 977 | (install-file "bash/restic" | ||
| 978 | (string-append etc "/bash_completion.d")) | ||
| 979 | (install-file "zsh/_restic" | ||
| 980 | (string-append share "/zsh/site-functions"))) | ||
| 981 | #t)))))) | ||
| 982 | (home-page "https://restic.net/") | 975 | (home-page "https://restic.net/") |
| 983 | (synopsis "Backup program with multiple revisions, encryption and more") | 976 | (synopsis "Backup program with multiple revisions, encryption and more") |
| 984 | (description "Restic is a program that does backups right and was designed | 977 | (description "Restic is a program that does backups right and was designed |
