Commit graph

92296 commits

Author SHA1 Message Date
Ludovic Courtès
bfb3c3d03a build: Move distro/patches' to distro/packages/patches'.
* distro/patches: Move directory to...
* distro/packages/patches: ... here.
* Makefile.am (dist_patch_DATA): Adjust accordingly.
* pre-inst-env.in (DISTRO_PATCH_DIRECTORY): Likewise.
2012-10-27 15:32:40 +02:00
Ludovic Courtès
fc2f38023b build: Use `pre-inst-env' to compile the source.
* Makefile.am (.scm.go): Use `pre-inst-env' instead of re-defining the
  environment variables, except for `DISTRO_INSTALLED_PATCH_DIRECTORY'
  and `DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY'.
2012-10-27 15:32:39 +02:00
Ludovic Courtès
0778385802 guix-build: Gracefully handle `&package-input-error' conditions.
* guix/packages.scm: Export `package-error?' and `package-input-error?'.
* guix-build.in (guix-build): Catch `&package-input-error' conditions,
  print a human-readable message, and exit.
2012-10-27 14:56:46 +02:00
Ludovic Courtès
5e6c90121f location: Start column numbers at 1.
* guix/utils.scm (source-properties->location): Use COL + 1.
2012-10-27 14:53:47 +02:00
Ludovic Courtès
d25468bcb2 distro: Add i686-linux port.
* distro/packages/bootstrap/i686-linux/bash,
  distro/packages/bootstrap/i686-linux/mkdir,
  distro/packages/bootstrap/i686-linux/tar,
  distro/packages/bootstrap/i686-linux/xz: New files.

* distro/packages/base.scm (%bootstrap-coreutils&co,
  %bootstrap-binutils, %bootstrap-glibc, %bootstrap-gcc): Add hashes of
  the i686-linux tarballs.

* Makefile.am (bootstrap_i686_linuxdir, dist_bootstrap_i686_linux_DATA,
  nodist_bootstrap_i686_linux_DATA): New variables
  (DISTCLEANFILES): Add $(nodist_bootstrap_i686_linux_DATA).
  (distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz):
  New rule.
2012-10-26 19:10:37 +02:00
Ludovic Courtès
fc95fdaebe distro: gcc: Adjust to support non-x86_64 architectures.
* distro/packages/base.scm (gcc-4.7)[arguments]: In the `pre-configure'
  phase, patch all the relevant gcc/config files, not just those for
  x86_64-linux-gnu.
2012-10-26 18:51:22 +02:00
Ludovic Courtès
20d83444dd utils: Remove special `substitute*' syntax for lists of files.
* guix/build/utils.scm (substitute*): Remove special syntax for
  list-of-files; instead, check whether FILE is `list?' at run time.

* distro/packages/base.scm (gcc-4.7, %binutils-static): Adjust
  accordingly.
2012-10-26 09:07:37 +02:00
Ludovic Courtès
450ccdc3aa doc: Add `HACKING'.
* HACKING: New file.
* Makefile.am (EXTRA_DIST): Add it.
2012-10-25 23:44:27 +02:00
Ludovic Courtès
fbc93bedff Add a system' parameter to nixpkgs-derivation'.
* guix/utils.scm (nixpkgs-derivation): Add a `system' parameter.  Pass
  it in the `nix-instantiate' invocation.
2012-10-25 23:42:06 +02:00
Ludovic Courtès
b642e4b853 packages: Pass `system' around.
* guix/packages.scm (package-source-derivation): Add `system'
  parameter.  Pass it to METHOD.
  (package-derivation)[expand-input]: Pass SYSTEM to
  `package-derivation' and `package-source-derivation'.

* distro/packages/base.scm (package-with-bootstrap-guile)[boot]: Pass
  SYSTEM to FETCH.
2012-10-25 23:41:15 +02:00
Ludovic Courtès
ae39d1b233 derivations: Make sure build-expression->derivation' & co. pass system'.
* guix/derivations.scm (imported-files): Call
  `build-expression->derivation' with SYSTEM, not (%current-system).
  (build-expression->derivation): Pass SYSTEM to `imported-modules' and
  `compiled-modules'.
2012-10-25 23:14:27 +02:00
Ludovic Courtès
b272c47433 derivations: Pass the derivation of guile-for-build to `imported-files' & co.
* guix/derivations.scm (%guile-for-build): Initialize to #f.
  (imported-files, imported-modules, compiled-modules): Add `guile'
  keyword parameter.  Pass it down to `build-expression->derivation'.
  (build-expression->derivation)[guile-drv]: New variable.  Pass it as
  the #:guile parameter for `imported-modules' and `compiled-modules'.

* tests/derivations.scm: Set %GUILE-FOR-BUILD to the derivation of
  %BOOTSTRAP-GUILE.
2012-10-25 18:03:48 +02:00
Ludovic Courtès
4033bde841 distro: Build the final inputs against the final Bash, not the bootstrap Bash.
* distro/packages/base.scm (%boot4-inputs): New variable.
  (guile-final): Use it.
  (%final-inputs): Build with %BOOT4-INPUTS, not %BOOT3-INPUTS.
2012-10-25 17:55:45 +02:00
Ludovic Courtès
e67245597e distro: ncurses: Don't patch shebangs.
* distro/packages/base.scm (ncurses): Pass #:patch-shebangs? #f.
2012-10-25 17:54:17 +02:00
Ludovic Courtès
60c21332d2 distro: Bootstrap using our own binaries instead of those from Nixpkgs.
* distro/packages/base.scm (%bootstrap-inputs): Switch to using our own
  bootstrap binaries instead of those from Nixpkgs.
2012-10-25 17:41:18 +02:00
Ludovic Courtès
1c702d1e92 distro: Build glibc with `--enable-obsolete-rpc'.
* distro/packages/base.scm (glibc-final): Pass `--enable-obsolete-rpc'.
  (%bootstrap-glibc): Update hash accordingly.
2012-10-25 17:36:46 +02:00
Ludovic Courtès
371a20e048 distro: Add missing Linux-Libre headers to the bootstrap glibc.
* distro/packages/base.scm (%glibc-stripped): Copy all of Linux-Libre's
  `include/asm' directory; copy a few linux/ headers too.
  (%bootstrap-glibc): Update tarball hash.
2012-10-25 00:58:39 +02:00
Ludovic Courtès
5ab57a13dd distro: Add a bootstrap GCC that uses binaries from the tarball.
* distro/packages/base.scm (%bootstrap-gcc): New variable.
2012-10-25 00:58:39 +02:00
Ludovic Courtès
c52a5bf09a Add `guix-download'.
* guix-download.in: New file.
* configure.ac: Emit `guix-download' and make it executable.
* Makefile.am (bin_SCRIPTS): Add `guix-download'.
* po/POTFILES.in: Add `guix-download.in'.
2012-10-25 00:58:37 +02:00
Ludovic Courtès
82058eff59 store: Add `query-path-hash'.
* guix/store.scm (write-arg, read-arg): Add `base16' literal and
  corresponding rule.
  (query-path-hash): New operation.

* tests/derivations.scm ("fixed-output derivation"): Check whether
  `query-path-hash' returns a bytevector.
2012-10-24 23:52:15 +02:00
Ludovic Courtès
e6cc3d8654 distro: Add missing commands in the bootstrap binaries.
* distro/packages/base.scm (%static-inputs): Add an `awk' -> `gawk', and
  `sh' -> `bash' symlinks.  Add `fgrep' and `egrep'.
  (%bootstrap-coreutils&co): Use new tarball that contains that
  symlink.

* distro/packages/bootstrap/x86_64-linux/bash,
  distro/packages/bootstrap/x86_64-linux/mkdir,
  distro/packages/bootstrap/x86_64-linux/tar,
  distro/packages/bootstrap/x86_64-linux/xz: Use binaries from that
  tarball (the previous binaries hadn't gone through
  `remove-store-references', which is fixed now.)
2012-10-24 23:52:03 +02:00
Ludovic Courtès
692c6c1576 guix-build: Change --local-build' to --no-substitutes'.
* guix-build.in (%default-options): Add `substitutes?'.
  (show-help): Change `--local-build' to `--no-substitutes'.
  (guix-build): Adjust accordingly.
2012-10-24 15:01:16 +02:00
Ludovic Courtès
1430808cae distro: Update file name of initial Binutils tarball.
* distro/packages/base.scm (%bootstrap-binutils): Update remote file
  name.
2012-10-24 00:21:30 +02:00
Ludovic Courtès
d90248844b derivations: Compile the #:modules passed to `build-expression->derivation'.
* guix/derivations.scm (imported-files)[parent-dirs]: Move to...
  (parent-directories): ... here.  New procedure.
  (compiled-modules): New procedure.
  (build-expression->derivation): Use it.

* tests/derivations.scm ("build-expression->derivation with modules"):
  New test.
2012-10-24 00:09:25 +02:00
Ludovic Courtès
d398e2c242 distro: Update bootstrap glibc package.
* distro/packages/base.scm (%bootstrap-glibc): Update initial regexp to
  make it less Nixish.  Update hash to new tarball.
2012-10-24 00:09:01 +02:00
Ludovic Courtès
827a3087da distro: Add required Linux-Libre headers to the glibc tarball.
* distro/packages/base.scm (%glibc-stripped): Include required headers
  from Linux-Libre.
2012-10-24 00:07:12 +02:00
Ludovic Courtès
3f8de86dec distro: gcc: No longer store the absolute path of crt files.
* distro/packages/base.scm (gcc-4.7): Define
  STANDARD_STARTFILE_PREFIX_[12] instead of storing the absolute path of
  crt files.
2012-10-23 23:38:02 +02:00
Ludovic Courtès
40749fb6eb distro: Fix GCC tarball to include the `libexec' directory.
* distro/packages/base.scm (%gcc-stripped): Copy $gcc/libexec to $out.
2012-10-23 22:00:06 +02:00
Ludovic Courtès
131edf67a0 distro: Fix glibc tarball to include *.so.*.
* distro/packages/base.scm (%glibc-stripped): Fix regexp to
  include *.so.* in the output.
2012-10-23 21:59:09 +02:00
Ludovic Courtès
5155fb89b2 distro: Add a statically-linked GCC for bootstrapping.
* distro/packages/base.scm (%gcc-static): New variable.
  (%gcc-stripped): Use it.
2012-10-22 22:22:37 +02:00
Ludovic Courtès
83ce0cf1f1 distro: Add a package that gets the bootstrap glibc from a tarball.
* distro/packages/base.scm (%bootstrap-glibc): New variable.
2012-10-21 22:01:49 +02:00
Ludovic Courtès
80d09f7452 distro: Add packages that get Coreutils, Binutils & co. from tarballs.
* distro/packages/base.scm (package-from-tarball): New procedure.
  (%bootstrap-base-url, %bootstrap-coreutils&co, %bootstrap-binutils):
  New variables.
2012-10-21 22:00:38 +02:00
Ludovic Courtès
592ef6c88f packages: Add support for system-dependent inputs.
* guix/packages.scm (package-derivation)[intern]: New procedure.  Pass
  #t as the `recursive?' argument, instead of #f.
  [expand-input]: New procedure, with code formerly in the body.
  Support inputs where the input is a procedure returning a file name or
  an <origin>.
  Use `expand-input' in the body.

* tests/packages.scm ("trivial with system-dependent input"): New test.
2012-10-21 17:52:16 +02:00
Ludovic Courtès
095c7a2683 distro: Add a bootstrap GCC tarball.
* distro/packages/base.scm (%gcc-stripped, %gcc-bootstrap-tarball): New
  variables.
2012-10-21 15:57:04 +02:00
Ludovic Courtès
58a7891ccf distro: Add a bootstrap glibc tarball.
* distro/packages/base.scm (%glibc-stripped, %glibc-bootstrap-tarball):
  New variables.
2012-10-21 15:26:46 +02:00
Ludovic Courtès
17ff4ccdf5 distro: Add tools to build a tarball of statically-linked Binutils programs.
* distro/packages/base.scm (%binutils-static, %binutils-static-stripped,
  %binutils-bootstrap-tarball): New variables.
2012-10-20 16:12:26 +02:00
Ludovic Courtès
5cbb559046 distro: Add a package to build a tarball of the bootstrap binaries.
* distro/packages/base.scm (tarball-package): New procedure.
  (%bootstrap-binaries-tarball): New variable.
  (%guile-bootstrap-tarball): Define in terms of `tarball-package'.
2012-10-20 11:51:07 +02:00
Ludovic Courtès
5cc3061673 guix-build: Add `--system'.
* guix-build.in (derivations-from-package-expressions): New `system'
  parameter.  Pass it to `package-derivation'.
  (%default-options): Add `system' pair.
  (show-help): Describe `--system'.
  (%options): Add it.
  (guix-build): Check the `system' pair in OPTS; pass it to
  `derivations-from-package-expressions' and `package-derivation'.
2012-10-18 23:46:10 +02:00
Ludovic Courtès
a5a349f302 distro: Provide a more descriptive report when a bootstrap binary is missing.
* distro/packages/base.scm (%bootstrap-guile): Error out when
  `search-bootstrap-binary' returns #f.
2012-10-18 23:36:29 +02:00
Ludovic Courtès
d6e8777688 distro: Use the bootstrap Guile for the derivation of sources.
* distro/packages/base.scm (bootstrap-origin,
  package-with-bootstrap-guile): New procedures.
  (gnu-make-boot0, diffutils-boot0, findutils-boot0, binutils-boot0,
  gcc-boot0, linux-libre-headers-boot0, glibc-final, bash-final,
  guile-final): Use `package-with-bootstrap-guile'.
  (gcc-boot0-wrapped): Clear `source'.

* guix/ftp.scm (ftp-fetch): Add a #:guile keyword parameter.  Honor it.
* guix/http.scm (http-fetch): Likewise.
2012-10-18 23:18:38 +02:00
Ludovic Courtès
d14ecda913 http/ftp: Tweak to avoid depending on libc's NSS.
* guix/build/http.scm (open-connection-for-uri): New procedure.
  (http-fetch): Use it.  Pass the result as a #:port argument to
  `http-get'.
  Add hack to modify the `set-port-encoding!' binding in (web response).

* guix/ftp-client.scm (ftp-open): Add optional `port' parameter,
  defaulting to 21.  When calling `getaddrinfo', convert PORT to a
  string and pass AI_NUMERICSERV when PORT is a number.
2012-10-18 22:32:23 +02:00
Ludovic Courtès
1c3972daa8 guix-build: Add `--local-build'.
* guix-build.in (show-help): Add `--local-build'.
  (%options): Likewise.
  (guix-build): Pass `set-build-options' the #:use-substitutes? argument
  accordingly.
2012-10-18 22:32:21 +02:00
Ludovic Courtès
e3dadc6818 distro: bzip2: Simplify installation phase with `find-files'.
* distro/packages/base.scm (bzip2): Use `find-files' instead of rolling
  our own with `file-system-fold'.
2012-10-18 21:43:35 +02:00
Ludovic Courtès
207ad6b2e9 distro: %static-binaries: Use (guix build utils).
* distro/packages/base.scm (%static-binaries): Add missing
  use of (guix build utils).
2012-10-18 21:42:19 +02:00
Ludovic Courtès
683d57f420 distro: Fix bootstrapping regression recently introduced.
* distro/packages/base.scm (gcc-boot0-wrapped): Fix typo introduced in
  a52e429f76 ("distro: Add i686 support.")
2012-10-18 11:41:12 +02:00
Ludovic Courtès
f76a51add0 distro: Clear references to the store in static binaries.
* distro/packages/base.scm (%static-binaries): Clear references to the
  store path for files in $out/bin.
2012-10-17 23:34:05 +02:00
Ludovic Courtès
4c261f4169 utils: Add `find-files'.
* guix/build/utils.scm (find-files): New procedure.
2012-10-17 23:25:25 +02:00
Ludovic Courtès
c0746cc9db utils: Add `copy-recursively'; use it.
* guix/build/utils.scm (copy-recursively): New procedure.

* distro/packages/base.scm (%guile-static-stripped): Use it.
2012-10-17 23:25:25 +02:00
Ludovic Courtès
7da95264f1 utils: Add `mkdir-p'; use it.
* guix/build/utils.scm (mkdir-p): New procedure.

* distro/packages/base.scm (gnu-make-boot0, gcc-boot0-wrapped,
  ld-wrapper-boot3, %static-binaries, %guile-static-stripped): Use it.
* distro/packages/typesetting.scm (lout): Likewise.
2012-10-17 23:25:25 +02:00
Ludovic Courtès
7172116ca5 build-system/gnu: Pass the system type to the builder.
* guix/build-system/gnu.scm (gnu-build)[builder]: Pass SYSTEM to
  `gnu-build' as a keyword argument.
2012-10-17 23:25:25 +02:00