Commit Graph

1113 Commits

Author SHA1 Message Date
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
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
17919a58012c38052133ed029450fdb98d01fb5c.

* 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
189be331acfda1c242a9c85fca8d2a0356742f48.

* 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
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 0d371c633f7308cfde2432d6119d386a5c63198c.

* 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
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 1ab9e483391f8b62b873833ea71cb0074efa03e7.

* 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