From dd634cc1cc6d0dbb6756b7ae8e592878a22295e8 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 15 Dec 2024 10:45:19 -0800 Subject: [PATCH] mirror-all: add v1.0.0 --- infiniteadaptability/mirror-all.scm | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 infiniteadaptability/mirror-all.scm diff --git a/infiniteadaptability/mirror-all.scm b/infiniteadaptability/mirror-all.scm new file mode 100644 index 0000000..0eb5d88 --- /dev/null +++ b/infiniteadaptability/mirror-all.scm @@ -0,0 +1,58 @@ +(define-module (infiniteadaptability mirror-all) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages debian) + #:use-module (gnu packages ssh) + #:use-module (gnu packages version-control)) + +(define-public mirror-all + (let ((version "1.0.0") + (commit "1eac03b07eec444a02ad19099b60a01ca8566b8a") + (revision 0)) + (package + (name "mirror-all") + (version (if (zero? revision) version + (string-append version "-" + (number->string revision) "." + (string-take commit 7)))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.infiniteadaptability.org/mirror-all.git") + (commit commit))) + (sha256 + (base32 "0nlcd6i6z7j6151xxs66m3n2zadd0jp64lgp2bq6rccpgv05wsdh")) + (file-name (string-append "mirror-all-" version "-checkout")))) + (build-system gnu-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-program (string-append out "/bin/mirror-all") + `("PATH" ":" prefix + (,(string-append (assoc-ref inputs "git") "/bin") + ,(string-append (assoc-ref inputs "coreutils") "/bin") + ,(string-append (assoc-ref inputs "openssh") "/bin")))) + #t)))) + #:make-flags (list (string-append "PREFIX=" %output)))) + (native-inputs `(("debianutils" ,debianutils))) + (inputs `(("bash" ,bash) + ("coreutils" ,coreutils) + ("openssh" ,openssh) + ("git" ,git))) + (home-page "https://git.infiniteadaptability.org/mirror-all") + (synopsis "mirror all repositories in a directory") + (description "Script for mirroring all repositories in a directory.") + (license unlicense)))) + +mirror-all + -- 2.30.2