From ca68b3579dbe05ab9e11d78586c4e4efaa35932a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 20 Sep 2021 18:20:24 -0300 Subject: aux/containers/guix/: Use local clone over remote channel In a way, fixes #task-ab7d98bb-7557-1891-b102-a48942d762be. Since libgit2 won't support the "Dumb HTTP" protocol [0], and Guix won't support tarballs as remotes [1], I'll stick to using the -L option, as suggested by Ludovic. This is a much less self-contained solution, but this allows me to finally turn of the Git daemon running on the server in favour of the "Dumb HTTP" repository served as static files on a bare repository. [0]: https://github.com/libgit2/libgit2/issues/4652#issuecomment-390903142 [1]: https://issues.guix.gnu.org/50606 --- aux/containers/guix/pinned-channels.scm | 11 ----------- aux/containers/guix/with-container.sh | 12 +++++++++++- 2 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 aux/containers/guix/pinned-channels.scm (limited to 'aux/containers/guix') diff --git a/aux/containers/guix/pinned-channels.scm b/aux/containers/guix/pinned-channels.scm deleted file mode 100644 index f5c039a..0000000 --- a/aux/containers/guix/pinned-channels.scm +++ /dev/null @@ -1,11 +0,0 @@ -(cons* - (channel - (name 'xyz-euandreh) - (url "git://euandreh.xyz/package-repository.git") - (branch "main") - (introduction - (make-channel-introduction - "d749e053e6db365069cb9b2ef47a78b06f9e7361" - (openpgp-fingerprint - "5BDA E9B8 B2F6 C6BC BB0D 6CE5 81F9 0EC3 CD35 6060")))) - %default-channels) diff --git a/aux/containers/guix/with-container.sh b/aux/containers/guix/with-container.sh index 045e757..fcbb8b5 100755 --- a/aux/containers/guix/with-container.sh +++ b/aux/containers/guix/with-container.sh @@ -1,7 +1,17 @@ #!/bin/sh set -eu -ENV_CMD='guix time-machine --fallback -C aux/containers/guix/pinned-channels.scm -- environment --fallback -m aux/containers/guix/manifest.scm' +CHANNEL_REMOTE='https://euandreh.xyz/package-repository.git' +CHANNEL_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/euandreh-guix-channel" + +if [ ! -d "$CHANNEL_DIR" ]; then + git clone "$CHANNEL_REMOTE" "$CHANNEL_DIR" +fi + +git -C "$CHANNEL_DIR" pull + +ENV_CMD="guix environment -L $CHANNEL_DIR/src/ -m aux/containers/guix/manifest.scm" + if [ -z "${1:-}" ]; then $ENV_CMD else -- cgit v1.2.3