aboutsummaryrefslogtreecommitdiff
path: root/aux/containers/guix/with-container.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-09-20 18:20:24 -0300
committerEuAndreh <eu@euandre.org>2021-09-20 18:20:44 -0300
commitca68b3579dbe05ab9e11d78586c4e4efaa35932a (patch)
treef5b4bceba4f2d4560c3a52c8e28330f84abae7ad /aux/containers/guix/with-container.sh
parentAdapt installation to new i18n. (diff)
downloadgit-permalink-ca68b3579dbe05ab9e11d78586c4e4efaa35932a.tar.gz
git-permalink-ca68b3579dbe05ab9e11d78586c4e4efaa35932a.tar.xz
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
Diffstat (limited to 'aux/containers/guix/with-container.sh')
-rwxr-xr-xaux/containers/guix/with-container.sh12
1 files changed, 11 insertions, 1 deletions
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