aboutsummaryrefslogtreecommitdiff
path: root/guix-devshell
blob: 85d8c91f5af119c14bce75961b474f5c6c9613df (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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