[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: sysadmin: Update guix-cran-scripts.
From: |
Ricardo Wurmus |
Subject: |
01/02: sysadmin: Update guix-cran-scripts. |
Date: |
Wed, 17 Jan 2024 07:40:25 -0500 (EST) |
rekado pushed a commit to branch master
in repository maintenance.
commit 9a07ccc9288b6793d6e0c8fca1dd37d2ca8c3076
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed Jan 17 13:32:47 2024 +0100
sysadmin: Update guix-cran-scripts.
* hydra/modules/sysadmin/packages.scm (guix-cran-scripts): Update to
0.3.094396c.
[arguments]: Remove inline update.sh; it is now included in the repository.
* hydra/modules/sysadmin/services.scm (guix-cran-job): Append
mandatory "cran" argument.
---
hydra/modules/sysadmin/packages.scm | 58 +++++--------------------------------
hydra/modules/sysadmin/services.scm | 6 ++--
2 files changed, 12 insertions(+), 52 deletions(-)
diff --git a/hydra/modules/sysadmin/packages.scm
b/hydra/modules/sysadmin/packages.scm
index 2d446a4..5f5b3a2 100644
--- a/hydra/modules/sysadmin/packages.scm
+++ b/hydra/modules/sysadmin/packages.scm
@@ -114,8 +114,8 @@ is any and all quality assurance tasks.")
(license license:agpl3+))))
(define-public guix-cran-scripts
- (let ((commit "13bb8217a7b1b781752c886082d4d66ed97b4378")
- (revision "2"))
+ (let ((commit "094396ca8be88b198ef2f90265a762887df9fe21")
+ (revision "3"))
(package
(name "guix-cran-scripts")
(version (git-version "0" revision commit))
@@ -127,7 +127,7 @@ is any and all quality assurance tasks.")
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "0vm54dyp8nm4plc0ny0kw0hd7csj5llz76wyjgcbikv3z22acmz7"))))
+ (base32 "1dc9jndjczhsy9x0dzy9zgshs15smh4fnx5ah879aw4w9bwwz9bf"))))
(build-system trivial-build-system)
(arguments
(list
@@ -135,64 +135,22 @@ is any and all quality assurance tasks.")
#:builder
#~(begin
(use-modules (guix build utils))
- (let* ((output (assoc-ref %outputs "out"))
- (bin (string-append output "/bin"))
- (source (assoc-ref %build-inputs "source"))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (bin (string-append #$output "/bin"))
(import-scm (string-append bin "/import.scm"))
(update-sh (string-append bin "/update.sh"))
(shell #$(file-append bash-minimal "/bin/bash")))
(mkdir-p bin)
(copy-file (string-append source "/import.scm") import-scm)
+ (copy-file (string-append source "/update.sh") update-sh)
;; No interpreter, cannot use wrap-script.
;; Don't wrap, because it has to be called with `guix repl`
#;
(wrap-program import-scm
#:sh shell
`("PATH" ":" prefix (,#$(file-append git "/bin"))))
- (call-with-output-file update-sh
- (lambda (port)
- (display (string-append "#!" shell "\n"
- "# Guix CRAN update script.
-
-# Bail out on errors, so we don't have to && everything.
-set -e
-
-# Git should not ask anything.
-export GIT_TERMINAL_PROMPT=0
-# `guix import cran` needs a proper locale, otherwise it'll fail.
-export LANG=C.utf8
-
-# Init, if we run the first time.
-test ! -d output && \
- git clone git@github.com:guix-science/guix-cran.git output
-
-pushd output
-# Update, in case any manual changes happened.
-git pull
-popd
-
-# Make sure we only use default Guix channels, no matter how the system
-# is configured.
-cat <<EOF > channels.scm
-%default-channels
-EOF
-guix pull -C channels.scm -p profile
-
-export GUIX_PROFILE=`pwd`/profile
-source $GUIX_PROFILE/etc/profile
-
-mkdir -p cache/{description,contents}
-rm -f cache/description/*
-guix repl " import-scm " output guix-cran
-
-pushd output
-git push origin --all
-popd
-
-rm -f profile profile-*-link channels.scm
-
-exit 0
-") port)))
+ (substitute* update-sh
+ (("import.scm") import-scm))
(chmod update-sh #o555)
(wrap-program update-sh
#:sh shell
diff --git a/hydra/modules/sysadmin/services.scm
b/hydra/modules/sysadmin/services.scm
index c916cb1..4cddd7b 100644
--- a/hydra/modules/sysadmin/services.scm
+++ b/hydra/modules/sysadmin/services.scm
@@ -1,7 +1,7 @@
;;; GNU Guix system administration tools.
;;;
;;; Copyright © 2016-2023 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017, 2018, 2020, 2022 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2018, 2020, 2022, 2024 Ricardo Wurmus
<rekado@elephly.net>
;;; Copyright © 2022 Leo Famulari <leo@famulari.name>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Andreas Enge <andreas@enge.fr>
@@ -1340,7 +1340,9 @@ to a selected directory.")
;;;
(define guix-cran-job
- #~(job "0 4 * * *" #$(file-append guix-cran-scripts "/bin/update.sh")
+ #~(job "0 4 * * *" (string-append
+ #$(file-append guix-cran-scripts "/bin/update.sh")
+ " cran")
#:user "guix-cran"))
(define %guix-cran-accounts