Commit Graph

1386 Commits

Author SHA1 Message Date
Ludovic Courtès
fad97a01df
gremlin: Fix typo in docstring.
* guix/build/gremlin.scm (file-runpath): Fix typo.
2020-12-01 21:30:28 +01:00
Christopher Baines
ff01206345
Merge remote-tracking branch 'origin/master' into core-updates 2020-11-29 17:34:18 +00:00
Ludovic Courtès
4cebe82fa6
build-system/texlive: Phases no longer return a Boolean.
* guix/build/texlive-build-system.scm (configure): Remove trailing #t.
(build): Use 'for-each' instead of 'every'.
(install): Remove trailing #t.
2020-11-25 00:02:30 +01:00
Ludovic Courtès
49eadd270c
build-system/minify: Phases no longer return a Boolean.
* guix/build/minify-build-system.scm (minify): Use 'for-each' instead of
'every'.  Call 'close-pipe' and call error when it returns non-zero.
(build): Use 'for-each' instead of 'every'.
(install): Remove trailing #t.
2020-11-25 00:02:30 +01:00
Ludovic Courtès
04baa011e9
build-system/gnu: Ignore the result of phase procedures.
* guix/build/gnu-build-system.scm (set-SOURCE-DATE-EPOCH)
(set-paths, install-locale, unpack, bootstrap)
(patch-usr-bin-file, patch-source-shebangs)
(patch-generated-file-shebangs, check)
(patch-shebangs, strip, validate-runpath)
(validate-documentation-location, reset-gzip-timestamps)
(compress-documentation, delete-info-dir-file)
(patch-dot-desktop-files, install-license-files): Remove trailing #t.
(gnu-build): Use 'for-each' instead of 'every', ignore the result if
each phase procedure, and remove warning about non #t phase results.
2020-11-25 00:02:29 +01:00
Marius Bakke
a485a98ca8
Merge branch 'master' into staging 2020-11-22 23:36:09 +01:00
Efraim Flashner
1ca0c34867
build-system/cargo: Set gettext environment variable when available.
* guix/build/cargo-build-system.scm (configure): When gettext is
available in the build environment set the GETTEXT_SYSTEM variable.
* gnu/packages/crates-io.scm (rust-gettext-rs-0.5, rust-gettext-rs-0.4,
rust-gettext-sys-0.19)[arguments]: Remove phase to help find system gettext.
2020-11-22 19:45:43 +02:00
Efraim Flashner
73dbcc4b5f
build-system/cargo: Set libclang environment variable when available.
* guix/build/cargo-build-system.scm (configure): When clang is available
in the build environment set the LIBCLANG_PATH variable.
* gnu/packages/crates-graphics.scm (rust-aom-sys-0.1,
uust-dav1d-sys-0.3),
* gnu/packages/crates-io.scm (rust-bindgen-0.55, rust-bindgen-0.54,
rust-bindgen-0.53, rust-bindgen-0.52, rust-cexpr-0.4, rust-cexpr-0.3,
rust-cexpr-0.2, rust-clang-sys-1, rust-clang-sys-0.29,
rust-clang-sys-0.26, rust-clang-sys-0.22, rust-clang-sys-0.11,
rust-libpijul-0.12, rust-nettle-7, rust-nettle-sys-2,
rust-sequoia-openpgp-0.9)[arguments]: Remove phases which set an
environment variable to find clang.
[inputs]: Rename instances of libclang with clang.
2020-11-22 19:44:53 +02:00
Efraim Flashner
3dbf3a7f51
build-system/cargo: Set openssl environment variable when available.
* guix/build/cargo-build-system.scm (configure): When openssl is
available set the OPENSSL_DIR variable to discover its location.
* gnu/packages/crates-io.scm (rust-curl-sys-0.4, rust-libgit2-sys-0.10,
rust-libpijul-0.12, rust-libssh2-sys-0.2, rust-native-tls-0.2,
rust-openssl-sys-0.9, rust-openssl-0.7, rust-trust-dns-rustls-0.6),
* gnu/packages/rust-apps.scm (tokei, exa)[arguments]: Remove redundant
setenv for openssl.
2020-11-22 19:44:43 +02:00
Maxim Cournoyer
cf495c934e
build-system/python: Set PYTHONDONTWRITEBYTECODE.
* guix/build/python-build-system.scm (enable-bytecode-determinism): Set
PYTHONDONTWRITEBYTECODE.
2020-11-20 09:12:32 -05:00
Marius Bakke
be8a0881f1
build-system/cargo: Do not pass --features to Cargo unless specified.
Fixes <https://bugs.gnu.org/44692>.

* guix/build/cargo-build-system.scm (build): Default to the empty list for
FEATURES.  Check whether the list is empty when building the Cargo arguments.
2020-11-20 09:58:04 +01:00
Ludovic Courtès
55d095c653
utils: Add #:keep-permissions? parameter to 'copy-recursively'.
* guix/build/utils.scm (copy-recursively): Add #:keep-permissions? and
honor it.
* doc/guix.texi (Build Utilities): Adjust accordingly.
2020-11-19 22:36:03 +01:00
Ludovic Courtès
edbd8f3f7e
utils: Add #:copy-file parameter to 'copy-recursively'.
* guix/build/utils.scm (copy-recursively): Add #:copy-file and honor it.
* doc/guix.texi (Build Utilities): Adjust accordingly.
2020-11-19 22:36:03 +01:00
Ludovic Courtès
201cbcac3e
utils: 'copy-recursively' keeps directory mtime when #:keep-mtime? is true.
Fixes <https://bugs.gnu.org/44741>.

* guix/build/utils.scm (copy-recursively): Move 'set-file-time' call
from 'down' to 'up'.
2020-11-19 22:36:03 +01:00
Ludovic Courtès
55fb5e5d21
utils: 'wrap-script' doesn't pass a non-literal string to 'format'.
Reported by Vagrant Cascadian <vagrant@debian.org>
in <https://bugs.gnu.org/44626>.

* guix/build/utils.scm (wrap-script): Use 'display' instead of passing a
non-literal string to 'format'.
2020-11-17 09:44:56 +01:00
Marius Bakke
32787d6524
Merge branch 'master' into staging
Conflicts:
	gnu/local.mk
	gnu/packages/gdb.scm
	gnu/packages/lisp-xyz.scm
	gnu/packages/web-browsers.scm
2020-11-07 21:33:32 +01:00
Maxim Cournoyer
ca080b3efb
build-system/meson: Do not apply strip-runpath to the "debug" output.
Because the debug files are read-only, the strip-runpath procedure would throw
an exception when attempting to open them.

* guix/build/meson-build-system.scm (shrink-runpath): Remove "debug" from the
list of outputs to be processed.
2020-11-06 15:44:56 -05:00
Vagrant Cascadian
159c5943e4
build/maven: Fix typo.
* guix/build/maven/pom: Fix spelling of "with".
2020-10-28 21:11:11 -07:00
Vagrant Cascadian
28680722b2
build/maven: fix-pom-dependencies: Fix typo.
* guix/build/maven/pom (fix-pom-dependencies): Fix spelling of "overrides".
2020-10-28 21:11:06 -07:00
Vagrant Cascadian
05ee7ef8b7
build/maven: fix-pom-dependencies: Fix typo.
* guix/build/maven/pom (fix-pom-dependencies): Fix spelling of "overridden".
2020-10-28 21:11:01 -07:00
Björn Höfling
f503cfc9c5
build/maven-build-system: Return #t in fix-pom-files phase.
* guix/build/maven-build-system.scm (fix-pom-files): Return #t.
2020-10-26 21:36:09 +01:00
Maxim Cournoyer
dd4a4603be
build-system/python: Revert changing of phase order.
Commit c94a2864d4 moved the 'check' phase back into its original place before
the 'install' phase, but such a change would require adapting the definition
of many Python packages which have come to rely on such phase ordering.

* guix/build/python-build-system.scm (%standard-phases): Move the check phase
back after the install phase, and update comment.
2020-10-20 21:11:12 -04:00
Maxim Cournoyer
c94a2864d4
build-system/python: Do not embed timestamps in the .pyc byte code files.
Fixes <https://issues.guix.gnu.org/22129>.

A previously worked around problem where running the test suite after byte
compiling the sources in commit 6bbb37a545 could
be broken by adding built sources to the PYTHONPATH, as is done for
python-matplotlib and many others.  This seems to be caused by the timestamps
embedded in the sources (mtime), that can somehow change when running the
tests, or by picking up the different installed source files mtimes when their
location is added to the PYTHONPATH.

Since Python 3.7.0, it is possible to produce .pyc byte code files that do not
embed any timestamp, which solves the problem in a definitive way.  This patch
makes use of this new feature.

* guix/build/python-build-system.scm (install): Add '--no-compile' parameter
to setup.py, and instead invoke the 'compileall' module with the
"--invalidation-mode=unchecked-hash" option to byte compile the source files.
(%standard-phases): Revert the workaround that moved the check phase after the
install phase, as it is no longer necessary.  Update comment.

Reported-by: Mark H Weaver <mhw@netris.org>
2020-10-19 13:15:17 -04:00
Maxim Cournoyer
5e2140511c
Merge branch 'staging'
Conflicts:
	gnu/packages/admin.scm
	gnu/packages/commencement.scm
	gnu/packages/gdb.scm
	gnu/packages/llvm.scm
	gnu/packages/package-management.scm
	gnu/packages/tls.scm
2020-10-19 13:11:40 -04:00
Marius Bakke
1a8f7a0f58
Merge branch 'master' into staging 2020-10-19 00:17:48 +02:00
Tobias Geerinckx-Rice
7dff329862
build: Fix docstring typos.
* gnu/build/image.scm (estimate-partition-size): Fix typo in docstring.
* guix/build/copy-build-system.scm (install): Likewise.
* guix/build/lisp-utils.scm (generate-executable): Likewise.
* guix/build/maven/pom.scm (find-parent, fix-pom-dependencies): Likewise.
* guix/build-system/cargo.scm (expand-crate-sources): Likewise.
2020-10-16 15:24:15 +02:00
Efraim Flashner
6b793fa662
build-system/go: Install license files.
* guix/build/go-build-system.scm (install-license-files): New procedure.
(%standard-phases): Replace inherited 'install-license-files phase.
2020-10-15 11:13:25 +03:00
Marius Bakke
f7175626ff
Merge branch 'master' into staging 2020-10-13 23:39:27 +02:00
Ludovic Courtès
b55409b2c0
svn-download, hg-download: Use 'report-invoke-error'.
* guix/build/hg.scm (hg-fetch): Use 'report-invoke-error' instead of
'format'.
* guix/build/svn.scm (svn-fetch): Likewise.
2020-10-10 22:37:45 +02:00
Maxim Cournoyer
5a0997ef7f
packages, scripts, utils: Enable multi-threaded xz compression.
xz compression is slow; using the multi-thread mode of xz can make it more
than 6 times faster, for example when compressing the large linux-libre
source.

* guix/build/utils.scm (%xz-parallel-args): New procedure.
* guix/packages.scm (patch-and-repack): Specify the required above xz
arguments by setting the XZ_DEFAULTS environment variable.
* guix/scripts/pack.scm (%compressors, bootstrap-xz): Modify the commands
Gexps so they do not need to be quoted.  This allows lazily evaluating the
arguments on the builder's side.  Specify the required xz arguments.
(self-contained-tarball): Do not quote the compressor command value.
(docker-image): Likewise.
* guix/utils.scm (decompressed-port, compressed-port)
(compressed-output-port): Specify the required above xz arguments.
2020-10-08 12:27:02 -04:00
Maxim Cournoyer
7102c18678
utils: Do not raise exceptions in delete-file-recursively.
This makes it so that delete-file-recursively honors its docstring, which says
it should "report but ignore errors".

Fixes <https://issues.guix.gnu.org/43366>.

* guix/build/utils.scm (warn-on-error): New syntax.
(delete-file-recursively): Use it to catch exceptions and print warning
messages.

Reported-by: Fredrik Salomonsson <plattfot@gmail.com>
2020-10-08 11:10:18 -04:00
zimoun
db9e4af0ea
build: svn: Fix handle fetch errors.
This fixes the revert 1ec67d5220.

* guix/build/svn.scm (svn-fetch): Add 'guard' to handle errors.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-10-08 12:38:43 +02:00
Paul Garlick
1ec67d5220
Revert "build: svn: Handle fetch errors."
This reverts commit 2fb12dd1bb, which
causes the 'svn export' command to fail with:

svn: E155000: Destination directory exists; please remove the directory
or use --force to overwrite
2020-10-06 14:47:57 +01:00
zimoun
2fb12dd1bb
build: svn: Handle fetch errors.
* guix/build/svn.scm (svn-fetch): Add 'guard' to handle errors.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-10-06 10:24:38 +02:00
zimoun
a5a3f813c7
build: hg: Handle fetch errors.
* guix/build/hg.scm (hg-fetch): Add 'guard' to handle errors.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-10-06 10:24:37 +02:00
Efraim Flashner
c1cc0c4865
build-system/cargo: Don't install .crates.toml file.
Fixes <https://issues.guix.gnu.org/43810>.

* guix/build/cargo-build-system.scm (install): Remove installed
.crates.toml file.
2020-10-06 10:37:34 +03:00
Guillaume Le Vaillant
2374443561
Merge branch 'staging' into wip-lisp 2020-09-23 14:50:19 +02:00
Ludovic Courtès
d845e3af7c
utils: Add 'call-with-temporary-output-file'.
* guix/utils.scm: Re-export 'call-with-temporary-output-file'.
(call-with-temporary-output-file): Move to...
* guix/build/utils.scm (call-with-temporary-output-file): ... here.
2020-09-19 17:28:47 +02:00
Ludovic Courtès
a08cb3ca95
Remove (guix build rpath).
This file was unused and is now superseded by (guix build gremlin).

* guix/build/rpath.scm: Remove.
* Makefile.am (MODULES): Remove it.
2020-09-19 17:28:46 +02:00
Ludovic Courtès
49a1203d67
gremlin: Add 'set-file-runpath', 'file-runpath', and 'file-needed'.
* guix/build/gremlin.scm (file-dynamic-info, file-runpath, file-needed):
New procedures.
(&missing-runpath-error, &runpath-too-long-error): New condition types.
(set-file-runpath): New procedure.
* tests/gremlin.scm ("set-file-runpath + file-runpath"): New test.
2020-09-19 17:28:46 +02:00
Jakub Kądziołka
f32a6055a5
build-system/gnu: strip with --strip-unneeded
Apart from debug information, one can also strip some symbols. This can
be a significant difference, qtbase:out consists of about 5 MB of those
symbols. As per [1], --strip-debug is included in --strip-unneeded, and
the debug files created also contain a copy of the information removed
by --strip-unneeded.

Linux From Scratch suggests that this option shouldn't be used on static
libraries [2], however other sources [3] indicate otherwise. Building a
toolchain with this patch succeeds, and the result works fine for
'gcc -static hello-world.c'.

[1]: https://stackoverflow.com/a/52555093
[2]: http://www.linuxfromscratch.org/lfs/view/9.1/chapter05/stripping.html
[3]: https://www.technovelty.org/linux/stripping-shared-libraries.html

* guix/build/gnu-build-system.scm (strip): Use --strip-unneeded.
2020-09-19 15:37:07 +02:00
Guillaume Le Vaillant
e0d9103f41
build-system: asdf: Improve install phase for CL source packages.
* guix/build/asdf-build-system.scm (install)[parent-source]: Add support for
  package names not containing a hyphen.
2020-09-15 22:00:29 +02:00
Guillaume Le Vaillant
952fafb2a3
build-system: asdf: Read all .asd files if no #:asd-files specified.
* guix/build-system/asdf.scm (asdf-build): Remove the 'files' variable.
* guix/build/asd-build-system.scm (find-asd-files): New variable.
  (build, check): Use it.
2020-09-15 14:36:24 +02:00
Maxim Cournoyer
fa8fe90edb
Merge remote-tracking branch 'origin/master' into core-updates 2020-09-14 16:17:19 -04:00
Guillaume Le Vaillant
a13f45c150
build-system: asdf: Switch from bundles to regular compilation.
* gnu/packages/lisp.scm (sbcl, ecl)[native-search-paths]: Add
  'XDG_CONFIG_DIRS'.
* guix/build-system/asdf.scm (asdf-build): Replace 'asd-file' and
  'asd-system-name' keywords by 'asd-files' and 'asd-systems'.
* guix/build/asdf-build-system.scm (%object-prefix,
  %lisp-source-install-prefix): Update variables.
  (install): Update variable.
  (main-system-name): New variable.
  (copy-source): Replace 'asd-file' and 'asd-system-name' keywords by
  'asd-files' and 'asd-systems'.
  (configure): New variable.
  (build, check): Replace 'asd-file' and 'asd-system-name' keywords by
  'asd-files' and 'asd-systems'.
  (create-asd-file, symlink-asd-files): Remove variables.
  (create-asdf-configuration): New variable.
  (cleanup-files): Update variable.
  (%standard-phases): Remove 'create-asd-file' and 'symlink-asd-files' phases.
  Add 'configure' and 'create-asdf-configuration' phases.
* guix/build/lisp-utils.scm (%bundle-install-prefix, normalize-dependency,
  inputs->asd-file-map, asdf-load-all, compile-system): Remove variables.
  (compile-systems): New variable.
  (system-dependencies, compiled-system, generate-system-definition): Remove
  variable.
  (test-system): Replace 'asd-file' parameter by 'asd-files'.
  (generate-executable-for-system): Update variable.
  (generate-dependency-links, make-asd-file, bundle-asd-file): Remove
  variables.
  (make-asdf-configuration): New variable.
  (build-program, build-image): Set 'XDG_CONFIG_DIRS'.
  (generate-executable): Update variable.
2020-09-12 11:18:56 +02:00
Ludovic Courtès
24ce6e27bf
utils: 'dump-port' has an optional 'len' parameter.
* guix/build/utils.scm (dump-port): Add optional 'len' parameter and
honor it.
2020-09-10 11:57:11 +02:00
Efraim Flashner
de3c03a471
Merge remote-tracking branch 'origin/master' into staging 2020-09-05 22:30:04 +03:00
Danny Milosavljevic
4ff0fed778
android-repo-download: Use parallel-job-count instead of hard-coding job
count.

* guix/build/android-repo.scm (android-repo-fetch): Use parallel-job-count
instead of hard-coding job count.
2020-09-03 00:09:38 +02:00
Danny Milosavljevic
3feb846420
Add (guix android-repo-download).
* guix/build/android-repo.scm: New file.
* guix/android-repo-download.scm: New file.
* Makefile.am (MODULES): Add them.
2020-09-02 13:51:38 +02:00
Maxim Cournoyer
89fbca9de6
build: ruby-build-system: Remove an extraneous binding.
* guix/build/ruby-build-system.scm (install): Remove the RUBY-VERSION binding,
no longer used.  Fix the indentation of a comment.
2020-09-01 13:19:08 -04:00
Maxim Cournoyer
a7b1cc333e
build: ruby-build-system: Adjust replace-git-ls-files.
The file names returned by `find ...` instead of `git ls-files...` contains
leading './' characters, which can cause problems when the file lists is
further processed with regexps, for example, as was discovered while updating
the ruby-asciidoctor package in commit
5df1126c3a.

* guix/build/ruby-build-system.scm (replace-git-ls-files): Strip the first two
characters ("./") of the file names returned by the 'find' command.  Fix typo
in doc.  Simplify '(when (not ...' into '(unless ...'.
2020-08-28 01:21:02 -04:00
Mathieu Othacehe
17dddeeee5
Merge remote-tracking branch 'origin/master' into core-updates 2020-08-26 18:35:14 +02:00
Mathieu Othacehe
e9f8a7e215
Use guile-zlib extension in build-side code.
* Makefile.am (MODULES): Move guix/build/download-nar.scm to ...
(MODULES_NOT_COMPILED): ... here.
* guix/build/download-nar.scm: Use (zlib) instead of (guix zlib).
* guix/cvs-download.scm (cvs-fetch): Do not stub (guix config) in imported
modules list, instead add "guile-zlib" to the extension list.
* guix/git-download.scm (git-fetch): Ditto.
* guix/hg-download.scm (hg-fetch): Do not stub (guix config) in imported
modules list, instead add "guile-zlib" to the extension list.
2020-08-24 10:41:06 +02:00
Ricardo Wurmus
aa1a75cc0e
build-system/haskell: Do not pass "--bindir" during configure.
The "--bindir" option is not as useful as it seems as the configured location
is embedded in the outputs.  Instead of using "--bindir" it seems better to
build a statically linked binary and move the binary to its own output to
avoid references between the "out" and "bin" outputs.

* guix/build/haskell-build-system.scm (configure): Do not pass "--bindir".
2020-08-13 16:44:56 +02:00
Timothy Sample
54a5fd0791
build-system/haskell: Add 'extra-directories' keyword.
See <https://bugs.gnu.org/39309>.

* guix/build-system/haskell.scm (lower): Include the transitive
propagated inputs of 'extra-directories' inputs.
(haskell-build): Add the 'extra-directories' keyword and pass it through
to the builder.
* guix/build/haskell-build-system.scm (configure): Use it to select
which inputs get passed via 'extra-include-dirs' and 'extra-lib-dirs' to
Cabal.
* gnu/packages/haskell-xyz.scm (ghc-alsa-core, ghc-hmatrix,
ghc-hmatrix-gsl, ghc-hslua, ghc-iwlib, ghc-libyaml, ghc-ncurses,
ghc-openglraw, ghc-x11, ghc-x11-xft, ghc-zlib): Set 'extra-directories'.
* gnu/packages/haskell-crypto.scm (ghc-digest, ghc-hsopenssl): Likewise.
2020-08-13 16:44:52 +02:00
Ricardo Wurmus
3f7922cbf5
haskell-build-system: register: Remove references to the doc output.
* guix/build/haskell-build-system.scm (register): Strip references to the doc
output from the generated package config files; move the haddock files from
the "doc" output to the "lib" output.
2020-08-12 14:45:49 +02:00
Ricardo Wurmus
75bda3c648
haskell-build-system: register: Respect lib output.
* guix/build/haskell-build-system.scm (register): Use lib output if it exists.
2020-08-12 14:45:49 +02:00
Ricardo Wurmus
718dc7d4a5
build-system/haskell: Add default output "static".
* guix/build-system/haskell.scm (lower): Add OUTPUTS keyword and add the
"static" output in the common case.
(haskell-build): Set the default value for the OUTPUTS keyword to include the
"static" output.
* guix/build/haskell-build-system.scm (install): Move static libraries to the
"static" output if it exists.
2020-08-12 14:45:48 +02:00
Ricardo Wurmus
9e5496e0ae
build-system/haskell: Configure to link with shared libraries.
* guix/build/haskell-build-system.scm (configure): Add configure flags to
build shared libraries by default, to generate position independent code, and
to set the RUNPATH.
2020-08-12 14:45:48 +02:00
Ricardo Wurmus
0347888a7e
build-system/haskell: Refactor configure step.
* guix/build/haskell-build-system.scm (configure): Replace append
with quasiquotes and splicing.
2020-08-12 14:45:48 +02:00
Ricardo Wurmus
67cb9fa235
build-system/haskell: Support parallel builds.
* guix/build-system/haskell.scm (haskell-build): Add keyword PARALLEL-BUILD?
and pass it on to the builder.
* guix/build/haskell-build-system.scm (build): Accept keyword PARALLEL-BUILD?
and pass the number of parallel jobs to GHC.
2020-08-12 14:45:48 +02:00
Marius Bakke
cbe96f1470
Merge branch 'master' into staging 2020-07-24 23:53:17 +02:00
Jakub Kądziołka
d726b954ba
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/ruby.scm
2020-07-23 21:43:06 +02:00
Jakub Kądziołka
849f6e0ff9
build-system/python: Install to the python output if present.
* gnu/build/python-build-system.scm (python-output): New procedure.
  (site-packages, install): Use python-output to find the output path.
  (wrap, rename-pth-file): Use site-packages where appropriate.
* doc/guix.texi (Build Systems): Mention the new behavior.
2020-07-18 16:40:15 +02:00
Julien Lepiller
55b90c9053
guix: Add maven-build-system.
* guix/build-system/maven.scm: New file.
* guix/build/maven-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document the maven build system.
2020-07-17 04:21:22 +02:00
Julien Lepiller
3d3bc413b4
guix: java-utils: Add Maven-related phases.
* guix/build/maven/java.scm: New file.
* guix/build/maven/plugin.scm: New file.
* guix/build/maven/pom.scm: New file.
* Makefile.am (MODULES): Add them.
* guix/build-system/ant.scm (%ant-build-system-modules): Add them to the
build side.
* guix/build/java-utils.scm (generate-plugin.xml, install-pom-file)
(install-from-pom): New procedures.
2020-07-17 04:10:28 +02:00
Efraim Flashner
7dee475589
build/cargo-utils: Use all allocated threads to generate checksums.
* guix/build/cargo-utils.scm (generate-all-checksums): Use
n-par-for-each instead of for-each when regenerating checksums for
source crates.
2020-07-15 10:26:35 +03:00
Ludovic Courtès
8d49c80b69
download-nar: Hide colliding 'dump-port*' binding.
* guix/build/download-nar.scm: Hide 'dump-port*' from (guix
serialization).
2020-07-10 00:20:09 +02:00
Ludovic Courtès
d283bb960f
maint: Remove traces of "berlin.guixsd.org".
The guixsd.org domain is no longer advertised since before in 1.0.0
release in May 2019.

* etc/substitutes/berlin.guixsd.org.pub: Rename to...
* etc/substitutes/berlin.guix.gnu.org.pub: ... this.
* etc/substitutes/ci.guix.gnu.org.pub,
etc/substitutes/ci.guix.info.pub: Adjust accordingly.
* gnu/services/base.scm (%default-authorized-guix-keys): Likewise.
* guix/build/download-nar.scm (urls-for-item): Likewise.
* guix/self.scm (miscellaneous-files): Likewise.
* Makefile.am (dist_pkgdata_DATA): Likewise.
2020-07-10 00:11:00 +02:00
Guillaume Le Vaillant
cdf34eed33
guix: build: Fix asdf-build-system/ecl.
* guix/build/lisp-utils.scm (make-asd-file): Fix value of 'component?'
  parameter when using ECL.
2020-07-01 16:14:21 +02:00
Ludovic Courtès
5837b3e41f
po: Micro-optimize 'read-po-file'.
* guix/build/po.scm (parse-tree->assoc): Use dot instead of ellipsis in
'match' clause to avoid repeated calls to 'list?'.
2020-06-23 00:03:08 +02:00
Ludovic Courtès
52b4524f4e
po: Avoid regexps when interpreting '\n' sequences.
This reduces the execution time of:

  (call-with-input-file "po/doc/guix-manual.de.po" read-po-file)

from 4.7s to 4.0s.

* guix/build/po.scm (interpret-newline-escape): New procedure.
(parse-tree->assoc): Use it instead of 'regexp-substitute/global'.
2020-06-23 00:03:08 +02:00
Ludovic Courtès
a0d419e639
compile: Build gnu/{packages,tests}/* with '-O1'.
* guix/build/compile.scm (optimization-options): Use '-O1' for the
simple case.
2020-06-22 15:42:55 +02:00
Jakub Kądziołka
43bc785511
Merge branch 'master' into core-updates 2020-06-22 02:56:22 +02:00
Pierre Neidhardt
5a08660ecb
build-system/asdf: Add support for component-less systems.
* guix/build/lisp-utils.scm (make-asd-file): Ensure lib directory exists and
check if prebuilt bundle system was generated.
(generate-system-definition): Add :class and :components only if prebuilt
system was generated.
2020-06-18 17:14:08 +02:00
Ludovic Courtès
f9a0fc9dbb
build-system/gnu: Fix 'install' phase of 'gnu-dist'.
* guix/build/gnu-dist.scm (install-dist): Fix 2nd argument to
'for-each'.
2020-06-18 14:48:17 +02:00
Ludovic Courtès
ba8c09f289
build-system/gnu: Rename "make dist" phase to 'build-dist'.
* guix/build/gnu-dist.scm (%dist-phases): Add BUILD under the name
'build-dist'.
2020-06-17 19:32:43 +02:00
Ludovic Courtès
dabbddbbaa
build-system/gnu: Remove redundant 'unpack' phase from 'gnu-dist'.
This has become redundant with the standard 'unpack' phase since
17919a5801.

* guix/build/gnu-dist.scm (copy-source): Remove.
(%dist-phases): Remove 'unpack' phase.
2020-06-17 19:32:43 +02:00
Ludovic Courtès
03686f26cc
build-system/gnu: Remove Hydra-specific code from 'gnu-dist'.
* guix/build/gnu-dist.scm (install-dist): Remove code for
'hydra-build-products'.
2020-06-17 19:32:43 +02:00
Ludovic Courtès
2ee1cce324
build-system/gnu: Remove 'autoreconf' phase from 'gnu-dist'.
This has been superseded by the 'bootstrap' phase added in
189be331ac.

* guix/build/gnu-dist.scm (autoreconf): Remove.
(%dist-phases): Remove it.
2020-06-17 19:32:43 +02:00
Ludovic Courtès
94642ab06b
profiles: Add comment at the top of 'manifest' file.
* guix/build/profiles.scm (build-profile): Add comment at the top of
MANIFEST-FILE.
2020-06-17 12:06:33 +02:00
Marius Bakke
4193095e18
Merge branch 'master' into core-updates 2020-06-14 16:24:34 +02:00
Marius Bakke
dd2d3ed2d3
Merge branch 'master' into staging 2020-06-08 19:05:56 +02:00
Jan (janneke) Nieuwenhuizen
ab9e30039d
syscalls: set-thread-name, thread-name: Fix thinko.
* guix/build/syscalls.scm (set-thread-name, thread-name): Oops, fix thinko.
2020-06-08 16:49:03 +02:00
Jan (janneke) Nieuwenhuizen
1428926f1f
syscalls: set-thread-name, thread-name: Stub for the Hurd.
Avoid crash

    Backtrace:
    guix/build/syscalls.scm:405:8: In procedure prctl: Function not implemented

because of missing prctl on the Hurd.

* guix/build/syscalls.scm (set-thread-name, thread-name): Rename to ...
(set-thread-name!/linux,thread-name/linux): ...this.
(set-thread-name, thread-name): Swtich between linux implementation and or
stub.
2020-06-08 13:51:17 +02:00
Marius Bakke
7ce1b5e7b7
Merge branch 'master' into staging 2020-06-06 21:25:43 +02:00
Danny Milosavljevic
f51fd97ec5
build-system: linux-module: Allow passing #:make-flags argument.
* guix/build-system/linux-module.scm (linux-module-build): Add #:make-flags.
(linux-module-build-cross): Add #:make-flags.
* guix/build/linux-module-build-system.scm (install): Pass make-flags.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-06-02 14:22:32 +02:00
Marius Bakke
fe6d003908
Merge branch 'master' into staging 2020-05-29 23:36:38 +02:00
Ludovic Courtès
17a102332a
syscalls: 'terminal-dimension' ignores EPERM.
Fixes <https://bugs.gnu.org/41581>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* guix/build/syscalls.scm (terminal-dimension): Add EPERM to the list of
errno code for FALL-BACK.
2020-05-29 18:31:38 +02:00
Jesse Dowell
b56cbe8974
syscalls: Properly match %HOST-TYPE.
Fixes <https://bugs.gnu.org/41546>.

Regression introduced in 0d371c633f.

* guix/build/syscalls.scm (write-socket-address!)
(read-socket-address): Use 'string-contains' instead of
'string-suffix?'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-05-29 18:31:38 +02:00
Marius Bakke
aa13c5657d
Merge branch 'master' into staging 2020-05-26 22:34:46 +02:00
Marius Bakke
9edb3f66fd
Merge branch 'master' into staging 2020-05-26 22:30:51 +02:00
Ludovic Courtès
49143297fc
compile: Do not optimize "gnu/tests/*".
* guix/build/compile.scm (optimization-options): Add "gnu/tests/" to
level 0.
2020-05-25 23:00:31 +02:00
Efraim Flashner
ff6e33e7ee
build: substitute*: Fix typo in example.
* guix/build/utils.scm (substitute*): Fix typo in example in docstring,
use consistent variable names.
2020-05-25 10:51:19 +03:00
Pierre Neidhardt
c3f1f09586
build: asdf-build-system: Use SBCL source in CL packages.
* guix/build/asdf-build-system.scm (copy-files-to-output): Don't attempt to
  reset timestamps on files without write access.
  (install): When parent SBCL package is in the inputs, use its source.  This
  way we get possibly patched sources in CL packages as well (e.g. for FFI).
  This is also useful for sources that generate files on load-op, like cl-unicode.

* guix/build-system/asdf.scm (package-with-build-system): Forward the SBCL
  parent as a native input so that it can be used in the above install phase.
2020-05-21 11:53:06 +02:00
Efraim Flashner
5b77e9ca14
build: minify-build-system: Fail to install empty files.
* guix/build/minify-build-system.scm (install): Produce an error if the
minified file is zero bytes.
2020-05-18 09:52:47 +03:00
Jan (janneke) Nieuwenhuizen
0d371c633f
syscalls: Adjust 'sockaddr-in', 'sockaddr-in6' structs for the Hurd.
* guix/build/syscalls.scm (sockaddr-in,sockaddr-in6): Rename to ...
(sockaddr-in/linux, sockaddr-in6/linux): ... this.  Rename introduced bindings
as well.
(write-socket-address!/linux,read-socket-address/linux): Rename from
(write-socket-address!, read-socket-address): ... new switches between those
and ...
(write-socket-address!/hurd, read-socket-address/hurd): ... these new function.
2020-05-15 10:08:56 +02:00
Jan (janneke) Nieuwenhuizen
df05842332
syscalls: Add 'getxattr'.
* guix/build/syscalls.scm (getxattr): New procedure.
* tests/syscalls.scm ("getxattr, setxattr"): Test it, together with setxattr.
2020-05-14 00:48:12 +02:00
Ludovic Courtès
a4d76a514f
compile: Reduce optimization levels for gnu/services and gnu/packages.
* guix/build/compile.scm (optimization-options)[strip-option]
[override-option]: New procedures.
Add case for "gnu/services".  Change "gnu/packages" to
'-O0 -Opartial-eval'.
2020-05-13 23:35:57 +02:00
Jan (janneke) Nieuwenhuizen
d155c9d934
syscalls: Add 'setxattr'.
* guix/build/syscalls.scm (setxattr): New procedure.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-05-13 23:26:06 +02:00
Marius Bakke
4bdf4182fe
Merge branch 'core-updates' 2020-05-08 21:40:51 +02:00
Marius Bakke
2ca603f113
build-system/emacs: Hide the 'delete' binding from (guix build utils).
This gets rid of a warning from 'compute-guix-derivation.drv' when running on
Guile 3.0.  (guix build emacs-build-system) includes (srfi srfi-1) anyway.

* guix/build/emacs-build-system.scm: Do not import 'delete' from (guix build utils).
2020-05-07 15:14:46 +02:00
Jan (janneke) Nieuwenhuizen
598be42dfa
syscalls: Add ioctl flags for the Hurd.
Use

    #include <stdio.h>
    #include <net/if.h>
    #include <hurd/ioctl.h>

    int
    main ()
    {
      printf ("SIOCSIFFLAGS #x%x\n", SIOCSIFFLAGS);
      printf ("SIOCGIFADDR #x%x\n", SIOCGIFADDR);
      printf ("SIOCSIFADDR #x%x\n", SIOCSIFADDR);
      printf ("SIOCGIFNETMASK #x%x\n", SIOCGIFNETMASK);
      printf ("SIOCSIFNETMASK #x%x\n", SIOCSIFNETMASK);
    #if 0
      printf ("SIOCADDRT #x%x\n", SIOCADDRT);
      printf ("SIOCDELRT #x%x\n", SIOCDELRT);
    #endif
    }

to fill in some blanks.  Adding and removing route apparently not supported.

* guix/build/syscalls.scm (SIOCSIFFLAGS SIOCGIFADDR, SIOCSIFADDR,
SIOCGIFNETMASK, SIOCSIFNETMASK):
2020-05-07 07:11:03 +02:00
Marius Bakke
c263cfdcde
Merge branch 'master' into core-updates 2020-05-06 23:37:40 +02:00
Ludovic Courtès
86f5decd20
syscalls: 'define-c-struct' supports cross-compilation.
Reported by Jan (janneke) Nieuwenhuizen <janneke@gnu.org>.

Before that, we'd always use the 'sizeof' and 'alignof' value obtained
from the host at macro-expansion time.

* guix/build/syscalls.scm (sizeof*, alignof*): When the target word size
differs from the host word size, emit a call to 'sizeof'/'alignof'.
2020-05-05 23:45:56 +02:00
Marius Bakke
87a40d7203
Merge branch 'master' into core-updates 2020-05-05 20:43:21 +02:00
Mathieu Othacehe
fd1351ab0a
build: store-copy: Export file-size procedure.
* guix/build/store-copy.scm (file-size): Export it.
2020-05-05 16:08:32 +02:00
Jakub Kądziołka
4035c3e352
Merge branch 'master' into staging 2020-04-29 11:08:42 +02:00
Marius Bakke
c57d649de3
Merge branch 'master' into core-updates 2020-04-24 17:28:11 +02:00
Ludovic Courtès
12da5162e4
compile: Pre-load the compiler outside 'with-target'.
* guix/build/compile.scm (compile-files): Move call to 'compile' before
'with-target'.  Failing to do that, if the target has a different word
size than the host, the first call to 'compile-file' fails with:

  ice-9/eval.scm:293:34: In procedure load-thunk-from-memory: ELF file does not have native word size

while attempting loading 'language/spec.go'.
2020-04-23 23:59:22 +02:00
Marius Bakke
030f6f489f
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/bootloaders.scm
	gnu/packages/linphone.scm
	gnu/packages/linux.scm
	gnu/packages/tls.scm
	gnu/system.scm
2020-04-23 13:33:09 +02:00
Julien Lepiller
fd546bbbee
syscalls: Fix Linux detection in 'readdir*'.
* guix/build/syscalls.scm (readdir*): Fix Linux detection for
`arm-unknown-linux-gnueabihf'.
2020-04-20 16:30:14 +02:00
Marius Bakke
7abe35febe
Merge branch 'master' into core-updates 2020-04-19 16:53:01 +02:00
Ludovic Courtès
82d8959e5d
syscalls: 'readdir*' chooses between the Linux and Hurd code at run time.
Partly fixes <https://bugs.gnu.org/40574>.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.

Previously, we'd choose at expansion time whether to use the Hurd or the
Linux variant, taking the cross-compilation target into account.  This
would lead to the wrong decision when (guix build syscalls) is evaluated
while we're cross-compiling to GNU/Hurd.

This is a followup to 1ab9e48339.

* guix/build/syscalls.scm (define-generic-identifier)
(read-dirent-header, %struct-dirent-header, sizeof-dirent-header):
Remove.
(readdir*): Rename to...
(readdir-procedure): ... this, and add parameters.
(readdir*): Define as a call to 'readdir-procedure' as a function of
%HOST-TYPE.
2020-04-16 18:33:21 +02:00
Marius Bakke
fc58cb5bd2
Merge branch 'master' into core-updates 2020-04-13 20:26:21 +02:00
nixo
93d5cea57e
build: julia-build-system: Update for new Julia version.
* guix/build/julia-build-system.scm (generate-load-path): Delete function.
(install): Don't set JULIA_LOAD_PATH.
(precompile): Set SOURCE_DATE_EPOCH. Update calculating the
JULIA_LOAD_PATH. Adjust the 'invoke-julia' command.
(check): Set SOURCE_DATE_EPOCH. Adjust JULIA_LOAD_PATH.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2020-04-12 16:15:47 +03:00
Marius Bakke
2778302399
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/check.scm
	gnu/packages/cross-base.scm
	gnu/packages/gimp.scm
	gnu/packages/java.scm
	gnu/packages/mail.scm
	gnu/packages/sdl.scm
	gnu/packages/texinfo.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
2020-04-08 13:00:50 +02:00
Jakub Kądziołka
3f3c9fdcd8
build-system/go: Allow providing additional build flags
* guix/build-system/go.scm (build-flags): New argument.
* guix/build/go-build-system.scm (build): Use apply to pass the
  additional arguments to invoke.
2020-04-08 12:24:42 +02:00
Ludovic Courtès
041c3c22dc
compile: Run the load phase within 'with-target'.
* guix/build/compile.scm (compile-files)[build]: Remove 'with-target'.
Wrap body in 'with-target'.
2020-04-08 00:05:45 +02:00
Ludovic Courtès
3b4d7cdccc
bournish: Prevent inlining of run-time support procedures.
On Guile 3, those procedures could be inlined, leading to
unbound-variable errors:

  scheme@(guile-user)> ,bournish
  Welcome to Bournish, a minimal Bourne-like shell!
  To switch back, type `,L scheme'.
  bournish@(guile-user)> ls
  ice-9/boot-9.scm:1669:16: In procedure raise-exception:
  Unbound variable: ls-command-implementation

Reported by Ricardo Wurmus.

* guix/build/bournish.scm (define-command-runtime): New macro.
(ls-command-implementation, wc-command-implementation)
(wc-l-command-implementation, wc-c-command-implementation): Use it
instead of 'define'.
2020-04-02 16:07:08 +02:00
Jakub Kądziołka
44fb8cf841
Merge branch 'master' into staging 2020-03-29 00:38:13 +01:00
Marius Bakke
18af687037
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/icu4c.scm
	gnu/packages/man.scm
	gnu/packages/python-xyz.scm
	guix/scripts/environment.scm
	guix/scripts/pack.scm
	guix/scripts/package.scm
	guix/scripts/pull.scm
	guix/store.scm
2020-03-27 00:12:15 +01:00
Jakub Kądziołka
927c251846
cargo-build-system: Accept a #:features argument
* guix/build/cargo-build-system.scm (build, install): Pass the features
  to cargo.
  (check): Remove indirection layer for consistency with build and
  install.
* guix/build-system/cargo.scm (cargo-build): New argument; pass it into
  the builder.
* gnu/packages/rust-apps.scm (ripgrep): Use the new argument instead of
  a custom phase.
2020-03-23 19:30:38 +01:00
Maxim Cournoyer
afc6b1c0b6
build: emacs-utils: Add an option to select scoping for batch eval.
In Emacs 27, --eval now evaluates using lexical scoping.  This change adds an
option to select dynamic scoping, by using a workaround proposed in
<https://bugs.gnu.org/39823>.

* guix/build/emacs-utils.scm (emacs-batch-eval): Add a DYNAMIC? keyword
argument.  Wrap the EXPR with a call to EVAL that makes use of the argument
to select the scoping mode.
(emacs-generate-autoloads): Use it.
2020-03-22 21:17:38 -04:00
Mathieu Othacehe
c086c5af1c
build-system: linux-module: Fix cross compilation.
* guix/build-system/linux-module.scm (default-kmod, default-gcc): Delete
procedures.
(system->arch): New procedure.
(make-linux-module-builder)[native-inputs]: Move linux...
[inputs]: ...to here.
(linux-module-build-cross): New procedure.
(linux-module-build): Add TARGET.  Pass TARGET and ARCH to build side.
(lower): Allow cross-compilation.  Move "linux" and "linux-module-builder"
to host-inputs.  Add target-inputs.  Call linux-module-build-cross if
TARGET is set, linux-module-build otherwise.
* guix/build/linux-module-build-system.scm (configure): Add ARCH argument.
(linux-module-build): Adjust comment.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-03-22 13:20:07 +01:00
Ludovic Courtès
9a067fe7ee
syscalls: 'with-file-lock' re-grabs lock when reentering its dynamic extent.
* guix/build/syscalls.scm (call-with-file-lock)
(call-with-file-lock/no-wait): Initialize PORT in the 'dynamic-wind'
"in" handler.  This allows us to re-enter a captured continuation and
have the lock grabbed anew.
2020-03-22 12:42:51 +01:00
Ludovic Courtès
4a6ec23a97
download: Delete the output file upon failure.
This allows ENOSPC conditions to be properly reported as such rather
than as a hash mismatch due to the availability of a truncated file.

Fixes <https://bugs.gnu.org/39993>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.

* guix/build/download.scm (url-fetch): In the failure case, delete FILE.
2020-03-22 00:02:23 +01:00
Marius Bakke
961d2ee269
Merge branch 'master' into core-updates 2020-03-14 13:13:40 +01:00
Ludovic Courtès
d8a822f462
download: Remove (web http) workarounds no longer relevant.
* guix/build/download.scm <top level>: Remove workarounds for
<https://bugs.gnu.org/23421> and for
<https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00070.html>.
2020-03-11 18:42:09 +01:00
Marius Bakke
ebb7cf9e21
Merge branch 'master' into core-updates 2020-03-04 23:16:17 +01:00
Leo Prikler
a3b1f878df
build-system: copy-build-system: Keep symlinks symbolic.
guix/build/copy-build-system.scm (install)[install-file]:
Read symlinks as is done in install-simple through copy-recursively.

Signed-off-by: Pierre Neidhardt <mail@ambrevar.xyz>
2020-02-28 09:39:31 +01:00
Maxim Cournoyer
9659459f06
emacs-build-system: Byte compile the autoload files.
* guix/build/emacs-build-system.scm (enable-autoloads-compilation)
(validate-compiled-autoloads): Add procedures.
(%standard-phases): Register the new procedures.
* gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-find-autoloads):
Remove duplicates in the list of autoload files found.
* guix/build/emacs-utils.scm (expr->string): Add procedure.
(emacs-batch-eval, emacs-batch-edit-file): Use it.
2020-02-27 16:59:07 -05:00
Danny Milosavljevic
12f0aefd14
build-system/linux-module: Disable depmod.
* guix/build/linux-module-build-system.scm (install): Disable depmod.
2020-02-25 10:22:19 +01:00
Julien Lepiller
c23b42dd55
guix: node-build-system: Do not symlink /bin.
* guix/build/node-build-system.scm (install): Do not add a symlink for
/bin.
2020-02-25 00:27:09 +01:00
Pierre Neidhardt
e90e64049c
build-system: Add copy-build-system.
* guix/build-system/copy.scm: New file.
* guix/build/copy-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'copy-build-system'.
2020-02-21 10:53:11 +01:00
Timothy Sample
9c9407f746
Add (guix build gnu-bootstrap).
* guix/build/gnu-bootstrap.scm: New file.
* Makefile.am (MODULES): Add it.
2020-02-17 23:21:04 +01:00
Danny Milosavljevic
88f8549449
utils: Change 'patch-shebang' to not try to patch Rust source files.
* guix/build/utils.scm (patch-shebang): Match only absolute paths.
2020-02-17 16:52:55 +01:00
Efraim Flashner
1b2b7765a0
build: gnu-build-system: Adjust NOCONFIGURE variable.
This ia a follow-up to 481a0f1a7c.

* guix/build/gnu-build-system.scm (bootstrap): Set NOCONFIGURE for all
bootstrap scripts. Clean up variable after use.
2020-02-16 18:45:37 +02:00
Brendan Tildesley
a21bd6d5c2
build-system/gnu: Don't try executing directories in bootstrap phase.
* guix/build/gnu-build-system.scm: (bootstrap): Change the file-exists?
procedure to one that excludes directories, so that we do not mistake it for a
script. For example if the source includes a bootstrap/ directory.

Signed-off-by: Marius Bakke <mbakke@fastmail.com>
2020-02-16 15:48:37 +01:00
Efraim Flashner
481a0f1a7c
build: gnu-build-system: Don't run configure during bootstrap.
* guix/build/gnu-build-system.scm (bootstrap): Add NOCONFIGURE
environment variable before running bootstrap scripts.
2020-02-16 09:05:32 +02:00
Marius Bakke
7edafc884c
Merge branch 'master' into core-updates 2020-02-14 19:05:45 +01:00
Jack Hill
46c5c917ba
build: go-build-system: Disable Go module support.
This allows for upgrading the Go compiler without overhauling
go-build-system first.

* guix/build/go-build-system.scm (setup-go-environment): Set GO111MODULE to
off.

Signed-off-by: Alex Griffin <a@ajgrf.com>
2020-02-11 16:52:17 -06:00
Marius Bakke
52665d2b6b
Merge branch 'staging' into core-updates 2020-02-03 15:45:44 +01:00
Pierre Neidhardt
5db7df2eab
guix: Fix missing export for make-desktop-entry-file.
* guix/build/utils.scm: Export make-desktop-entry-file.
2020-01-30 16:53:44 +01:00
Marius Bakke
0895002f68
Merge branch 'master' into staging 2020-01-29 11:12:49 +01:00
Hartmut Goebel
8377512e0c
guix: qt-build-system: Add phase check-setup.
* guix/build/qt-build-system.scm (check-setup): New function.
  (%standard-phases): Add as new phase `check-setup before `check.
* doc/guix.texi (Build System)[qt-build-system]: Describe the new phase.
2020-01-28 13:03:08 +01:00
Efraim Flashner
61b95c15cf
build: cargo-build-system: Add pkg-config environment variables.
* guix/build/cargo-build-system.scm (configure): Add environment
variables to use system libgit2 and libssh2.
* gnu/packages/crates-io.scm (rust-libgit2-sys-0.10,
rust-libssh2-sys-0.2)[arguments]: Remove LIBGIT2 and LIBSSH2 environment
variable settings.
* gnu/packages/rust-apps.scm (tokei)[arguments]: Same.
2020-01-27 18:39:10 +02:00
Efraim Flashner
a13db7e2ab
build: cargo-build-system: Allow patched crates.
* guix/build/cargo-build-system.scm (crate-src?): Don't check for a
gzipped tarball, just make sure it's not a directory.
2020-01-27 18:36:11 +02:00
Marius Bakke
38746d026c
build-system/cmake: Specify C++ compiler when cross-compiling.
* guix/build/cmake-build-system.scm (configure)[args]: Add
"-DCMAKE_CXX_COMPILER" when cross-compiling.
2020-01-26 13:39:18 +01:00
Ludovic Courtès
4d52e0f667
compile: Remove incorrect exports.
This is a followup to fed3632812.

* guix/build/compile.scm: Remove exports of '%lightweight-optimizations'
and '%default-optimizations'.
* guix/self.scm: Remove unused (guix build compile) module.
2020-01-23 23:34:09 +01:00
Marius Bakke
8ed9be3fac
Merge branch 'staging' into core-updates 2020-01-21 22:39:42 +01:00
Ludovic Courtès
b782688d71
syscalls: Pass the right 'throw' arguments in 'call-with-file-lock/no-wait'.
Reported by Matt Wette <matt.wette@gmail.com>
in <https://bugs.gnu.org/39194>.

* guix/build/syscalls.scm (call-with-file-lock/no-wait): When
re-throwing, pass KEY in addition to ARGS.
2020-01-19 23:11:37 +01:00
Ludovic Courtès
65b510bbc4
clojure-utils: Avoid use of '@@'.
* guix/build/clojure-utils.scm (%doc-regex): Avoid @@, which doesn't
work on Guile 3.
(file-sans-extension): Likewise.
2020-01-15 23:48:33 +01:00
Marius Bakke
3cfe76bec0
Merge branch 'master' into core-updates 2020-01-15 00:09:46 +01:00
Guillaume Le Vaillant
6b8f7c397a
build: asdf-build-system: Improve reproducibility.
* guix/build/asdf-build-system.scm (copy-files-to-output): Reset timestamps of
  source files before compiling.
2020-01-12 14:48:30 +01:00
Marius Bakke
b7bf02a418
Merge branch 'master' into core-updates 2020-01-11 22:38:24 +01:00
Guillaume Le Vaillant
f98c050c20
build: asdf-build-system: Make sbcl-* Lisp packages reproducible.
The '*.fasl' files produced by SBCL contain the mtime of the source file (see
commit 72843d7ce32bd615f64a0326cf891658b5724ead of SBCL's code repository).
As asdf-build-system makes a copy of the source files before compiling them,
we must set the mtime of these copies to the same date as the originals for
the build to be reproducible.

* guix/build/asdf-build-system.scm (copy-files-to-output): Keep the
  modification time of the original source files.
2020-01-08 15:39:05 +01:00
Ludovic Courtès
058d0251bd
download, git: Refer to the right module in 'module-use!' call.
This fixes a regression introduced in
6a7c4636d4.

* guix/build/download.scm (load-gnutls): Call 'resolve-module' instead
of 'current-module'.
* guix/git.scm (load-git-submodules): Likewise.
2020-01-07 12:25:09 +01:00
Ludovic Courtès
6a7c4636d4
Adjust module autoloads.
In Guile < 2.9.7, autoloading a module would give you access to all its
bindings.  In future versions, autoloading a module gives access only to
the listed bindings, as per #:select (see <https://bugs.gnu.org/38895>).

This commit adjusts autoloads to the new semantics, allowing Guix to be
built with Guile 2.9.7/2.9.8.

* guix/build/download.scm <top level>: Remove call to 'module-autoload!'.
(load-gnutls): New procedure.
(tls-wrap): Call it.
* guix/git.scm <top level>: Remove call to 'module-autoload!'.
(load-git-submodules): New procedure.
(update-submodules): Call it instead of 'resolve-interface'.
* gnu/bootloader/grub.scm: Replace #:autoload with #:use-module.
* gnu/packages.scm: Likewise.
* gnu/packages/ssh.scm: Likewise.
* gnu/packages/tex.scm: Likewise.
* gnu/services/cuirass.scm: Likewise.
* gnu/services/mcron.scm: Likewise.
* guix/lint.scm: Augment list of bindings in #:autoload.
* guix/scripts/build.scm: Likewise.
* guix/scripts/gc.scm: Likewise.
* guix/scripts/pack.scm: Likewise.
* guix/scripts/publish.scm: Likewise.
* guix/scripts/pull.scm: Likewise.
* guix/utils.scm: Remove unnecessary #:autoload clauses; replace one
of them with #:use-module.
2020-01-06 16:31:54 +01:00
Ludovic Courtès
f4cde9ac4a
download: Do not leak file descriptors on TLS ports.
Fixes <https://bugs.gnu.org/20145>.

* guix/build/download.scm (%tls-ports, register-tls-record-port): Remove.
(tls-wrap): Remove call to 'register-tls-record-port'.  Return a custom
binary input/output port instead.  This is a backport of what Guile
2.2's (web client) module has been doing.
(close-connection): Define as an alias for 'close-port'.
* guix/http-client.scm (http-fetch): Remove #:keep-alive? parameter,
which was ignored and unused.
Pass #:keep-alive? #f to 'http-get'.
* guix/lint.scm (probe-uri): Use 'close-port' instead of 'close-connection'.
* guix/scripts/substitute.scm (http-multiple-get): Likewise.
2020-01-03 16:06:26 +01:00
Mathieu Othacehe
ce9383c090
Merge remote-tracking branch 'master' into core-updates. 2019-12-31 11:04:51 +01:00
Leo Prikler
9ce3f7f6dc
guix: emacs-utils: Add emacs-batch-disable-compilation.
* guix/build/emacs-utils.scm (emacs-batch-disable-compilation):
New procedure.

Signed-off-by: Brett Gilio <brettg@gnu.org>
2019-12-27 16:54:52 -06:00
Marius Bakke
621fb83a1f
download: Enable TLS 1.3.
This reverts commit e4ee842026.

* guix/build/download.scm (tls-wrap): Dot not disable TLS 1.3.
2019-12-26 14:29:43 +01:00
Maxim Cournoyer
e34e02707d
emacs-build-system: Ensure the core libraries appear last in the load path.
Fixes bug #38568 (see: https://bugs.gnu.org/38568).

* guix/build/emacs-build-system.scm (add-source-to-load-path): Ensure the core
libraries appear last in the load path.

Reported-by: Jelle Licht <jlicht@fsfe.org>
2019-12-13 10:48:28 +09:00
Efraim Flashner
c9e676d0b1
Merge remote-tracking branch 'origin/master' into core-updates 2019-12-12 04:10:59 +02:00
Maxim Cournoyer
add773c37a
emacs-build-system: Move the source directory to the start of EMACSLOADPATH.
Fixes issue #38479 (see: https://bugs.gnu.org/38479).

* guix/build/emacs-build-system.scm (add-source-to-load-path): Move the source
directory to the start of the EMACSLOADPATH environment variable.

Reported-by:  Diego Nicola Barbato <dnbarbato@posteo.de>
2019-12-08 11:58:08 +09:00
Maxim Cournoyer
d0105e7f29
emacs-build-system: Make the order of the phases more clear.
* guix/build/emacs-build-system.scm (%standard-phases): Re-arrange to explicit
the ordering of phases.
2019-12-08 11:58:08 +09:00
Hartmut Goebel
f69439dff4
build-system: qt: Fix output missing in wrapped variables.
* guix/build/qt-build-system .scm (handle-output): Use directory of
  output, not its name.
2019-12-07 20:48:38 +01:00
Guillaume Le Vaillant
0dc5c85638
file-systems: Add support for 'strict-atime' and 'lazy-time' flags.
* guix/build/syscalls.scm (MS_LAZYTIME): New variable.
* gnu/build/file-systems.scm (mount-flags->bit-mask): Add match rules for
  'strict-atime' and 'lazy-time'.
* doc/guix.texi (File Systems): Add 'strict-atime' and 'lazy-time' to the list
  of supported flags.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2019-12-07 01:00:24 +01:00
Marius Bakke
9d5aa00906
Merge branch 'master' into core-updates 2019-12-05 17:57:35 +01:00
Marius Bakke
33b59c1a3e
Merge branch 'staging' 2019-12-04 20:12:41 +01:00
Maxim Cournoyer
65a7dd2950
build: emacs-build-system: Unify the installation directory.
This change aims to reduce the length of the EMACSLOADPATH environment
variable, which was found to cause issues such as
<https://bugs.gnu.org/38309>.

It should also enable discovery of newly installed packages without refreshing
the session's EMACSLOADPATH of the user profile (e.g., when launching Emacs
from the desktop manager application launcher), as discussed in
<https://bugs.gnu.org/38309>.

* guix/build/emacs-build-system.scm (%legacy-install-suffix): Rename to...
(%install-dir): ...this.
(%install-suffix): Remove variable.
(build): Adjust installation target directory.
(patch-el-files): Likewise.
(install): Likewise.
(move-doc): Likewise.
(make-autoloads): Likewise.

Signed-off-by: Clément Lassieur <clement@lassieur.org>
2019-12-04 11:06:49 +01:00
Hartmut Goebel
b6d852ce6d
guix: Add the 'qt' build system.
* guix/build-system/qt.scm, guix/build/qt-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Buiild systems): Add the new build system.
2019-12-01 20:24:47 +01:00
Ludovic Courtès
3f8e890d91
ui: 'with-profile-lock' keeps going upon ENOLCK.
* guix/build/syscalls.scm (call-with-file-lock/no-wait): Really pass
ARGS to HANDLER.  Return #f when HANDLER is called.
* guix/ui.scm (profile-lock-handler): Emit a mere warning upon ENOLCK.
2019-11-29 15:54:20 +01:00
Marius Bakke
0897ad7fac
Merge branch 'master' into staging 2019-11-28 00:38:25 +01:00
Hartmut Goebel
d1e4e64cd7
guix: Fix wrap-qt-program.
Directory names added here need to match qtbase's native-search-path
specifications.

* guix/build/qt-utils.scm (wrap-qt-program): Change paths used for
  QML2_IMPORT_PATH and QT_PLUGIN_PATH.
2019-11-26 12:31:39 +01:00
Ludovic Courtès
fed3632812
compile: Adjust for Guile 2.9.5.
* guix/build/compile.scm (optimizations-for-level): New procedure.
Include '%lightweight-optimizations' and '%default-optimizations'.
(optimization-options): Use 'optimizations-for-level'.
2019-11-23 22:45:21 +01:00
Marius Bakke
b60d2bfff9
Merge branch 'master' into staging 2019-11-21 22:44:15 +01:00
Ludovic Courtès
0d78d0f09c
download: Load *.crt certificate bundles when *.pem files are missing.
Fixes <https://bugs.gnu.org/38254>.

* guix/build/download.scm (make-credendials-with-ca-trust-files): Look
for *.crt files under DIRECTORY when *.pem files cannot be found.
2019-11-18 12:17:32 +01:00
Maxim Cournoyer
e1d31e6457
build-system: emacs: Simplify the SET-EMACS-LOAD-PATH phase.
It is no longer necessary to search for the Elisp libraries manually, as Emacs
now include a search path specification serving that purpose.

* guix/build/emacs-build-system.scm (set-emacs-load-path): Replace by...
(add-source-to-load-path): ...this.
(%standard-phases): Adjust accordingly.
2019-11-18 14:34:40 +09:00
Mathieu Othacehe
154d97abdd
Merge remote-tracking branch master into core-updates 2019-11-16 09:34:27 +01:00
Marius Bakke
f056553c6b
Merge branch 'master' into staging 2019-11-15 20:11:35 +01:00
Efraim Flashner
cda79c7cc9
make-bootstrap: Adjust copied linux headers.
* guix/build/make-bootstrap.scm (copy-linux-headers): Remove header
file 'a.out.h' is no longer part of the linux kernel headers.
2019-11-15 13:00:23 +02:00
Julien Lepiller
277ba1d4f8
guix: svn: Allow dropping externals.
* guix/build/svn.scm (svn-fetch): Allow to ignore externals.
* guix/svn-download.scm (svn-reference, svn-multi-reference): Add
recursive? field.
2019-11-13 22:49:47 +01:00
Julien Lepiller
f49e913188
guix: Add file-locking with no wait.
* guix/build/syscalls.scm (with-file-lock/no-wait): New procedure.
(lock-file): Take a #:wait? key.
2019-11-08 21:52:30 +01:00
Tobias Geerinckx-Rice
8a2b231782
Revert "guix: svn: Allow dropping externals."
This reverts commit 51395c84fd,
fixing <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37896>.

Reported by <o.rojon@posteo.net>.
2019-10-24 01:08:23 +02:00
Julien Lepiller
51395c84fd
guix: svn: Allow dropping externals.
* guix/build/svn.scm (svn-fetch): Allow to ignore externals.
* guix/svn-download.scm (svn-reference, svn-multi-reference): Add
recursive? field.
2019-10-23 23:31:08 +02:00
Marius Bakke
4c1918db34
Merge branch 'master' into staging 2019-10-23 20:48:55 +02:00
Ludovic Courtès
674e143cf8
download: Honor /etc/ssl/certs when 'SSL_CERT_DIR' is not set.
* guix/build/download.scm (%x509-certificate-directory): Use
"/etc/ssl/certs" as a last resort.  This ensures, for instance, that
'guix download' honors system-wide certificates when SSL_CERT_DIR is
unset.
2019-10-21 18:16:16 +02:00
Pierre Neidhardt
10bb4e1650
guix: Add helper for generating desktop entry files.
* guix/build/utils.scm (make-desktop-entry-file): New procedure.
2019-10-19 12:45:40 +02:00
Marius Bakke
378ebc048c
Merge branch 'master' into staging 2019-10-13 23:04:06 +02:00
Björn Höfling
d967fbc13a
gnu: ant-build-system: Don't override symlinks.
When repacking jar-files, don't work on symlinks: Otherwise, they would be
overridden with the repacked jar-file.

* guix/build/ant-build-system.scm (regular-jar-file-predicate): New procedure.
(generate-jar-indices, strip-jar-timestamps): Use it.
2019-10-13 22:35:04 +02:00
Carl Dong
e214a22007
gnu: Add nsis-x86_64 and nsis-i686.
* guix/build-system/scons.scm (scons-build): Add build-targets and
install-targets parameters.
* guix/build/scons-build-system.scm (build, install): Adjust
accordingly.
* doc/guix.texi (Build Systems): Document it.
* gnu/packages/installers.scm: New file,
(make-nsis): New procedure,
(nsis-x86_64, nsis-i686): New variables.
* gnu/packages/patches/nsis-env-passthru.patch: New file.
* gnu/local.mk (dist_patch_DATA, GNU_SYSTEM_MODULES): Adjust
accordingly.
2019-10-11 11:44:44 -04:00
Marius Bakke
d1f3b333e6
Merge branch 'master' into staging 2019-10-08 19:24:34 +02:00
Ludovic Courtès
5e5f716794
syscalls: Add 'add-to-entropy-count'.
* guix/build/syscalls.scm (RNDADDTOENTCNT): New variable.
(add-to-entropy-count): New procedure.
* tests/syscalls.scm ("add-to-entropy-count"): New test.
2019-10-05 22:05:02 +02:00
Ludovic Courtès
0cf2b6f2db
Merge branch 'master' into core-updates 2019-10-01 12:06:00 +02:00
Ludovic Courtès
7089f98ef1
syscalls: 'define-as-needed' does not re-export local variables.
Fixes <https://bugs.gnu.org/36723>.
Reported by Timothy Sample <samplet@ngyro.com>.

* guix/build/syscalls.scm (define-as-needed): Rewrite to use lower-level
module primitives; define VARIABLE only if it's not already defined to
avoid "re-exporting local variable" error.
2019-09-29 23:02:35 +02:00
Eric Bavier
21391f8c83
compile: Fix race condition on completion progress.
This prevent a race condition where multiple compilation threads could report
the same progress.

* guix/build/compile.scm (compile-files)<completed>: Rename to...
<progress>: ...this.  Increment in same mutex region as the compilation is
reported.
2019-09-27 23:00:16 -05:00
Ludovic Courtès
11da634a6e
Merge branch 'master' into core-updates 2019-09-24 10:11:38 +02:00
Vagrant Cascadian
5da7a04abd
build: ruby-build-system: Fix typo.
* guix/build/ruby-build-system: Fix spelling of "invocation".
2019-09-23 12:08:13 -07:00
Ludovic Courtès
9ff87bb996
Merge branch 'master' into core-updates 2019-09-17 16:27:15 +02:00
Efraim Flashner
3af85f832d
build-system/cargo: Remove unused function.
* guix/build/cargo-build-system.scm (touch): Remove it.
2019-09-13 15:20:27 +03:00
Efraim Flashner
43ffa11fdc
build-system/cargo: Use 'strip-store-file-name'.
This is a follow-up to f58b2f38e4.

* guix/build/cargo-build-system.scm (configure): Use bespoke
'strip-store-file-name' function.
2019-09-13 15:20:16 +03:00
Efraim Flashner
f58b2f38e4
build: cargo-build-system: Strip store hash from vendor-dir.
* guix/build/cargo-build-system.scm (configure): When copying the
sources into the vendor-dir strip off the hash before the package name.
2019-09-12 20:22:46 +03:00
Mark H Weaver
65542a8852
Merge branch 'master' into core-updates 2019-09-06 20:46:00 -04:00
Pierre Neidhardt
01e38cc426
build-system/asdf: Add option to compress programs.
* guix/build/lisp-utils.scm (build-program): Add `compress?' key argument.
(generate-executable-for-system): Same.
(generate-executable): Same.
2019-09-05 09:56:21 +02:00
nixo
a44a535ebe
build: Add julia-build-system.
* guix/build/julia-build-system.scm: New file.
* guix/build-system/julia.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document julia-build-system.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2019-09-04 22:17:38 +02:00
Efraim Flashner
2f43e5db1c
build/cargo-build-system: Use invoke.
* guix/build/cargo-build-system.scm (crate-src?, build, check,
install): Use 'invoke'.
2019-09-02 11:07:53 +03:00
Mark H Weaver
0481289cbc
Merge branch 'master' into core-updates 2019-08-29 17:19:18 -04:00
Efraim Flashner
3762e31b6c
build/cargo-build-system: Remove 'update-cargo-lock phase.
* guix/build/cargo-build-system.scm (update-cargo-lock): Remove
procedure.
(configure): Delete Cargo.lock file if it exists.
(%standard-phases): Remove 'update-cargo-lock.
* doc/guix.texi (Build System)[cargo-build-system]: Remove references to
the 'update-cargo-lock phase.
2019-08-28 09:41:59 +03:00
Jan Nieuwenhuizen
4f3811f6bb
guix: copy-linux-headers: Extract procedure, add headers.
* guix/build/make-bootstrap.scm (copy-linux-headers): New procedure; extract
from make-stripped-libc and add headers for Mes bootstrap.
(make-stripped-libc): Use it.
2019-08-15 14:46:03 -04:00
Marius Bakke
462ad9f56b
Merge branch 'master' into core-updates 2019-08-13 20:42:06 +02:00
Efraim Flashner
17c26b7ec5
build/cargo-build-system: Move generate-all-checksums to cargo-utils.
* guix/build/cargo-build-system.scm (generate-all-checksums): Move
procedure ...
* guix/build/cargo-utils.scm: ... to here.
2019-08-12 13:59:44 +03:00
Marius Bakke
8e7f97b9ff
Merge branch 'master' into staging 2019-08-08 00:35:37 +02:00
Ricardo Wurmus
378d94e51b
Merge remote-tracking branch 'origin/master' into wip-texlive 2019-08-06 10:07:36 +02:00
Marius Bakke
f35d313265
Merge branch 'master' into staging 2019-08-04 13:41:27 +02:00
Efraim Flashner
ac6b78488f
build/cargo-build-system: Patch cargo checksums.
* guix/build/cargo-build-system.scm (generate-all-checksums): New
procedure.
(update-cargo-lock, patch-cargo-checksums): New phases.
(%standard-phases): Add 'update=cargo-lock after 'configure and
'patch-cargo-checksums after 'patch-generated-file-shebangs.
* doc/guix.texi (Build System)[cargo-build-system]: Mention how
Cargo.lock files are handled.
2019-08-04 11:53:27 +03:00
Marius Bakke
6a2e54236e
Merge branch 'master' into core-updates 2019-07-31 14:28:56 +02:00
Leo Famulari
0c3c597d2e
gnu: Update default Go compiler to Go 1.12.
* gnu/packages/golang.scm (go): Update to go-1.12.
* guix/build/go-build-system.scm (setup-go-environment): Set $GOCACHE.
2019-07-29 14:57:07 -04:00
Hartmut Goebel
cbad3570db
guix: ant-build-system: Put dummy project-name into default build.xml.
Without this, ant reported error messages like
Target "tests" does not exist in the project "null".
Simple using the jar-name is a good compromise.

* guix/build/ant-build-system.scm (default-build.xml): Add attribute
  to sxml expression.
2019-07-25 10:21:45 +02:00
Hartmut Goebel
a331623931
guix: ant-build-system: Use ant-task "jar" instead of executing "jar".
* guix/build/ant-build-system.scm (default-build.xml): Change XML for
  target "jar" to use ant-task "jar" instead of "exec".
2019-07-25 10:21:44 +02:00
Ricardo Wurmus
6d668a16be
build: svn-fetch: Use "svn export".
* guix/build/svn.scm (svn-fetch): Use "svn export" instead of "svn checkout"
because it does not include the .svn directory and allows us to fetch single
files.
2019-07-23 21:43:24 +02:00
Ludovic Courtès
96783ed627
syscalls: 'define-as-needed' does not re-export local variables.
Fixes <https://bugs.gnu.org/36723>.
Reported by Timothy Sample <samplet@ngyro.com>.

* guix/build/syscalls.scm (define-as-needed): Rewrite to use lower-level
module primitives; define VARIABLE only if it's not already defined to
avoid "re-exporting local variable" error.
2019-07-19 00:52:36 +02:00
Ludovic Courtès
64de896a71
Merge branch 'master' into core-updates 2019-07-17 15:51:10 +02:00
Robert Vollmert
4fde0030d4
build/cargo-build-system: Use bundled json instead of guile-json.
* guix/build/cargo-build-system.scm: Use (gnu build json) instead
of (json parser).
* guix/build-system/cargo.scm: Import (gnu build json) instead of
(json parser).

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-07-16 09:54:12 +02:00
Robert Vollmert
c82c16a6f3
build/cargo-build-system: Set CARGO_HOME early.
* guix/build/cargo-build-system.scm (configure): Set CARGO_HOME.
(install): No longer set CARGO_HOME.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-07-16 09:52:07 +02:00
Ludovic Courtès
456c7ade09
syscalls: Use 'define-as-needed' for 'AT_' constants introduced in Guile 2.2.5.
* guix/build/syscalls.scm (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR)
(AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, AT_EMPTY_PATH): Define using
'define-as-needed'.
2019-07-15 10:00:12 +02:00
Ludovic Courtès
38302bd939
compile: Report the name of the file that cannot be compiled.
Fixes <https://bugs.gnu.org/36640>.
Reported by Robert Vollmert <rob@vllmrt.net>.

* guix/build/compile.scm (call/exit-on-exception): Add 'file' parameter
and honor it.
(exit-on-exception): Likewise.
(compile-files): Pass FILE to 'exit-on-exception'.
2019-07-15 10:00:12 +02:00
Julien Lepiller
a4bb189210
Revert "guix: node-build-system: Use guile-json instead of a custom parser."
The effect of this change was to import the (json parser) from the host
side into the build side. The solution here would be to do the equivalent
of ‘with-extensions’ for gexps. Since we don't use gexps for build
systems just yet, revert this for now.

This reverts commit 8eb0ba532e.
2019-07-14 20:18:07 +02:00
Julien Lepiller
8eb0ba532e
guix: node-build-system: Use guile-json instead of a custom parser.
* guix/build/json.scm: Remove file.
* Makefile.am: Remove it.
* guix/build/node-build-system.scm: Use (json parser) instead of (guix build json).
* guix/build-system/node.scm: Idem.
2019-07-14 14:57:46 +02:00
Jelle Licht
09a1f92f61
build: Add node-build-system.
* guix/build/node-build-system.scm: New file.
* guix/build-system/node.scm: New file.
* guix/build/json.scm: New file.
* doc/guix.texi: Document it.
* Makefile.am: Added new files.

Co-Authored-By: Julien Lepiller <julien@lepiller.eu>
2019-07-14 12:20:48 +02:00
Leo Famulari
6005440d98
build-system/go: Fix typo.
* guix/build/go-build-system.scm (install): Fix typo.
2019-07-13 19:51:08 -04:00
Ludovic Courtès
e429566fbb
build: Use '-Wshadowed-toplevel' only when supported.
* guix/build/compile.scm (supported-warning-type?): New procedure.
(%warnings): Remove 'unsupported-warning', though removing it doesn't
make any difference.  Define 'optional', and use it to determine whether
to include 'shadowed-toplevel'.
2019-07-12 23:54:19 +02:00
Marius Bakke
4fb9165515
Merge branch 'staging' into core-updates 2019-07-02 20:18:16 +02:00
Marius Bakke
209214aaef
gnu: make-bootstrap: Remove obsolete header file.
* guix/build/make-bootstrap.scm (copy-linux-headers): Do not install 'a.out.h'.
2019-07-02 01:06:30 +02:00
Marius Bakke
2528006581
build-system/meson: Do not inherit the 'bootstrap' phase.
* guix/build/meson-build-system.scm (%standard-phases): Remove 'bootstrap'.
* gnu/packages/glib.scm (glib)[arguments]: Adjust accordingly.
2019-06-30 17:06:42 +02:00
Tobias Geerinckx-Rice
87a90486ca
download: Remove hydra from content-addressed URL list
* guix/build/download-nar.scm (urls-for-item): Remove
mirror.hydra.gnu.org.
* guix/download.scm (%content-addressed-mirrors): Likewise.
2019-06-29 14:31:23 +02:00
Ludovic Courtès
5cc1075a76
Merge branch 'master' into core-updates 2019-06-27 23:33:48 +02:00
Ludovic Courtès
4593f5a654
syscalls: Add 'terminal-rows'.
* guix/build/syscalls.scm (terminal-dimension): New procedure.
(terminal-columns): Rewrite in terms of 'terminal-dimension'.
(terminal-rows): New procedure.
* tests/syscalls.scm ("terminal-rows"): New test.
2019-06-27 11:14:40 +02:00
Ludovic Courtès
77c2899cd4
compile: Enable 'shadowed-toplevel' warning.
* guix/build/compile.scm (%warnings): Add 'shadowed-toplevel'.
2019-06-25 17:41:24 +02:00
Ludovic Courtès
9c2563a80b
build-system/python: Export 'python-version'.
* guix/build/python-build-system.scm (get-python-version): Rename to...
(python-version): ... this.  Update callers.  Make public.
* gnu/packages/gstreamer.scm (python-gst)[arguments]: Adjust accordingly.
* gnu/packages/machine-learning.scm (ghmm)[arguments]: Likewise.
* gnu/packages/openldap.scm (389-ds-base)[arguments]: Import (guix
build python-build-system).  Use 'python-version'.
* gnu/packages/package-management.scm (conda)[arguments]: Use
'python-version'.
2019-06-21 18:18:15 +02:00
Marius Bakke
6cb1ef9ea2
Merge branch 'staging' into core-updates 2019-06-20 23:38:56 +02:00
Ludovic Courtès
45d46223f9
utils: Add 'invoke/quiet'.
* gnu/build/bootloader.scm (G_): Remove.
(open-pipe-with-stderr, invoke/quiet): Move to...
* guix/build/utils.scm: ... here.  Use 'let-values' instead of
'define-values' because Guile 2.0 (the bootstrap Guile) doesn't know
about 'define-values'.
* po/guix/POTFILES.in: Remove gnu/build/bootloader.scm, and add
guix/build/utils.scm.
* tests/build-utils.scm: Remove import of (gnu build bootloader).
2019-06-17 16:13:36 +02:00
Marius Bakke
a60dbad3bc
Merge branch 'staging' 2019-06-15 09:46:12 +02:00
Ludovic Courtès
cfd4e4d06e
build-system/gnu: Make 'first-subdirectory' deterministic.
Fixes <https://bugs.gnu.org/35387>.
Reported by Christopher Baines <mail@cbaines.net>.

* guix/build/gnu-build-system.scm (first-subdirectory): Rewrite using
'scandir' so that the result is deterministic.
2019-06-14 23:02:28 +02:00
Robert Vollmert
ed8d3f33a5
build-system/haskell: Generate Setup.hs if needed.
The default Setup.hs is boilerplate that is frequently left out of
source packages.  Several packages already add a phase to generate it,
so moving this phase to the build system is just factoring out an
existing pattern.

See <https://github.com/phadej/time-compat/issues/4>.

* guix/build/haskell-build-system.scm (generate-setuphs): New procedure.
(%standard-phases): Add it after 'unpack'.
* gnu/packages/haskell.scm (ghc-foundation, ghc-inline-c,
ghc-inline-c-cpp, ghc-rio): Remove 'arguments'.

Signed-off-by: Timothy Sample <samplet@ngyro.com>
2019-06-13 13:30:24 -04:00
Robert Vollmert
5f9f2c82e6
build-system/haskell: Fix Haddock phase docstring.
* guix/build/haskell-build-system.scm (haddock): Fix docstring.

Signed-off-by: Timothy Sample <samplet@ngyro.com>
2019-06-13 13:30:23 -04:00
Ludovic Courtès
d9bbfe042e
Merge branch 'master' into core-updates 2019-06-13 13:24:35 +02:00
Ivan Petkov
d608e231e3
build-system/cargo: Don't copy source as an output.
* guix/build-system/cargo.scm: (cargo-build)[build-expression->derivation]:
Don't add "src" output.
* guix/build/cargo-build-system.scm: (install-source): Delete it.
(%standard-phases): Delete 'install-source.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
2019-06-11 18:05:44 -07:00
Ivan Petkov
efdf2ae14e
build-system/cargo: Use sources from package sources.
* guix/build/cargo-build-system.scm (crate-src?): New procedure.
(configure): Use the new procedure to expand crate tarballs in the vendor
directory.

Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
2019-06-11 18:05:44 -07:00