Ludovic Courtès
bbe7a2ce0c
Revert "build-system/gnu: Keep the sloppy conversion strategy during bootstrap."
...
This reverts commit b479c3ddaf
.
This commit was the result of an incorrect characterization of the
problem; see the log of commit 87c8b92
for details.
2015-03-01 17:05:41 +01:00
Ludovic Courtès
b479c3ddaf
build-system/gnu: Keep the sloppy conversion strategy during bootstrap.
...
* guix/build/gnu-build-system.scm (gnu-build): Leave
%DEFAULT-PORT-CONVERSION-STRATEGY unchanged when 'string->bytevector'
fails to convert to ISO-8859-1. This is an attempt to work around the
build failures at <http://hydra.gnu.org/build/263002 >.
2015-03-01 00:23:07 +01:00
Ludovic Courtès
4db87162e6
packages: Set the port conversion strategy to 'error'.
...
Suggested by Mark H Weaver.
* guix/build/gnu-build-system.scm (gnu-build): Set
%DEFAULT-PORT-CONVERSION-STRATEGY to 'error.
* guix/packages.scm (patch-and-repack)[builder]: Likewise.
2015-02-28 01:10:24 +01:00
Ludovic Courtès
251e8b2ee8
build-system/gnu: Set $LC_ALL (or similar) to the chosen locale.
...
Suggested by Mark H Weaver.
* guix/build/utils.scm (locale-category->string): New procedure.
* guix/build/gnu-build-system.scm (install-locale): Add 'setenv' call.
2015-02-27 15:08:37 +01:00
Ludovic Courtès
5335c56e8e
build-system/gnu: Add 'install-locale' phase.
...
* guix/build/gnu-build-system.scm (install-locale): New procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build): Add #:locale and pass it to
the build script.
(gnu-cross-build): Likewise.
2015-02-26 23:36:55 +01:00
Ludovic Courtès
cd0385b61a
build-system/gnu: Add support for zip archives.
...
Fixes <http://bugs.gnu.org/19866 >.
Reported by Andreas Enge <andreas@enge.fr>.
* guix/build/gnu-build-system.scm (unpack): Use 'unzip' when SOURCE ends
in '.zip'.
2015-02-26 22:48:33 +01:00
Ludovic Courtès
4eb01e5442
build-system/gnu: Patch /usr/bin/file in all 'configure' files.
...
* guix/build/utils.scm (patch-/usr/bin/file): New procedure.
* guix/build/gnu-build-system.scm (patch-usr-bin-file): Rewrite using
it. Patch all the files returned by 'find-files' that are executable.
* gnu/packages/gawk.scm (gawk)[arguments]: Remove use of 'substitute*'
for 'extension/configure'.
2015-01-09 23:29:20 +01:00
Ludovic Courtès
ac70048be2
build-system/gnu: Use executables from the target inputs in 'patch-shebangs'.
...
Fixes <http://bugs.gnu.org/18895 >.
* guix/build/gnu-build-system.scm (patch-shebangs): Add #:inputs
parameter. Remove 'bindirs'. Add 'bin-directories',
'output-bindirs', and 'input-bindirs'. Use them instead of (getenv
"PATH") to as the argument to 'patch-shebang'.
2015-01-04 18:16:16 +01:00
Ludovic Courtès
7da473b757
gnu: Revert use of '--strip-all'.
...
This reverts commits f05bdc9412
and 856ae5e6c7
.
This broke all sorts of things. See <http://hydra.gnu.org/eval/102058 >,
for example.
2014-12-29 21:54:12 +01:00
Ludovic Courtès
f05bdc9412
gnu: Don't use --strip-all in cases where this is problematic.
...
This is a followup to 856ae5e
. See <http://hydra.gnu.org/build/180506 >
for an example of build failure.
* guix/build/gnu-build-system.scm (strip): Add #:archive-strip-flags
parameter. Use it when (ar-file? path).
* guix/build-system/gnu.scm (gnu-build): Add #:archive-strip-flags
parameter and pass it down.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Add
#:strip-flags.
* gnu/packages/base.scm (glibc)[arguments]: Likewise.
2014-12-28 23:46:59 +01:00
Ludovic Courtès
7ec02d374d
build-support/gnu: Add support for file patterns in search paths.
...
* guix/build/utils.scm (search-path-as-list): Add #:pattern parameter
and honor it.
(set-path-environment-variable): Likewise, and pass it to
'search-path-as-list'.
* guix/packages.scm (search-path-specification->sexp): Add PATTERN slot.
* guix/build/gnu-build-system.scm (set-paths): Adjust accordingly.
2014-12-27 23:22:55 +01:00
Ludovic Courtès
856ae5e6c7
build-system/gnu: Strip with '--strip-all' instead of '--strip-debug'.
...
This saves 19% on the 'bin' directory of Coreutils, and certainly
helpful for things like Git's 'libexec' directory.
* guix/build-system/gnu.scm (gnu-build): Change default value for
#:strip-flags to '("--strip-all").
* guix/build/gnu-build-system.scm (strip): Ditto.
* gnu/packages/linux.scm (linux-libre)[arguments]: Add #:strip-flags.
2014-12-27 19:20:18 +01:00
Ludovic Courtès
6aa47e3883
build-system/gnu: Add support for non-directory search paths.
...
Partly fixes <http://bugs.gnu.org/18033 >.
* guix/build/utils.scm (search-path-as-list): Rename 'sub-directories'
parameter to 'files'. Add #:type parameter and honor it.
(set-path-environment-variable): Likewise. Pass #:type to
'search-path-as-list'.
* guix/packages.scm (search-path-specification->sexp): Add 'directory as
the last item of the tuple.
* guix/build/gnu-build-system.scm (set-paths): Add 'type' to search-path
pattern. Pass #:type to 'set-path-environment-variable'.
2014-12-27 12:25:31 +01:00
Ludovic Courtès
7cc7dec139
build-system/gnu: Add 'compress-documentation' phase.
...
* guix/build/gnu-build-system.scm (compress-documentation): New
procedure.
(%standard-phases): Add it.
2014-12-01 16:50:28 +01:00
Ludovic Courtès
d68fe74162
build-system/gnu: Add 'validate-documentation-location' phase.
...
* guix/build/gnu-build-system.scm (validate-documentation-location): New
procedure.
(%standard-phases): Add it.
2014-12-01 14:09:36 +01:00
Ludovic Courtès
f8bcf1935a
build-system/gnu: Gracefully handle dangling symlinks in the 'strip' phase.
...
* guix/build/gnu-build-system.scm (strip): Check whether 'file-exists?'
before calling 'elf-file?' and 'ar-file?'. This should fix build
failures in the presence of dangling symlinks, as in
<http://hydra.gnu.org/build/167521/nixlog/1/raw >.
2014-11-24 22:45:41 +01:00
Ludovic Courtès
e8c7fdda5d
build-system/gnu: Strip 'ar' archives as well.
...
* guix/build/gnu-build-system.scm (strip): Also strip when (ar-file?
PATH) is true.
2014-11-22 21:54:27 +01:00
Ludovic Courtès
50b87bd54b
build-system/gnu: Strip only ELF files.
...
Suggested by Mark H Weaver <mhw@netris.org>
at <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00395.html >.
* guix/build/gnu-build-system.scm (strip)[strip-dir]: Strip only
when (elf-file? PATH) is true.
2014-11-22 12:49:14 +01:00
Ludovic Courtès
e6039b9c70
utils: Export 'parallel-job-count'.
...
* guix/build/utils.scm (parallel-job-count): New procedure.
* guix/build/gnu-build-system.scm (%parallel-job-count): Remove.
(build, check): Use 'parallel-job-count' instead.
2014-11-22 12:32:32 +01:00
Mark H Weaver
8a0576f175
gnu-build-system: Add 'patch-usr-bin-file' to %standard-phases.
...
* guix/build/gnu-build-system.scm (patch-usr-bin-file): New procedure.
(%standard-phases): Add it.
2014-08-23 20:48:18 -04:00
Ludovic Courtès
8d846470f2
build-system/gnu: Reset timestamps on build tree when source is a directory.
...
* guix/build/utils.scm (copy-recursively): Add #:keep-mtime? parameter
and honor it.
* guix/build/gnu-build-system.scm (unpack): Use #:keep-mtime? #t.
* gnu/packages/admin.scm (shadow)[arguments]: Remove 'reset-timestamps'
phase.
2014-04-14 00:09:42 +02:00
Ludovic Courtès
17919a5801
build-system/gnu: Allow the source to be a directory.
...
* guix/build/gnu-build-system.scm (unpack): Check if SOURCE is a
directory, and copy it locally if it is.
* gnu/packages/libwebsockets.scm (libwebsockets)[arguments]: Remove
'unpack' phase.
2014-02-22 00:34:49 +01:00
John Darrington
c2e6516721
build-system/gnu: Set the docdir to "share/doc"
...
* guix/build/gnu-build-system.scm (configure):
Change docdir directory from "doc" to "share/doc".
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2014-02-10 22:22:53 +01:00
Ludovic Courtès
49a8b80da6
Revert "build-system/gnu: Pass --localstatedir=/var --sharedstatedir=/com."
...
This reverts commit 65529e49ff
.
2014-01-28 08:57:37 +01:00
Ludovic Courtès
65529e49ff
build-system/gnu: Pass --localstatedir=/var --sharedstatedir=/com.
...
Suggested by John Darrington <john@darrington.wattle.id.au>
and Mark H Weaver <mhw@netris.org>.
* guix/build/gnu-build-system.scm (configure): Pass --localstatedir=/var
--sharedstatedir=/com.
* gnu/packages/admin.scm (dmd): Remove 'arguments' field.
* gnu/packages/avahi.scm (avahi): Remove --localstatedir flag.
* gnu/packages/glib.scm (dbus): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/pulseaudio.scm (pulseaudio): Likewise.
2014-01-27 23:45:59 +01:00
John Darrington
db6190899e
gnu: gnu-build-system: Add CC_FOR_BUILD to configure flags.
...
* guix/build/gnu-build-system.scm: Add new configure flag: CC_FOR_BUILD=gcc
* gnu/packages/gnupg.scm, gnu/packages/guile.scm, gnu/packages/make-bootstrap.scm:
remove CC_FOR_BUILD from these package descriptions.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-12-17 21:28:07 +01:00
Ludovic Courtès
7e2b10a53f
build-system/{gnu,cmake}: Remove #:patches and #:patch-flags parameters.
...
* guix/build/gnu-build-system.scm (patch): Remove.
(%standard-phases): Remove 'patch'.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Remove
#:patches and #:patch-flags parameters.
* guix/build-system/cmake.scm (cmake-build): Likewise.
* guix/build-system/python.scm (package-with-explicit-python): Update
comment.
2013-10-10 23:15:57 +02:00
Ludovic Courtès
be58d01a7e
build-system/gnu: Write debug files to the "debug" sub-derivation, if any.
...
* guix/build/gnu-build-system.scm (strip): Add `objcopy-command' keyword
parameter.
[debug-output, debug-file-extension]: New variables.
[debug-file, make-debug-file, add-debug-link]: New procedures.
[strip-dir]: Use them.
2013-07-03 23:53:31 +02:00
Ludovic Courtès
2f41f51c40
build-system/gnu: Set #:tests? to #f when cross-compiling.
...
* guix/build/gnu-build-system.scm (check): Add `target' formal
parameter. Change `tests?' to default to (not target).
2013-06-22 16:15:23 +02:00
Ludovic Courtès
4ca968eb95
build-system/gnu: Save `environment-variables' after each phase.
...
* guix/build/gnu-build-system.scm (set-paths): Move `system' call to...
(gnu-build): ... here.
2013-06-21 00:32:07 +02:00
Ludovic Courtès
56c092ce94
build-system/gnu: Unify with (guix build-system gnu-cross-build).
...
* guix/build/gnu-build-system.scm (set-paths): Add `native-inputs' and
`native-search-paths' keyword parameters. Honor them.
(configure): Add `target' and `native-inputs' keyword parameters.
Look for Bash in NATIVE-INPUTS or INPUTS. Pass `--host' when TARGET
is true.
(strip): Add `strip-command' keyword parameter. Use it.
* guix/build/gnu-cross-build.scm: Remove.
* Makefile.am (MODULES): Adjust accordingly.
* gnu/packages/acl.scm, gnu/packages/attr.scm, gnu/packages/base.scm,
gnu/packages/bash.scm, gnu/packages/gawk.scm,
gnu/packages/gettext.scm, gnu/packages/guile.scm,
gnu/packages/libffi.scm, gnu/packages/libsigsegv.scm,
gnu/packages/linux.scm, gnu/packages/ncurses.scm,
gnu/packages/readline.scm, guix/build-system/gnu.scm: Replace
`%standard-cross-phases' by `%standard-phases'. Remove references
to (guix build gnu-cross-build).
2013-06-21 00:25:54 +02:00
Ludovic Courtès
593987671a
build-system/gnu: Fix default name for the "doc" output directory.
...
* guix/build/gnu-build-system.scm (configure)[package-name]: Drop the
prefix corresponding to the hash part of OUT.
2013-04-28 23:39:28 +02:00
Ludovic Courtès
a18eda2747
packages: Add `native-search-paths' field and honor it.
...
* guix/packages.scm (<search-path-specification>): New record type.
(search-path-specification->sexp): New procedure.
(<package>)[native-search-paths]: New field.
(package-derivation): Accumulate the search paths, and pass them
as #:search-paths toe BUILDER.
* guix/build-system/gnu.scm (gnu-build): Add #:search-paths. Compute
`implicit-search-paths'. Pass #:search-paths in BUILDER.
* guix/build-system/perl.scm (perl-build): Add #:search-paths, pass it
to BUILDER with the search paths of PERL.
* guix/build-system/cmake.scm (cmake-build): Add #:search-paths, pass it
to BUILDER.
* guix/build-system/trivial.scm (trivial-build): Add #:search-paths,
ignore it.
* guix/build/gnu-build-system.scm (set-paths): Add #:search-paths.
Remove explicit settings of CPATH, LIBRARY_PATH, and PKG_CONFIG_PATH.
Instead, walk SEARCH-PATHS and call `set-path-environment-variable'
for them.
* guix/build/perl-build-system.scm (perl-build): Remove PERL5LIB setting.
* tests/packages.scm ("search paths"): New test.
* gnu/packages/bootstrap.scm (%bootstrap-guile)[raw]: Add
#:search-paths.
(%bootstrap-gcc): Add `native-search-paths' field.
* gnu/packages/perl.scm (perl): Likewise.
* gnu/packages/pkg-config.scm (pkg-config): Likewise.
* gnu/packages/glib.scm (intltool): Remove `arguments'.
* gnu/packages/avahi.scm (avahi): Remove #:phases.
2013-03-30 22:57:03 +01:00
Ludovic Courtès
a96748bb46
build-system/gnu: Remove #:path-exclusions parameter.
...
* guix/build/gnu-build-system.scm (set-paths): Remove `path-exclusions'
parameter. Replace `relevant-input-directories' by
`input-directories'.
* guix/build-system/gnu.scm (gnu-build): Remove `path-exclusions'
parameter; don't pass it in BUILDER.
* guix/build-system/cmake.scm (cmake-build): Likewise.
2013-03-30 21:46:59 +01:00
Andreas Enge
8689a1908a
guix: build: Add "share/pkgconfig" to PKG_CONFIG_PATH, as used by xorg.
...
* guix/build/gnu-build-system.scm (set-paths): Add "share/pkgconfig"
to PKG_CONFIG_PATH.
2013-03-04 10:14:34 +01:00
Ludovic Courtès
a06a99ff77
build-system/gnu: Improve support for "lib" outputs; support "doc" outputs.
...
* guix/build/gnu-build-system.scm (configure)[package-name]: New
procedure.
When LIBDIR is true and INCLUDEDIR is false, add
--includedir=LIBDIR/include.
Add support for --docdir when a "doc" output exists.
2013-01-10 00:08:40 +01:00
Ludovic Courtès
4155e2a909
Update license headers of builder-side code.
...
Change license headers with this script:
(use-modules (guix build utils))
(fluid-set! %default-port-encoding "UTF-8")
(substitute* (cons "distro/packages/ld-wrapper.scm"
(find-files "guix/build" "\\.scm$"))
(("^([[:graph:]]+) This file is part of Guix." _ comment-start)
(string-append comment-start " This file is part of GNU Guix."))
(("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
(string-append comment-start
" GNU Guix --- Functional package management for GNU\n"))
(("^([[:graph:]]+) Guix is " _ comment-start)
(string-append comment-start " GNU Guix is "))
(("^([[:graph:]]+) along with Guix." _ comment-start)
(string-append comment-start " along with GNU Guix."))
(("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
(string-append comment-start " Copyright ©")))
* distro/packages/ld-wrapper.scm, guix/build/download.scm,
guix/build/gnu-build-system.scm, guix/build/union.scm,
guix/build/utils.scm: Update license headers.
2013-01-05 16:08:07 +01:00
Ludovic Courtès
b2adb3ae04
build-system/gnu: Add support for the "bin" output.
...
* guix/build/gnu-build-system.scm (configure): Add support for "bin"
output.
2013-01-01 16:52:27 +01:00
Ludovic Courtès
c089511288
build-system/gnu: Patch shebangs in all the source; patch SHELL in makefiles.
...
* guix/build/utils.scm (call-with-ascii-input-file): New procedure.
(patch-shebang): Use it.
(patch-makefile-SHELL): New procedure.
* guix/build/gnu-build-system.scm (patch-source-shebangs): Patch all the
files, not just executables; remove `po/Makefile.in.in' patching.
(patch-generated-files): Rename to...
(patch-generated-file-shebangs): ... this. Patch executables and
makefiles.
(%standard-phases): Adjust accordingly.
* distro/packages/autotools.scm (libtool): Remove call to `patch-shebang'.
* distro/packages/base.scm (gcc-4.7): Likewise.
(guile-final): Remove hack to skip `test-command-line-encoding2'.
* distro/packages/bash.scm (bash): Remove `pre-configure-phase'.
* distro/packages/readline.scm (readline): Likewise.
* distro/packages/ncurses.scm (ncurses): Remove `pre-install-phase'.
2012-12-21 22:31:25 +01:00
Ludovic Courtès
eca63d3df8
build-system/gnu: Patch shebangs after `configure'.
...
* guix/build/gnu-build-system.scm (patch-generated-files): New
procedure.
(%standard-phases): Add it after `configure'.
2012-12-20 23:06:34 +01:00
Ludovic Courtès
4c377e861b
build-system/gnu: Report the execution time of each phase.
...
* guix/build/gnu-build-system.scm (gnu-build): Report the success or
failure of each phase and its execution time.
2012-12-20 22:31:08 +01:00
Ludovic Courtès
c3ee7448c9
build-system/gnu: Change the order of `patch-source-shebangs' and `patch'.
...
* guix/build/gnu-build-system.scm (patch-source-shebangs): Add a newline
after the "SHELL =" line in po/Makefile.in.in.
(%standard-phases): Move `patch-source-shebangs' after `patch'.
2012-12-19 00:48:20 +01:00
Ludovic Courtès
d008415219
build-system/gnu: Patch shebangs in executable source files.
...
This allows many packages to build in a chroot that lacks /bin and
thus /bin/sh.
* guix/build/gnu-build-system.scm (patch-source-shebangs): New
procedure.
(%standard-phases): Add it.
* guix/build/utils.scm (executable-file?): New procedure.
* distro/packages/perl.scm (perl): Don't use /bin/sh to run `Configure'.
2012-12-15 16:35:26 +01:00
Ludovic Courtès
c1c94acf32
build-system/gnu: Make the error port line-buffered.
...
* guix/build/gnu-build-system.scm (gnu-build): Make the error port
line-buffered.
2012-12-15 16:01:52 +01:00
Ludovic Courtès
9d1d434cd0
build-system/gnu: Avoid using /bin/sh.
...
* guix/build/gnu-build-system.scm (configure): Add `inputs' keyword
parameter. Take Bash from there, falling back to /bin/sh. Set
`CONFIG_SHELL' and `SHELL' to that Bash. Run "bash ./configure"
instead of just "./configure".
* distro/packages/bootstrap.scm (%bootstrap-inputs): Add "bash".
* distro/packages/base.scm (gcc-boot0-wrapped): Use "bash" from
%BOOT1-INPUTS instead of /bin/sh.
2012-12-13 23:38:32 +01:00
Ludovic Courtès
db1a15314d
Support build-cores = 0; change `guix-build' to default to 0.
...
* guix/build/gnu-build-system.scm (%parallel-job-count): New variable.
(build, check): Use it instead of $NIX_BUILD_CORES.
* guix-build.in (guix-build): Default to 0 for the #:build-cores option.
2012-10-05 23:21:09 +02:00
Ludovic Courtès
2d14ef0f2c
build-system/gnu: Fix `#:path-exclusions' handling.
...
* guix/build/gnu-build-system.scm (set-paths)[relevant-input-directories]:
New procedure. Use it. This fixes #:path-exclusions handling.
2012-09-06 22:58:43 +02:00
Ludovic Courtès
d118c548b5
build-system/gnu: Really apply patches.
...
* guix/build/gnu-build-system.scm (patch): Use `--input FILE', not just
`FILE'.
2012-09-01 19:21:33 +02:00
Ludovic Courtès
dc4e02572e
build-system/gnu: Add `path-exclusions' parameter.
...
* guix/build/gnu-build-system.scm (set-paths): Add new `path-exclusions'
parameter; honor it.
* guix/build-system/gnu.scm (gnu-build): New `path-exclusions' keyword
parameter; pass it to BUILDER.
* distro/base.scm (gcc-4.7): Exclude "libc" from $LIBRARY_PATH.
2012-09-01 01:14:31 +02:00
Ludovic Courtès
877217b85a
build-system/gnu: Honor the `patch-shebangs?' and `strip-binaries?' parameters.
...
* guix/build/gnu-build-system.scm (patch-shebangs): Honor
PATCH-SHEBANGS?.
(strip): Honor STRIP-BINARIES?. Display a message from `strip-dir'.
2012-08-31 23:58:21 +02:00