2013-01-05 23:47:50 +00:00
|
|
|
# GNU Guix --- Functional package management for GNU
|
2016-01-31 22:22:18 +00:00
|
|
|
# Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
|
2012-10-31 22:27:51 +00:00
|
|
|
#
|
2013-01-05 23:47:50 +00:00
|
|
|
# This file is part of GNU Guix.
|
2012-10-31 22:27:51 +00:00
|
|
|
#
|
2013-01-05 23:47:50 +00:00
|
|
|
# GNU Guix is free software; you can redistribute it and/or modify it
|
2012-10-31 22:27:51 +00:00
|
|
|
# under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
# your option) any later version.
|
|
|
|
#
|
2013-01-05 23:47:50 +00:00
|
|
|
# GNU Guix is distributed in the hope that it will be useful, but
|
2012-10-31 22:27:51 +00:00
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2013-01-05 23:47:50 +00:00
|
|
|
# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
2012-10-31 22:27:51 +00:00
|
|
|
|
|
|
|
#
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
# Test the `guix build' command-line utility.
|
2012-10-31 22:27:51 +00:00
|
|
|
#
|
|
|
|
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
guix build --version
|
2012-10-31 22:27:51 +00:00
|
|
|
|
|
|
|
# Should fail.
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
if guix build -e +;
|
2012-11-07 22:41:59 +00:00
|
|
|
then false; else true; fi
|
|
|
|
|
|
|
|
# Should fail because this is a source-less package.
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
if guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S
|
2012-11-07 22:41:59 +00:00
|
|
|
then false; else true; fi
|
2012-10-31 22:27:51 +00:00
|
|
|
|
|
|
|
# Should pass.
|
2014-08-26 22:26:47 +00:00
|
|
|
guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \
|
2012-10-31 22:27:51 +00:00
|
|
|
grep -e '-guile-'
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
guix build hello -d | \
|
2012-10-31 22:27:51 +00:00
|
|
|
grep -e '-hello-[0-9\.]\+\.drv$'
|
|
|
|
|
2015-01-28 19:33:28 +00:00
|
|
|
# Check --sources option with its arguments
|
|
|
|
module_dir="t-guix-build-$$"
|
|
|
|
mkdir "$module_dir"
|
|
|
|
trap "rm -rf $module_dir" EXIT
|
|
|
|
|
|
|
|
cat > "$module_dir/foo.scm"<<EOF
|
|
|
|
(define-module (foo)
|
2016-03-02 22:57:23 +00:00
|
|
|
#:use-module (guix tests)
|
2015-01-28 19:33:28 +00:00
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix download)
|
|
|
|
#:use-module (guix build-system trivial))
|
|
|
|
|
|
|
|
(define-public foo
|
|
|
|
(package
|
|
|
|
(name "foo")
|
|
|
|
(version "42")
|
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri "http://www.example.com/foo.tar.gz")
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"))))
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
(inputs
|
|
|
|
(quasiquote (("bar" ,bar))))
|
|
|
|
(home-page "www.example.com")
|
|
|
|
(synopsis "Dummy package")
|
|
|
|
(description "foo is a dummy package for testing.")
|
|
|
|
(license #f)))
|
|
|
|
|
|
|
|
(define-public bar
|
|
|
|
(package
|
|
|
|
(name "bar")
|
|
|
|
(version "9001")
|
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri "http://www.example.com/bar.tar.gz")
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"))))
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
(inputs
|
|
|
|
(quasiquote
|
|
|
|
(("data" ,(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri "http://www.example.com/bar.dat")
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz")))))))
|
|
|
|
(home-page "www.example.com")
|
|
|
|
(synopsis "Dummy package")
|
|
|
|
(description "bar is a dummy package for testing.")
|
|
|
|
(license #f)))
|
2016-03-02 22:57:23 +00:00
|
|
|
|
|
|
|
(define-public baz
|
|
|
|
(dummy-package "baz" (replacement foo)))
|
|
|
|
|
2016-09-06 21:14:07 +00:00
|
|
|
(define-public superseded
|
|
|
|
(deprecated-package "superseded" bar))
|
|
|
|
|
2015-01-28 19:33:28 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
GUIX_PACKAGE_PATH="$module_dir"
|
|
|
|
export GUIX_PACKAGE_PATH
|
|
|
|
|
|
|
|
# foo.tar.gz
|
|
|
|
guix build -d -S foo
|
|
|
|
guix build -d -S foo | grep -e 'foo\.tar\.gz'
|
|
|
|
|
2016-03-02 22:57:23 +00:00
|
|
|
# 'baz' has a replacement so we should be getting the replacement's source.
|
|
|
|
(unset GUIX_BUILD_OPTIONS;
|
|
|
|
test "`guix build -d -S baz`" = "`guix build -d -S foo`")
|
|
|
|
|
2015-01-28 19:33:28 +00:00
|
|
|
guix build -d --sources=package foo
|
|
|
|
guix build -d --sources=package foo | grep -e 'foo\.tar\.gz'
|
|
|
|
|
|
|
|
# bar.tar.gz and bar.dat
|
|
|
|
guix build -d --sources bar
|
|
|
|
test `guix build -d --sources bar \
|
|
|
|
| grep -e 'bar\.tar\.gz' -e 'bar\.dat' \
|
|
|
|
| wc -l` -eq 2
|
|
|
|
|
|
|
|
# bar.tar.gz and bar.dat
|
|
|
|
guix build -d --sources=all bar
|
|
|
|
test `guix build -d --sources bar \
|
|
|
|
| grep -e 'bar\.tar\.gz' -e 'bar\.dat' \
|
|
|
|
| wc -l` -eq 2
|
|
|
|
|
|
|
|
# Should include foo.tar.gz, bar.tar.gz, and bar.dat
|
|
|
|
guix build -d --sources=transitive foo
|
|
|
|
test `guix build -d --sources=transitive foo \
|
|
|
|
| grep -e 'foo\.tar\.gz' -e 'bar\.tar\.gz' -e 'bar\.dat' \
|
|
|
|
| wc -l` -eq 3
|
|
|
|
|
2013-11-12 00:06:25 +00:00
|
|
|
# Should all return valid log files.
|
2014-08-26 22:26:47 +00:00
|
|
|
drv="`guix build -d -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'`"
|
|
|
|
out="`guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'`"
|
2013-11-12 00:06:25 +00:00
|
|
|
log="`guix build --log-file $drv`"
|
|
|
|
echo "$log" | grep log/.*guile.*drv
|
|
|
|
test -f "$log"
|
2014-08-26 22:26:47 +00:00
|
|
|
test "`guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' --log-file`" \
|
2013-11-12 00:06:25 +00:00
|
|
|
= "$log"
|
|
|
|
test "`guix build --log-file guile-bootstrap`" = "$log"
|
|
|
|
test "`guix build --log-file $out`" = "$log"
|
|
|
|
|
2012-10-31 22:27:51 +00:00
|
|
|
# Should fail because the name/version combination could not be found.
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
if guix build hello-0.0.1 -n; then false; else true; fi
|
2012-10-31 22:27:51 +00:00
|
|
|
|
|
|
|
# Keep a symlink to the result, registered as a root.
|
|
|
|
result="t-result-$$"
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
guix build -r "$result" \
|
2014-08-26 22:26:47 +00:00
|
|
|
-e '(@@ (gnu packages bootstrap) %bootstrap-guile)'
|
2012-10-31 22:27:51 +00:00
|
|
|
test -x "$result/bin/guile"
|
|
|
|
|
|
|
|
# Should fail, because $result already exists.
|
2014-08-26 22:26:47 +00:00
|
|
|
if guix build -r "$result" -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'
|
2012-10-31 22:27:51 +00:00
|
|
|
then false; else true; fi
|
|
|
|
|
|
|
|
rm -f "$result"
|
2013-01-22 21:13:10 +00:00
|
|
|
|
2013-05-24 20:52:52 +00:00
|
|
|
# Cross building.
|
|
|
|
guix build coreutils --target=mips64el-linux-gnu --dry-run --no-substitutes
|
|
|
|
|
2016-01-31 22:22:18 +00:00
|
|
|
# Replacements.
|
|
|
|
drv1=`guix build guix --with-input=guile=guile-next -d`
|
|
|
|
drv2=`guix build guix -d`
|
|
|
|
test "$drv1" != "$drv2"
|
|
|
|
|
|
|
|
drv1=`guix build guile -d`
|
|
|
|
drv2=`guix build guile --with-input=gimp=ruby -d`
|
|
|
|
test "$drv1" = "$drv2"
|
|
|
|
|
|
|
|
if guix build guile --with-input=libunistring=something-really-silly
|
|
|
|
then false; else true; fi
|
|
|
|
|
2016-09-06 21:14:07 +00:00
|
|
|
# Deprecated/superseded packages.
|
|
|
|
test "`guix build superseded -d`" = "`guix build bar -d`"
|
|
|
|
|
2013-01-22 21:13:10 +00:00
|
|
|
# Parsing package names and versions.
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
guix build -n time # PASS
|
2016-02-28 22:11:36 +00:00
|
|
|
guix build -n time@1.7 # PASS, version found
|
2016-03-08 10:38:46 +00:00
|
|
|
guix build -n time-1.7 # PASS, deprecated version syntax
|
2016-02-28 22:11:36 +00:00
|
|
|
if guix build -n time@3.2; # FAIL, version not found
|
2013-01-22 21:13:10 +00:00
|
|
|
then false; else true; fi
|
Replace individual scripts with master 'guix' script.
* scripts/guix.in: New script.
* Makefile.am (bin_SCRIPTS): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
(MODULES): Add 'guix/scripts/build.scm', 'guix/scripts/download.scm',
'guix/scripts/import.scm', 'guix/scripts/package.scm', and
'guix/scripts/gc.scm'.
* configure.ac (AC_CONFIG_FILES): Add 'scripts/guix'. Remove 'guix-build',
'guix-download', 'guix-import', 'guix-package', and 'guix-gc'.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Remove shell script boilerplate. Move to guix-COMMAND.in
to guix/scripts/COMMAND.scm. Rename module from (guix-COMMAND) to
(guix scripts COMMAND). Change "guix-COMMAND" to "guix COMMAND" in
usage help string.
* pre-inst-env.in: Add "@abs_top_builddir@/scripts" to the front of $PATH.
Export $GUIX_UNINSTALLED.
* tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-gc.sh, tests/guix-package.sh: Use "guix COMMAND" instead of
"guix-COMMAND".
* doc/guix.texi: Replace all occurrences of "guix-COMMAND" with
"guix COMMAND".
* po/POTFILES.in: Update.
2013-02-14 09:15:25 +00:00
|
|
|
if guix build -n something-that-will-never-exist; # FAIL
|
2013-01-22 21:13:10 +00:00
|
|
|
then false; else true; fi
|
2013-11-18 22:08:20 +00:00
|
|
|
|
|
|
|
# Invoking a monadic procedure.
|
|
|
|
guix build -e "(begin
|
2014-04-27 21:19:11 +00:00
|
|
|
(use-modules (guix gexp))
|
2013-11-18 22:08:20 +00:00
|
|
|
(lambda ()
|
2014-04-27 21:19:11 +00:00
|
|
|
(gexp->derivation \"test\"
|
|
|
|
(gexp (mkdir (ungexp output))))))" \
|
2013-11-18 22:08:20 +00:00
|
|
|
--dry-run
|
2014-06-14 20:37:24 +00:00
|
|
|
|
|
|
|
# Running a gexp.
|
|
|
|
guix build -e '#~(mkdir #$output)' -d
|
|
|
|
guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv'
|
2014-11-30 16:47:22 +00:00
|
|
|
|
2015-10-26 22:09:28 +00:00
|
|
|
# Building from a package file.
|
|
|
|
cat > "$module_dir/package.scm"<<EOF
|
|
|
|
(use-modules (gnu))
|
|
|
|
(use-package-modules bootstrap)
|
|
|
|
|
|
|
|
%bootstrap-guile
|
|
|
|
EOF
|
|
|
|
guix build --file="$module_dir/package.scm"
|
|
|
|
|
|
|
|
# Building from a monadic procedure file.
|
|
|
|
cat > "$module_dir/proc.scm"<<EOF
|
|
|
|
(use-modules (guix gexp))
|
|
|
|
(lambda ()
|
|
|
|
(gexp->derivation "test"
|
|
|
|
(gexp (mkdir (ungexp output)))))
|
|
|
|
EOF
|
|
|
|
guix build --file="$module_dir/proc.scm" --dry-run
|
|
|
|
|
|
|
|
# Building from a gexp file.
|
|
|
|
cat > "$module_dir/gexp.scm"<<EOF
|
|
|
|
(use-modules (guix gexp))
|
|
|
|
|
|
|
|
(gexp (mkdir (ungexp output)))
|
|
|
|
EOF
|
|
|
|
guix build --file="$module_dir/gexp.scm" -d
|
|
|
|
guix build --file="$module_dir/gexp.scm" -d | grep 'gexp\.drv'
|
|
|
|
|
2014-11-30 16:47:22 +00:00
|
|
|
# Using 'GUIX_BUILD_OPTIONS'.
|
2016-03-02 13:44:18 +00:00
|
|
|
GUIX_BUILD_OPTIONS="--dry-run --no-grafts"
|
2014-11-30 16:47:22 +00:00
|
|
|
export GUIX_BUILD_OPTIONS
|
|
|
|
|
|
|
|
guix build emacs
|
|
|
|
|
|
|
|
GUIX_BUILD_OPTIONS="--something-completely-crazy"
|
|
|
|
if guix build emacs;
|
|
|
|
then false; else true; fi
|