summaryrefslogtreecommitdiff
path: root/guix/build/gnu-build-system.scm
Commit message (Collapse)AuthorAge
* build: gnu-build-system: Adjust NOCONFIGURE variable.Efraim Flashner2020-02-16
| | | | | | | This ia a follow-up to 481a0f1a7ceac666a011b28324220584ead07698. * guix/build/gnu-build-system.scm (bootstrap): Set NOCONFIGURE for all bootstrap scripts. Clean up variable after use.
* build-system/gnu: Don't try executing directories in bootstrap phase.Brendan Tildesley2020-02-16
| | | | | | | | * 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>
* build: gnu-build-system: Don't run configure during bootstrap.Efraim Flashner2020-02-16
| | | | | * guix/build/gnu-build-system.scm (bootstrap): Add NOCONFIGURE environment variable before running bootstrap scripts.
* build-system/gnu: Make 'first-subdirectory' deterministic.Ludovic Courtès2019-06-14
| | | | | | | | 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.
* build-system/gnu: Copy license files to all the outputs.Ludovic Courtès2019-03-10
| | | | | | | | | Fixes <https://bugs.gnu.org/34702>. Reported by Leo Famulari <leo@famulari.name>. * guix/build/gnu-build-system.scm (install-license-files)[copy-to-directories]: New procedure. Call it to copy license files to all the outputs.
* build-system/gnu: Always look for license files in the source tree.Ludovic Courtès2019-03-10
| | | | | | | | | Fixes <https://bugs.gnu.org/31103>. * guix/build/gnu-build-system.scm (install-license-files): Add #:out-of-source?. [find-source-directory]: New procedure. Use it to Determine the source directory and look for license files there.
* build-system/gnu: Report invocation errors in a human-friendly way.Ludovic Courtès2019-01-29
| | | | | | * guix/build/utils.scm (report-invoke-error): New procedure. * guix/build/gnu-build-system.scm (gnu-build): Guard against 'invoke-error?'.
* utils: Switch to the new 'setvbuf' API.Ludovic Courtès2019-01-29
| | | | | | | * guix/build/utils.scm (setvbuf) [(and guile-2 (not guile-2.2))]: New procedure. (remove-store-references): Use the 2.2 'setvbuf' API style. * guix/build/gnu-build-system.scm (gnu-build): Likewise.
* build-system/gnu: If a phase returns #f, the build fails.Mark H Weaver2018-08-03
| | | | | | | | Fixes <https://bugs.gnu.org/31974>. Introduced by commit d8a3b1b9e847d4a44d2695f95af77170d4d2788f. * guix/build/gnu-build-system.scm (gnu-build): Use 'every' instead of 'for-each'.
* ld-wrapper: Allow linking with non-store libraries by default.Ludovic Courtès2018-03-29
| | | | | | | | | | This was suggested on several occasions, notably <https://bugs.gnu.org/24544>. * gnu/packages/ld-wrapper.in (%allow-impurities?): Default to #t and parse the value of 'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'. * guix/build/gnu-build-system.scm (set-paths): Set 'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'.
* build-system/gnu: Fix typo.Ludovic Courtès2018-03-20
| | | | | * guix/build/gnu-build-system.scm (dump-file-contents): Fix typo in 'string-pad' argument.
* build-system/gnu: Dump test suite logs upon 'check' failure.Ludovic Courtès2018-03-20
| | | | | | | | | Suggested by Mark H Weaver <mhw@netris.org>. * guix/build/gnu-build-system.scm (dump-file-contents): New procedure. (%test-suite-log-regexp): New variable. (check): Add #:test-suite-log-regexp. Catch 'invoke-error?' and call 'dump-file-contents' upon error.
* build-system/gnu: Tolerate errors during the 'strip' phase.Mark H Weaver2018-03-16
| | | | | | | | This is a followup to commit 9a87649c863e1ff8b073b356875eb05eecedbcf7. * guix/build/gnu-build-system.scm (strip)[strip-dir]: If an invoke error occurs, issue a warning and continue to the next file. This restores the tolerance of stripping errors prior to commit 9a87649.
* gnu-build: Issue a warning unless every phase returns #t.Mark H Weaver2018-03-16
| | | | | * guix/build/gnu-build-system.scm (gnu-build): Issue a warning if a phase returns a value other than #t.
* build-system/gnu: Return a boolean from all phase procedures.Mark H Weaver2018-03-16
| | | | | | * guix/build/gnu-build-system.scm (patch-source-shebangs) (patch-generated-file-shebangs, strip): Return #t. (validate-runpath): Raise an exception if validation fails. Never return #f.
* build-system/gnu: Use invoke instead of system*.Mark H Weaver2018-03-16
| | | | | * guix/build/gnu-build-system.scm (unpack, configure, build, check, install) (strip, compress-documentation): Use invoke and remove vestigial plumbing.
* build-system/gnu: Add 'bootstrap' phase.Ludovic Courtès2018-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This factorizes what has become a widespread idiom. * guix/build/gnu-build-system.scm (%bootstrap-scripts): New variable. (bootstrap): New procedure. (%standard-phases): Add it after 'unpack'. * guix/build/ant-build-system.scm (%standard-phases): Delete 'bootstrap. * guix/build/asdf-build-system.scm (%standard-phases/source) (%standard-phases): Likewise. * guix/build/cargo-build-system.scm (%standard-phases): Likewise. * guix/build/cmake-build-system.scm (%standard-phases): Likewise. * guix/build/dub-build-system.scm (%standard-phases): Likewise. * guix/build/emacs-build-system.scm (%standard-phases): Likewise. * guix/build/font-build-system.scm (%standard-phases): Likewise. * guix/build/go-build-system.scm (%standard-phases): Likewise. * guix/build/haskell-build-system.scm (%standard-phases): Likewise. * guix/build/minify-build-system.scm (%standard-phases): Likewise. * guix/build/ocaml-build-system.scm (%standard-phases): Likewise. * guix/build/perl-build-system.scm (%standard-phases): Likewise. * guix/build/python-build-system.scm (%standard-phases): Likewise. * guix/build/r-build-system.scm (%standard-phases): Likewise. * guix/build/ruby-build-system.scm (%standard-phases): Likewise. * guix/build/scons-build-system.scm (%standard-phases): Likewise. * guix/build/texlive-build-system.scm (%standard-phases): Likewise. * guix/build/waf-build-system.scm (%standard-phases): Likewise. * gnu/packages/audio.scm (faad2)[arguments]: Replace 'bootstrap. (soundtouch, cuetools, bluez-alsa): Remove 'arguments'. (cava)[arguments]: Replace 'bootstrap. * gnu/packages/backup.scm (rdup): Remove 'bootstrap. * gnu/packages/bioinformatics.scm (seek)[arguments]: Replace 'bootstrap. * gnu/packages/bioinformatics.scm (htslib-for-sambamba): Remove 'arguments'. * gnu/packages/ci.scm (hydra, cuirass): Remove 'bootstrap'. * gnu/packages/crypto.scm (libb2): Remove #:phases. * gnu/packages/databases.scm (guile-wiredtiger): Likewise. * gnu/packages/debug.scm (stress-make): Remove 'bootstrap'. * gnu/packages/documentation.scm (asciidoc): Likewise. * gnu/packages/fontutils.scm (libuninameslist): Remove 'arguments'. * gnu/packages/ftp.scm (weex): Remove 'arguments'. * gnu/packages/game-development.scm (ois): Remove 'arguments'. * gnu/packages/games.scm (pioneer): Remove 'bootstrap. * gnu/packages/gnome.scm (vte-ng, byzanz): Replace 'bootstrap. (arc-theme): Remove 'arguments'. (faba-icon-theme): Remove 'bootstrap. (arc-icon-theme): Remove 'arguments'. * gnu/packages/gnunet.scm (guile-gnunet): Likewise. * gnu/packages/gtk.scm (guile-rsvg): Likewise. * gnu/packages/guile.scm (mcron2): Remove 'bootstrap. (guile-bash): Remove #:phases. (guile-git): Remove 'bootstrap. (guile-syntax-highlight): Remove 'arguments'. (guile-sjson): Likewise. * gnu/packages/java.scm (classpath-devel): Remove 'bootstrap. * gnu/packages/kodi.scm (libdvdnav/kodi) (libdvdread/kodi, libdvdcss/kodi): Likewise. * gnu/packages/libreoffice.scm (hunspell): Remove 'arguments'. * gnu/packages/libusb.scm (hidapi): Likewise. * gnu/packages/linux.scm (bridge-utils): Rename 'bootstrap' to 'patch-stuff'; move it before 'bootstrap', without autoreconf invocation. (eudev): Rename 'bootstrap' to 'patch-file-names', without 'autogen.sh' invocation; move it before 'bootstrap. (gpm): Replace 'bootstrap'. (f2fs-tools): Remove 'arguments'. (rng-tools): Remove #:phases. * gnu/packages/messaging.scm (hexchat): Rename 'bootstrap' to 'copy-intltool-makefile'; remove "autoreconf" invocation and move before 'bootstrap'. (libmesode): Remove 'arguments'. (libstrophe): Likewise. * gnu/packages/microcom.scm (microcom): Likewise. * gnu/packages/networking.scm (libnet): Remove 'bootstrap. * gnu/packages/onc-rpc.scm (libnsl): Remove 'arguments'. * gnu/packages/package-management.scm (guix): Replace 'bootstrap. * gnu/packages/sawfish.scm (librep): Remove 'arguments'. * gnu/packages/version-control.scm (findnewest): Likewise. * gnu/packages/video.scm (liba52, handbrake, motion): Replace 'bootstrap. * gnu/packages/web.scm (fcgiwrap): Remove #:phases. (tidy): Replace 'bootstrap. (gumbo-parser): Remove #:phases. * gnu/packages/wget.scm (wget2): Replace 'bootstrap. * gnu/packages/wm.scm (i3lock-color): Remove #:phases. * gnu/packages/xdisorg.scm (xclip): Likewise. * gnu/packages/xml.scm (libxls): Replace 'bootstrap'. * gnu/packages/xorg.scm (xf86-video-freedreno) (xf86-video-intel): Remove #:phases. * gnu/packages/zile.scm (zile-on-guile): Replace 'bootstrap.
* build-system/gnu: Add 'install-license-files' phase.Ludovic Courtès2017-11-08
| | | | | | | | | | | Suggested by Dave Love <fx@gnu.org>. * guix/build-system/gnu.scm (%license-file-regexp): New variable. (gnu-build): Add #:license-file-regexp and use it. (gnu-cross-build): Likewise. * guix/build/gnu-build-system.scm (%license-file-regexp): New variable. (install-license-files): New procedure. (%standard-phases): Add it.
* build-system/gnu: Work around 'time-monotonic' bug in Guile 2.2.2.Ludovic Courtès2017-06-11
| | | | | | | Fixes <http://bugs.gnu.org/27303>. Reported by Leo Famulari <leo@famulari.name>. * guix/build/gnu-build-system.scm (time-monotonic) [guile-2.2]: Define.
* build-system/gnu: 'compress-documentation' phase handles double symlinks.Maxim Cournoyer2017-05-30
| | | | | | | | | | | | | | The compress-documentation phase was breaking recursive symbolic links used for manuals, which was made visible by the `find-files' call in the recently added `manual-database' profile hook. See <http://bugs.gnu.org/26771>. * guix/build/gnu-build-system.scm (compress-documentation) [points-to-symbolic-link?]: New procedure. [maybe-compress-directory]: Use `points-to-symbolic-link?' to filter out symbolic links that shouldn't be retargetted, and re-order the calls to `retarget-symlink' and `documentation-compressor'. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* utils: Add helper method to make files writable.Marius Bakke2017-01-26
| | | | | | * gnu/build/activation.scm (make-file-writable): Move this to ... * guix/build/utils.scm (make-file-writable): ... here. Export it. * guix/build/gnu-build-system.scm (strip): Use it.
* build-system/gnu: Add 'reset-gzip-timestamps' phase.Ludovic Courtès2017-01-26
| | | | | | * guix/build/gnu-build-system.scm (reset-gzip-timestamps): New procedure. (%standard-phases): Add it.
* build-system/gnu: 'strip' phase now skips symlinks.Ludovic Courtès2017-01-26
| | | | | | | | | | This avoids a situation where the "debug" output would contain separate (and different) .debug files for "libfoo.so" and "libfoo.so.0.0", even though "libfoo.so" is actually a symlink to "libfoo.so.0.0". * guix/build/gnu-build-system.scm (strip): Remove 'file-exists?' call in 'for-each' lambda. Pass a predicate to 'find-files' to restrict the result to regular files.
* build-system/gnu: Make libraries writable before stripping.Marius Bakke2016-11-26
| | | | | * guix/build/gnu-build-system.scm (strip)[strip-dir]: Change mode of files before running strip-command.
* build-system/gnu: Add 'patch-dot-desktop-files' phase.John Darrington2016-10-01
| | | | | | | | * guix/build/gnu-build-system.scm (patch-dot-desktop-files): New procedure. (%standard-phases): Add it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* build-system/gnu: Do not patch symlinks in the source.Ludovic Courtès2016-09-12
| | | | | | | | | | This is a followup to 13a9feb5b64fd819eaed38a17da0284bbe2b8d9. * guix/build/gnu-build-system.scm (patch-source-shebangs): Remove call to 'remove'. Pass a second argument to 'find-files' to filter out symlinks; pass #:stat lstat. (patch-generated-file-shebangs): Likewise, and also filter out non-executable files.
* build-system/gnu: 'strip' phase lists files in sorted order.Ludovic Courtès2016-09-01
| | | | | | | | | This fixes a bug whereby the choice between stripping 'libfoo.so.0.1.2' and stripping 'libfoo.so' (the symlink) would be non-deterministic. * guix/build/gnu-build-system.scm (strip)[strip-dir]: Use 'find-files' instead of 'file-system-fold' so that files are picked in deterministic order.
* build-system/gnu: Do not patch symlinks.Jan Nieuwenhuizen2016-02-09
| | | | | | | | | This fixes location-aware scripts. * guix/build/gnu-build-system.scm (patch-shebangs)[list-of-files]: Use 'lstat' instead of 'stat'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build-system/gnu: Add 'set-SOURCE-DATE-EPOCH' phase.Ludovic Courtès2016-01-05
| | | | | | | | | | | | This phase is inherited by other build systems, which ensures 'SOURCE_DATE_EPOCH' is always set in practice. * guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Remove. (%standard-phases): Don't add it. * guix/build/gnu-build-system.scm (set-SOURCE-DATE-EPOCH): New procedure. (%standard-phases): Add it. (gnu-build): Remove 'setenv' call for "SOURCE_DATE_EPOCH".
* build-system/gnu: Use the long option name for deterministic archives.Ludovic Courtès2016-01-01
| | | | | | | | | This is a followup to 3eb34c6. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use "--enable-deterministic-archives" instead of "-D" to work around Binutils bug <https://sourceware.org/bugzilla/show_bug.cgi?id=17671>. * guix/build/gnu-build-system.scm (strip): Likewise.
* build-system/gnu: Always pass "-D" to strip/objcopy.Ludovic Courtès2015-12-18
| | | | | | | * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add "-D" to #:strip-flags. * guix/build/gnu-build-system.scm (strip): Likewise. Also pass "-D" to OBJCOPY-COMMAND.
* build-system/gnu: Set 'SOURCE_DATE_EPOCH'.Alex Kost2015-11-14
| | | | | | | Suggested by Ludovic Courtès <ludo@gnu.org>. * guix/build/gnu-build-system.scm (gnu-build): Set SOURCE_DATE_EPOCH for deterministic builds.
* Use "normalized codesets" everywhere.Ludovic Courtès2015-10-04
| | | | | | | | | | | | | | | In other words, change "xx_YY.UTF-8" to "xx_YY.utf8". * guix/profiles.scm (ca-certificate-bundle): Use "en_US.utf8" instead of "en_US.UTF-8". * guix/packages.scm (patch-and-repack): Likewise. * guix/build/gnu-build-system.scm (install-locale): Likewise. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise. * gnu/packages/python.scm (python-ipython): Likewise. * gnu/packages/gawk.scm (gawk): Likewise. * build-aux/hydra/demo-os.scm: Likewise. * gnu/packages/guile.scm (guile-ncurses)[arguments]: Remove 'change-locale' phase.
* utils: Add 'every*'.Ludovic Courtès2015-10-03
| | | | | * guix/build/gnu-build-system.scm (every*): Move to... * guix/build/utils.scm (every*): ... here. New procedure.
* build-system/gnu: Use monotic time to measure elapsed time.Ludovic Courtès2015-08-30
| | | | | | | | * guix/build/gnu-build-system.scm (gnu-build)[elapsed-time]: New procedure. Use it, and use (current-time time-monotonic) instead of (gettimeofday). Show one digit after the comma for the elapsed time.
* build-system/gnu: Pass --build=<triplet> to configure by default.Mark H Weaver2015-07-13
| | | | | | | * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Accept #:build keyword argument. Pass it to 'gnu-build' on the build side. * guix/build/gnu-build-system.scm (configure): Accept #:build keyword argument. Unless it is false, pass --build to configure.
* build-system/gnu: #:validate-runpath? now defaults to #t.Ludovic Courtès2015-04-23
| | | | | * guix/build/gnu-build-system.scm (validate-runpath): Change default value of VALIDATE-RUNPATH? to #t.
* build-system/gnu: Gracefully handle dangling symlinks.Ludovic Courtès2015-04-23
| | | | | | | | | Fixes <http://bugs.gnu.org/20081>. Reported by Tomáš Čech <tcech@suse.cz>. * guix/build/gnu-build-system.scm (patch-source-shebangs): Remove files that don't pass 'file-exists?'. (patch-generated-file-shebangs): Likewise.
* build-system/gnu: Add docstring to 'delete-info-dir-file'.Federico Beffa2015-04-06
| | | | * guix/build/gnu-build-system.scm (delete-info-dir-file): Add docstring.
* build-system/gnu: Add 'delete-info-dir-file' phase.Federico Beffa2015-04-06
| | | | | * guix/build/gnu-build-system.scm (delete-info-dir-file): New procedure. (%standard-phases): Use it.
* build-system/gnu: Add 'validate-runpath' phase.Ludovic Courtès2015-04-01
| | | | | | | | | | | | * guix/build/gnu-build-system.scm (every*, validate-runpath): New procedures. (%standard-phases): Add 'validate-runpath'. * guix/build-system/gnu.scm (%gnu-build-system-modules): Add (guix build gremlin) and (guix elf). (gnu-build): Add #:validate-runpath?. [builder]: Pass it. (gnu-cross-build): Likewise. * gnu/packages/base.scm (glibc)[arguments]: Add #:validate-runpath? #f.
* Revert "build-system/gnu: Keep the sloppy conversion strategy during bootstrap."Ludovic Courtès2015-03-01
| | | | | | This reverts commit b479c3ddaf85c831e34888229849bc1ce34419de. This commit was the result of an incorrect characterization of the problem; see the log of commit 87c8b92 for details.
* build-system/gnu: Keep the sloppy conversion strategy during bootstrap.Ludovic Courtès2015-03-01
| | | | | | | * 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>.
* packages: Set the port conversion strategy to 'error'.Ludovic Courtès2015-02-28
| | | | | | | | 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.
* build-system/gnu: Set $LC_ALL (or similar) to the chosen locale.Ludovic Courtès2015-02-27
| | | | | | | 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.
* build-system/gnu: Add 'install-locale' phase.Ludovic Courtès2015-02-26
| | | | | | | | * 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.
* build-system/gnu: Add support for zip archives.Ludovic Courtès2015-02-26
| | | | | | | | 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'.
* build-system/gnu: Patch /usr/bin/file in all 'configure' files.Ludovic Courtès2015-01-09
| | | | | | | | * 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'.
* build-system/gnu: Use executables from the target inputs in 'patch-shebangs'.Ludovic Courtès2015-01-04
| | | | | | | | | 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'.
* gnu: Revert use of '--strip-all'.Ludovic Courtès2014-12-29
| | | | | | | | This reverts commits f05bdc9412135f34a1c417edc203c35cd005d0d5 and 856ae5e6c71a1283a414d33e638051f95d3cce35. This broke all sorts of things. See <http://hydra.gnu.org/eval/102058>, for example.