| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 |
|
| 20 | |
| 21 | |
| 22 | |
| 23 |
|
| 24 | module_dir="t-guix-graph-$$"
|
| 25 | mkdir "$module_dir"
|
| 26 |
|
| 27 | tmpfile1="$module_dir/t-guix-graph1-$$"
|
| 28 | tmpfile2="$module_dir/t-guix-graph2-$$"
|
| 29 | trap 'rm -r "$module_dir"' EXIT
|
| 30 |
|
| 31 |
|
| 32 | cat > "$module_dir/foo.scm"<<EOF
|
| 33 | (define-module (foo)
|
| 34 | #:use-module (guix packages)
|
| 35 | #:use-module (gnu packages base))
|
| 36 |
|
| 37 | (define-public dummy
|
| 38 | (package (inherit hello)
|
| 39 | (name "dummy")
|
| 40 | (version "42")
|
| 41 | (synopsis "dummy package")
|
| 42 | (description "dummy package. Only used for testing purposes.")))
|
| 43 | EOF
|
| 44 |
|
| 45 |
|
| 46 | guix graph --version
|
| 47 |
|
| 48 | for package in guile-bootstrap coreutils python
|
| 49 | do
|
| 50 | for graph in package bag-emerged bag bag-with-origins
|
| 51 | do
|
| 52 | guix graph -t "$graph" "$package" | grep "$package"
|
| 53 | done
|
| 54 | done
|
| 55 |
|
| 56 | guix build guile-bootstrap
|
| 57 | guix graph -t references guile-bootstrap | grep guile-bootstrap
|
| 58 |
|
| 59 | guix graph -e '(@ (gnu packages bootstrap) %bootstrap-guile)' \
|
| 60 | | grep guile-bootstrap
|
| 61 |
|
| 62 | guix graph -e + && false
|
| 63 |
|
| 64 | |
| 65 |
|
| 66 | guix graph -t references guile-bootstrap > "$tmpfile1"
|
| 67 | guix graph -t references `guix build guile-bootstrap` > "$tmpfile2"
|
| 68 | cmp "$tmpfile1" "$tmpfile2"
|
| 69 |
|
| 70 | |
| 71 | |
| 72 | guix graph -t derivation coreutils > "$tmpfile1"
|
| 73 | guix graph -t derivation `guix build -d coreutils` > "$tmpfile2"
|
| 74 | cmp "$tmpfile1" "$tmpfile2"
|
| 75 |
|
| 76 | |
| 77 | guix graph git | grep 'label = "openssl'
|
| 78 | guix graph git --with-input=openssl=libressl | grep 'label = "libressl'
|
| 79 | guix graph git --with-input=openssl=libressl | grep 'label = "openssl' && false
|
| 80 |
|
| 81 | |
| 82 | guix graph -L $module_dir dummy | grep 'label = "dummy'
|
| 83 |
|
| 84 | |
| 85 | guix graph --path emacs vim && false
|
| 86 |
|
| 87 | path="\
|
| 88 | emacs
|
| 89 | cairo
|
| 90 | gobject-introspection
|
| 91 | libffi"
|
| 92 | test "`guix graph --path emacs libffi | cut -d '@' -f1`" = "$path"
|
| 93 |
|
| 94 | |
| 95 | |
| 96 | test "`guix graph --path -t derivation emacs libffi | wc -l`" -ge 2
|