aboutsummaryrefslogtreecommitdiff
path: root/guix-devshell
diff options
context:
space:
mode:
Diffstat (limited to 'guix-devshell')
-rw-r--r--guix-devshell22
1 files changed, 22 insertions, 0 deletions
diff --git a/guix-devshell b/guix-devshell
new file mode 100644
index 0000000..85d8c91
--- /dev/null
+++ b/guix-devshell
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# SPDX-License-Identifier: CC0-1.0
+#
+# Copyright (C) 2023 Wojtek Kosior <koszko@koszko.org>
+
+set -eu
+
+SOURCE_DIR="$(cd "$(dirname "$0")" && pwd -P)"
+GUIX_SCM="$SOURCE_DIR"/guix.scm
+
+EXTRA_PACKAGES="reuse texinfo man-db"
+
+if test 0 = "$#"
+then :
+ printf 'guix shell -Df '\''%s'\'' %s\n' "$GUIX_SCM" "$EXTRA_PACKAGES"
+ guix shell -Df "$GUIX_SCM" $PACKAGES
+else :
+ shift
+ printf 'guix shell -Df '\''%s'\'' %s -- %s\n' "$PACKAGES" "$*"
+ guix shell -Df "$GUIX_SCM" $PACKAGES -- "$@"
+fi