~ruther/guix-cross-shells

guix-cross-shells/scripts/cross-shell -rwxr-xr-x 581 bytes
121e12b3 — Rutherther chore: Make this a channel 5 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

set -euxo pipefail

target="$1"
file="$2"
shift 2

built="$(guix build -f "$file" --target="$target")"

full_path_file="$(realpath "$file")"

tmpmanifest="$(mktemp)"
tmpmanifest_contents="
(package->development-manifest
  (load \"$full_path_file\")
  #:target \"$target\")
"

echo "$tmpmanifest_contents" > "$tmpmanifest"

guix shell -m "$tmpmanifest" --expose=/gnu "$@" -- "$built/bin/activate"
#guix shell -e "(begin (use-modules (guix profiles) (guix packages)) (package->development-manifest (load \"$file\")))" --expose=/gnu "$@" -- "$built/bin/activate"