aboutsummaryrefslogtreecommitdiff
path: root/aux/containers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--aux/containers/guix/manifest.scm (renamed from aux/guix/manifest.scm)0
-rw-r--r--aux/containers/guix/pinned-channels.scm (renamed from aux/guix/pinned-channels.scm)0
-rwxr-xr-xaux/containers/guix/with-container.sh19
3 files changed, 19 insertions, 0 deletions
diff --git a/aux/guix/manifest.scm b/aux/containers/guix/manifest.scm
index b10cc6d..b10cc6d 100644
--- a/aux/guix/manifest.scm
+++ b/aux/containers/guix/manifest.scm
diff --git a/aux/guix/pinned-channels.scm b/aux/containers/guix/pinned-channels.scm
index 504406f..504406f 100644
--- a/aux/guix/pinned-channels.scm
+++ b/aux/containers/guix/pinned-channels.scm
diff --git a/aux/containers/guix/with-container.sh b/aux/containers/guix/with-container.sh
new file mode 100755
index 0000000..fcbb8b5
--- /dev/null
+++ b/aux/containers/guix/with-container.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -eu
+
+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
+ $ENV_CMD --pure -C -- sh -c "$@"
+fi