Commit Graph

440 Commits (5879f0d649d5112830e8e712d8245ab8d2db5133)

Author SHA1 Message Date
Ludovic Courtès f2e4805b7e Add (guix build bournish) and use it in the initrd.
* guix/build/bournish.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/system/linux-initrd.scm (base-initrd): Add (guix build bournish)
and use it.
2016-02-08 23:46:46 +01:00
Ludovic Courtès a220b262db syscalls: 'all-network-interface-names' accepts non-alphanumeric characters.
This fixes interfaces with a dash or other characters being ignored.
Suggested by Jookia <166291@gmail.com>.

* guix/build/syscalls.scm (%interface-line): Use [[:graph:]] instead
of [[:alnum:]].
2016-02-03 11:21:11 +01:00
Eric Bavier 252ddedd4b build-system/haskell: Fix package.conf parsing.
* guix/build/haskell-build-system.scm (register)[conf-depends]: Properly
  react to EOF while reading GHC package conf files.
2016-01-19 18:01:07 -06:00
Ludovic Courtès 8c986ab120 Merge branch 'master' into core-updates 2016-01-13 18:18:48 +01:00
Ben Woodcroft 761e7042f6 ruby: Abstract out path to GEM_HOME.
Previously paths to the GEM_HOME of certain Ruby packages were
hard-coded, so packages failed to build when Ruby was updated to 2.3.0.

* guix/build/ruby-build-system.scm (gem-home): New procedure.
* gnu/packages/ruby.scm (ruby-metaclass, ruby-instantiator,
ruby-introspection, ruby-mocha, ruby-minitest-tu-shim): Use it.
2016-01-11 21:58:55 +10:00
Ben Woodcroft 7266848ace build: ruby: Remove cached gem after install.
The .gem file stored in GEM_HOME after install is both redundant and an
archive that stores timestamped files which makes builds
non-deterministic, so delete it after 'gem install'.

* guix/build/ruby-build-system.scm (install): Remove cached gem after
  install.
2016-01-06 12:42:41 +01:00
Taylan Ulrich Bayırlı/Kammer f07041f7d2 build: pull: Compile .scm files in one process.
* guix/build/pull.scm (call-with-process, report-build-progress)
(p-for-each): Remove.
(build-guix): Load and compile files in one process.
2016-01-05 23:30:30 +01:00
Ludovic Courtès 0beb65b450 build-system/gnu: Add 'set-SOURCE-DATE-EPOCH' phase.
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".
2016-01-05 15:52:42 +01:00
Ludovic Courtès 35a6dabcf1 git-download: Correctly implement recursive checkouts.
Previously, the 'git checkout' invocation would remove sub-modules that
had been initialized by 'git clone --recursive'.

* guix/build/git.scm (git-fetch): Never use "git clone --recursive".
Invoke "git submodule update --init --recursive" after "git checkout".
Remove '.git' directories as the last step.
2016-01-05 00:28:42 +01:00
Ludovic Courtès 7165a91c7d build-system/gnu: Use the long option name for deterministic archives.
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.
2016-01-01 00:49:05 +01:00
Ludovic Courtès 3eb34c631a build-system/gnu: Always pass "-D" to strip/objcopy.
* 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.
2015-12-18 23:58:51 +01:00
Ludovic Courtès e82e55e58c Merge branch 'master' into core-updates 2015-12-12 11:48:46 +01:00
Ludovic Courtès a665996f58 gnu: python: Set SOURCE_DATE_EPOCH to 1 instead of 0.
* gnu/packages/python.scm (python-2)[arguments]: Set SOURCE_DATE_EPOCH
  to 1 to match what the daemon does.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Likewise.
2015-11-29 22:59:28 +01:00
Ludovic Courtès dedc832070 gnu: python-2: Honor 'SOURCE_DATE_EPOCH'.
* gnu/packages/patches/python-2.7-source-date-epoch.patch: New file.
* gnu/packages/python.scm (python-2)[source]: Use it.
  [arguments]: Set SOURCE_DATE_EPOCH in 'patch-lib-shells' phase.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): New
  procedure.
  (%standard-phases): Add it.
* gnu-system.am (dist_patch_DATA): Add patch.
2015-11-29 22:59:28 +01:00
Ludovic Courtès 333c376c45 graft: Graft files in parallel.
* guix/build/graft.scm (rewrite-directory): Use 'n-par-for-each' instead
  of 'for-each'.
2015-11-16 14:22:58 +01:00
Ludovic Courtès 9c88f655e6 graft: Graft files in a deterministic order.
* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Change to take
  a single parameter.  Add call to 'lstat'.  Factorize result of
  'destination'.
  Use 'find-files' instead of 'file-system-fold'.
2015-11-16 14:22:58 +01:00
Alex Kost f7dbeb376b build-system/gnu: Set 'SOURCE_DATE_EPOCH'.
Suggested by Ludovic Courtès <ludo@gnu.org>.

* guix/build/gnu-build-system.scm (gnu-build): Set SOURCE_DATE_EPOCH for
  deterministic builds.
2015-11-14 21:59:37 +03:00
Ludovic Courtès 1b9aefa394 download: Always use AI_ADDRCONFIG when resolving host names.
* guix/build/download.scm (open-socket-for-uri): Always pass
  AI_ADDRCONFIG to 'getaddrinfo' as recommended in the fine Guile
  manual.
* guix/ftp-client.scm (ftp-open): Ditto.
2015-11-12 23:47:01 +01:00
Ludovic Courtès 60fd51222f download: Add timeout parameter for connections.
* guix/build/download.scm (ensure-uri): New procedure.
(current-http-proxy): New variable.
(open-socket-for-uri): Copy from Guile commit aaea5b2, but add #:timeout
parameter and use 'connect*' instead of 'connect'.
(open-connection-for-uri): Add #:timeout parameter and pass it to
'open-socket-for-uri'.
2015-11-12 23:47:00 +01:00
Eric Bavier e17d513381 gnu: ghc: Add GHC_PACKAGE_PATH native search path.
Benefits include: 'guix environment' more useful for ghc libraries, more
useful 'guix package --search-paths' for installed ghc libraries, cleaner
package recipes: no longer need to propagate runtime package dependencies.

* guix/build/haskell-build-system.scm (configure): Unset GHC_PACKAGE_PATH
  around cabal configure.
  (make-ghc-package-database): Use pattern directory search.
  (register): Install complete package database for the current package.
* gnu/packages/haskell.scm (ghc): Add native-search-paths field.
2015-10-29 17:30:18 -05:00
Eric Bavier c6e030b2e3 utils: Have search-path-as-list pattern search for directories.
* guix/build/utils.scm (search-path-as-list)[pattern]: Check requested file
  type.  Check pattern against directory names.
* guix/search-paths.scm (evaluate-search-paths)[pattern]: Remove symlink hack.
2015-10-29 17:30:18 -05:00
Paul van der Walt f862f38ade build-system/haskell: CONFIG_SHELL env variable.
For Cabal packages with "build-type: Configure", a configure shell
script is run to set up build parameters.  These scripts need the
CONFIG_SHELL environment variable to be set to function properly.

* guix/build/haskell-build-system.scm (configure): Set CONFIG_SHELL if
  necessary.
2015-10-26 10:15:14 +01:00
Ludovic Courtès 0e3cc3116d syscalls: Fix ABI mismatch for 'clone'.
Fixes <http://bugs.gnu.org/21694>.

* guix/build/syscalls.scm (clone): Change 'syscall' parameter types to
  LONG, UNSIGNED-LONG, or '*; make sure it has 6 parameters.  Adjust
  caller accordingly.
2015-10-17 11:53:25 +02:00
Mark H Weaver 319fe79dd0 Merge branch 'master' into core-updates 2015-10-07 23:55:17 -04:00
Ludovic Courtès afd3d9316c Use "normalized codesets" everywhere.
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.
2015-10-04 00:10:03 +02:00
Ludovic Courtès 57aff6476e utils: Add 'every*'.
* guix/build/gnu-build-system.scm (every*): Move to...
* guix/build/utils.scm (every*): ... here.  New procedure.
2015-10-03 14:36:12 +02:00
Ludovic Courtès fde1783087 download: Check whether HORIZONTAL ELLIPSIS can be encoded.
* guix/build/download.scm (ellipsis): New procedure.
  (store-path-abbreviation): Use it.
2015-10-01 11:28:58 +02:00
Ludovic Courtès 1007b6bf0b Merge branch 'master' into core-updates 2015-09-24 22:18:07 +02:00
Ludovic Courtès 75726135ce download: Don't abbreviate things that are not store items.
Fixes a regression introduced in a8be7b9a.

* guix/build/download.scm (store-path-abbreviation): Return STORE-PATH
  if it's not an actual store path.  Fixes an out-of-range exception
  when running tests/substitute.scm and tests/store.scm.
2015-09-24 21:54:37 +02:00
Steve Sprang 9462882889 download: Fix some minor progress-logging regressions.
* guix/build/download.scm
  (string-pad-middle): Allow resulting padded string to overflow.
  (store-url-abbreviation): Remove unnecessary procedure.
  (progress-proc): Use BASENAME as default for parameter 'abbreviation'.
  (url-fetch): Display extra newlines for readability.
2015-09-23 22:04:46 -04:00
Mark H Weaver a05c06720a emacs-build-system: Fix 'package-name-version->elpa-name-version'.
Fixes a regression introduced in b7c7c03eb5.

* guix/build/emacs-build-system.scm (package-name-version->elpa-name-version):
  Remove unused 'name' binding.  Do not abuse 'strip-store-file-name' to
  remove the "emacs-" prefix, which worked before b7c7c03eb5 but not after.
2015-09-23 17:38:47 -04:00
Mark H Weaver bd90127ad4 Merge branch 'master' into core-updates 2015-09-22 16:38:48 -04:00
Steve Sprang 47770296d2 download: Only show hours in the elapsed time if necessary.
* guix/build/download.scm
  (seconds->string): Conditionally include hours in timestamp.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-09-17 14:40:46 +02:00
Steve Sprang a8be7b9a7a substitute: Improve readability of download progress report.
* guix/build/download.scm
  (string-pad-middle, store-url-abbreviation, store-path-abbreviation):
  New procedures.
  (progress-proc): Add #:abbreviation parameter and use it.  Generate a
  better indeterminate progress string.
* guix/scripts/substitute.scm (assert-valid-narinfo): Add newlines to output.
  (process-substitution): Use byte-count->string and store-path-abbreviation.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-09-16 23:50:12 +02:00
Steve Sprang eb95ace9f1 download: Avoid type errors when formatting download progress output.
* guix/build/download.scm (nearest-exact-integer): New procedure.
  (seconds->string, byte-count->string): Use it.
2015-09-14 23:36:26 -04:00
David Thompson 5dc876231b build: ruby: Add support for tarball and directory sources.
Previously, the Ruby build system only knew how to work with gem archives,
which made it difficult to build unreleased gems from a Git repository or
released gems in tarball form.

* gnu/build/ruby-build-system.scm (gnu:unpack, gem-archive?): New procedures.
  (unpack): Use GNU build system unpack phase for non-gem sources.
  (build): Rebuild the gemspec iff the source is a gem archive.
* guix.texi ("ruby-build-system"): Mention that tarballs and directories are
  acceptable.
2015-09-14 08:29:07 -04:00
Ludovic Courtès 75710da667 Merge branch 'master' into core-updates 2015-09-13 21:28:01 +02:00
宋文武 f47fbeb23a build-system/glib-or-gtk: Don't generate 'icon-theme.cache'.
* guix/build-system/glib-or-gtk.scm (default-gtk+): Remove.
  (lower): Adjust accordingly.
* guix/build/glib-or-gtk-build-system.scm (generate-icon-cache): Remove.
  (%standard-phases): Remove 'glib-or-gtk-icon-cache' phase.
2015-09-11 20:24:30 +08:00
Steve Sprang 0c0a1f22ce build: Improve information density and appearance of download progress output.
* guix/build/download.scm (seconds->string): New function.
  (byte-count->string): New function.
  (progress-bar): New function.
  (throughput->string): Remove function.
  (progress-proc): Display base file name, elapsed time, and progress bar.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-09-08 21:47:30 +02:00
David Thompson ee78d02452 build: container: Use the same clone flags as fork(3).
The intent is to make 'clone' behave a lot more like 'primitive-fork', which
calls clone(2) with SIGCHLD, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID
flags.  Notably, running 'clone' at the REPL without these flags would break
the REPL beyond repair.

* guix/build/syscalls.scm (CLONE_CHILD_CLEARTID, CLONE_CHILD_SETTID): New
  variables.
* gnu/build/linux-container.scm (namespaces->bit-mask): Add
  CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID to bit mask.
2015-09-07 13:09:58 -04:00
David Thompson b500e7182d build: ruby: Avoid long build directory names.
Having the hash of the source gem in the source directory file name proved to
be problematic when running the test suite for the 'pg' gem that creates
UNIX-domain sockets in the source directory and exceeded the 108 character
limit on GNU/Linux systems.

* guix/build/ruby-build-system.scm (unpack): Rename unpacked gem directory to
  "gem".
2015-09-07 08:27:10 -04:00
Mark H Weaver f4ae827e26 utils: find-files: Add DIRECTORIES? and FAIL-ON-ERROR? arguments.
* guix/build/utils.scm (find-files): Add DIRECTORIES? and FAIL-ON-ERROR?
  keyword arguments.
2015-09-06 17:25:50 -04:00
Alex Kost 6480fcae24 emacs-build-system: Fix a file name of info directory.
* guix/build/emacs-build-system.scm (move-doc): Adjust to use
  "/share/info" instead of its sub-directory.
2015-09-06 12:15:51 +03:00
David Thompson cf897cbacc build: syscalls: Properly handle clone errors.
* guix/build/syscalls.scm (clone): Catch -1 return value and throw error.
2015-09-05 13:42:02 -04:00
Ricardo Wurmus f8f3bef6aa build: Add R build system.
* guix/build-system/r.scm: New file.
* guix/build/r-build-system: New file.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document r-build-system.
2015-08-31 15:39:34 +02:00
Ludovic Courtès 8c578a6094 utils: Move 'package-name->name+version' to (guix build utils).
* guix/utils.scm (package-name->name+version): Move to...
* guix/build/utils.scm (package-name->name+version): ... here.  New
  procedure.
* guix/build/emacs-build-system.scm (package-name->name+version):
  Remove.
2015-08-30 18:38:08 +02:00
Ludovic Courtès b7c7c03eb5 utils: Add 'strip-store-file-name'.
* guix/build/utils.scm (strip-store-file-name): New procedure.
* guix/build/emacs-build-system.scm (store-directory->name-version):
  Remove.  Update callers to use 'strip-store-file-name'.
* gnu/packages/gcc.scm (make-libstdc++-doc)[arguments]: Use
  'strip-store-file-name' instead of 'string-drop'.
2015-08-30 18:38:08 +02:00
Ludovic Courtès 5c962e93e5 build-system/gnu: Use monotic time to measure elapsed time.
* 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.
2015-08-30 17:07:45 +02:00
Ludovic Courtès 4cc2ed98cf utils: Add 'install-file'.
* guix/build/utils.scm (install-file): New procedure.
2015-08-29 01:25:08 +02:00
David Thompson e83c6d009f build: ruby: Rewrite build system to use gem archives.
Co-Authored-By: Pjotr Prins <pjotr.public01@thebird.nl>

* guix/build-system/ruby.scm (lower): Remove git dependency.
  (rubygems-uri): New procedure.
* guix/build/ruby-build-system (gitify): Delete.
  (unpack): Use 'gem unpack' utility.
  (check): Add docstring.
  (build): Repack modified gem.
  (install): Rebuild unpacked gem and install it.
  (%standard-phases): Remove gitify and build phases.
* gnu/packages/ruby.scm (ruby-hoe, ruby-rake-compiler, ruby-i18n,
  ruby-rspec-support, ruby-rspec-core, ruby-diff-lcs-for-rspec,
  ruby-rspec-expectations, ruby-rspec-mocks, ruby-rspec, bundler,
  ruby-useragent, ruby-bacon, ruby-arel, ruby-connection-pool,
  ruby-net-http-persistent, ruby-minitest, ruby-minitest-sprint,
  ruby-minitest-bacon, ruby-daemons, ruby-git, ruby-slop,
  ruby-multipart-post): Convert to new build system.
* doc/guix.texi (ruby-build-system): Document the gem archive requirement.
2015-08-18 17:58:13 -04:00