Commit Graph

382 Commits

Author SHA1 Message Date
Mark H Weaver
1b4e48d498 Merge branch 'master' into core-updates 2015-07-19 18:12:34 -04:00
pjotrp
6e9f2913ba build-system/ruby: Add #:gem-flags parameter.
* guix/build-system/ruby.scm (build): add 'gem-flags' key
* guix/build/ruby-build-system.scm (build): use 'gem-flags' key
* doc/guix.texi (Build Systems): Mention #:gem-flags.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-07-18 17:15:03 +02:00
Ludovic Courtès
13f0c6ed41 syscalls: Struct deserializer can now return arbitrary objects.
* guix/build/syscalls.scm (read-types): Add RETURN and VALUES parameters.
  (define-c-struct): Add WRAP-FIELDS parameter and pass it to 'read-types'.
  (sockaddr-in, sockaddr-in6): Add first argument that uses
  'make-socket-address'.
  (read-socket-address): Remove 'match' on the result of 'read-sockaddr-in'
  and 'read-sockaddr-in6'.
2015-07-17 23:31:29 +02:00
Ludovic Courtès
4f7b564adb download: Remove spurious warning about 'https_proxy'.
* guix/build/download.scm (open-connection-for-uri)[with-https-proxy]: Warn
  about 'https_proxy' only when 'getenv' returns a non-empty string.
2015-07-17 22:31:12 +02:00
Mark H Weaver
3bacb7a698 python-build-system: Add 'ensure-no-mtimes-pre-1980' phase.
* guix/build/python-build-system.scm (ensure-no-mtimes-pre-1980):
  New phase.
  (%standard-phases): Add it after 'unpack'.
2015-07-16 01:49:39 -04:00
Mark H Weaver
3c7d023d64 build-system/gnu: Pass --build=<triplet> to configure by default.
* 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.
2015-07-13 18:54:40 -04:00
Federico Beffa
e9137a5310 build: Add 'emacs-build-system'.
* Makefile.am (MODULES): Add 'guix/build-system/emacs.scm' and
  'guix/build/emacs-build-system.scm'.
* guix/build-system/emacs.scm: New file.
* guix/build/emacs-build-system.scm: New file.
* doc/guix.texi (Build Systems): Document it.
2015-07-08 10:53:05 +02:00
Federico Beffa
1d44b4e544 build: emacs-utils: Add 'emacs-byte-compile-directory'.
* guix/build/emacs-utils.scm (emacs-byte-compile-directory): New procedure.
2015-07-08 10:53:05 +02:00
David Thompson
df3ce5c123 build: syscalls: Add pivot-root.
* guix/build/syscalls.scm (pivot-root): New procedure.
* tests/syscalls.scm ("pivot-root"): New test.
2015-07-07 21:16:25 -04:00
David Thompson
43ace6ea76 build: syscalls: Add setns.
* guix/build/syscalls.scm (setns): New procedure.
* tests/syscalls.scm ("setns"): New test.

squash: setns
2015-07-07 20:55:09 -04:00
David Thompson
8950ed11c6 build: syscalls: Add clone.
* guix/build/syscalls.scm (clone): New procedure.
  (CLONE_NEWNS, CLONE_NEWUTS, CLONE_NEWIPC, CLONE_NEWUSER, CLONE_NEWPID,
  CLONE_NEWNET): New variables.
* tests/syscalls.scm ("clone"): New test.
2015-07-07 20:35:08 -04:00
David Thompson
b4abdeb63b build: syscalls: Add mkdtemp!
* guix/build/syscalls.scm (mkdtemp!): New procedure.
* tests/syscalls.scm ("mkdtemp!"): New test.
2015-07-07 18:46:44 -04:00
David Thompson
b16d138a0a build: syscalls: Add unmount flags.
* guix/build/syscalls.scm (MNT_FORCE, MNT_DETACH, MNT_EXPIRE)
  (UMOUNT_NOFOLLOW): New variables.
2015-07-07 18:38:41 -04:00
David Thompson
577c02eb40 build: syscalls: Add additional mount flags.
* guix/build/syscalls.scm (MS_NOSUID, MS_NODEV, MS_NOEXEC, MS_STRICTATIME):
  New variables.
2015-07-07 18:38:41 -04:00
pjotrp
76ae915ec8 build: ruby: Run 'rake gem' when gemspec is missing.
* guix/build/ruby-build-system.scm (build): Run 'rake gem' when there is no
  gemspec in the source tree.

Co-Authored-By: David Thompson <davet@gnu.org>
2015-07-07 08:54:29 -04:00
Eric Bavier
6508ce55e9 build-system/haskell: install config for any package that creates it.
A Cabal package is allowed to declare an "empty" library, in an
otherwise executable-only package, for the purpose of allowing Cabal
to use it as a dependency for other packages.  See e.g. hspec-discover.

* guix/build/haskell-build-system.scm (register): Unconditionally call
  setup script with "register", and install any config file generated.
2015-06-11 18:55:49 -05:00
Ludovic Courtès
6a669bda51 profiles: Export 'ensure-writable-directory' and use it.
* guix/build/profiles.scm (ensure-writable-directory): Export.
* guix/profiles.scm (gtk-icon-themes)[build]: Remove '@@' form and use (guix
  build profiles).
2015-05-27 22:36:52 +02:00
Ludovic Courtès
60a56db007 services: swap: Use 'restart-on-EINTR'.
* gnu/services/base.scm (swap-service)[start, stop]: Use 'restart-on-EINTR'.
* guix/build/syscalls.scm (swapoff): Fix typo in 'throw' arguments.
2015-05-22 11:51:12 +02:00
Ludovic Courtès
ea98270443 syscalls: Add 'restart-on-EINTR'.
* guix/build/syscalls.scm (call-with-restart-on-EINTR): New procedure.
  (restart-on-EINTR): New macro.
2015-05-22 11:51:12 +02:00
Ludovic Courtès
113c17a0c9 profiles: Gracefully deal with packages containing an etc/ symlink.
This fixes a bug whereby 'guix package -i gcc-toolchain' would fail in
'build-profile'.  This is because in 'gcc-toolchain', etc/ is a symlink,
and so the 'scandir' call in 'unsymlink' would return #f instead of
returning a list.

Reported by Andreas Enge <andreas.enge@inria.fr>.

* guix/build/profiles.scm (ensure-writable-directory)[unsymlink]: Append
  "/" to TARGET before calling 'scandir'.
* tests/profiles.scm ("etc/profile when etc/ is a symlink"): New test.
2015-05-18 09:47:29 +02:00
Ludovic Courtès
6944fdbdbd syscalls: Add 'set-network-interface-up'.
* guix/build/syscalls.scm (set-network-interface-up): New procedure.
2015-05-17 23:20:59 +02:00
Ludovic Courtès
a0dac7a01f profiles: Ensure the profile's etc/ directory is writable.
Reported by 宋文武 <iyzsong@gmail.com>.

* guix/build/profiles.scm (build-etc/profile,
  ensure-writable-directory): New procedures.
  (build-profile): Use them.
* tests/profiles.scm ("etc/profile when etc/ already exists"): New test.
2015-05-08 16:35:32 +02:00
Ludovic Courtès
d664f1b431 profiles: Generate an 'etc/profile' file.
Suggested by 宋文武 <iyzsong@gmail.com>
in <http://bugs.gnu.org/20255>.

* guix/build/profiles.scm (abstract-profile,
  write-environment-variable-definition): New procedures.
  (build-profile): Add #:search-paths parameter.  Create
  OUTPUT/etc/profile.
* guix/profiles.scm (profile-derivation)[builder]: Add 'search-paths'
  variable and pass it to 'build-profile'.  Adjust #:modules argument.
* tests/profiles.scm ("etc/profile"): New test.
* doc/guix.texi (Invoking guix package): Mention etc/profile.
2015-05-06 18:26:54 +02:00
Ludovic Courtès
611adb1ee5 profiles: Move build code to (guix build profiles).
* guix/build/profiles.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/profiles.scm (profile-derivation)[builder]: Call out to
  'build-profile'.
  Add (guix build profiles) to the #:modules argument.
2015-05-06 18:26:54 +02:00
Ludovic Courtès
7623848343 download: Work around Guile small-receive-buffer bug.
Previously, code using directly (guix build download) was still affected
by <http://bugs.gnu.org/15368>.  This includes source derivations, the
'guix download' command, and (guix gnu-maintenance).

'guix substitute' was unaffected since it used (guix http-client), which
already had the fix.

* guix/http-client.scm (open-socket-for-uri): Remove.
  (http-fetch): Remove #:buffered? argument to 'open-socket-for-uri';
  use 'setvbuf' instead.
* guix/scripts/substitute.scm (fetch): Likewise.
* guix/build/download.scm (open-socket-for-uri): New procedure, taken
  from guix/http-client.scm, but without the #:buffered? parameter.
2015-05-06 10:31:11 +02:00
Ludovic Courtès
c822fb8e34 download: Reinstate buffering on connection sockets.
* guix/build/download.scm (open-connection-for-uri): Reinstate call to
  'setvbuf' inadvertently removed in d17551d9.
2015-05-06 09:50:15 +02:00
Ludovic Courtès
bf4af30bb2 Merge branch 'master' into core-updates 2015-05-01 15:03:30 +02:00
Ludovic Courtès
d17551d943 download: Simplify 'open-connection-for-uri' to support HTTP proxies.
Partly fixes <http://bugs.gnu.org/20402>.
Reported by Joshua Randall <jcrandall@alum.mit.edu>.

* guix/build/download.scm (open-connection-for-uri): Rewrite to be a
  small wrapper around 'open-socket-for-uri'.  This procedure was
  initially introduced in d14ecda to work around the lack of NSS modules
  during bootstrap but that has become unnecessary since 0621349, which
  introduced a bootstrap Guile that uses static NSS modules (from commit
  d3b5972.)
  On Guile >= 2.0.10, this allows the 'http_proxy' environment variable
  to be used.
2015-05-01 00:06:17 +02:00
Ludovic Courtès
0bd4377566 build-system/gnu: #:validate-runpath? now defaults to #t.
* guix/build/gnu-build-system.scm (validate-runpath): Change default
  value of VALIDATE-RUNPATH? to #t.
2015-04-23 18:52:40 +02:00
Ludovic Courtès
cb85eb5e65 build-system/gnu: Gracefully handle dangling symlinks.
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.
2015-04-23 18:52:40 +02:00
Ludovic Courtès
cd91504df2 gremlin: Add support for the expansion of $ORIGIN in RUNPATH.
* guix/build/gremlin.scm (expand-variable, expand-origin): New
  procedures.
  (validate-needed-in-runpath): Map 'expand-origin' to the RUNPATH field
  of DYNINFO.
* tests/gremlin.scm ("expand-origin"): New test.
2015-04-23 18:52:40 +02:00
Ludovic Courtès
b7615c56a7 build-system/haskell: Adjust to new 'modify-phases' syntax.
* guix/build/haskell-build-system.scm (%standard-phases): Add missing
  quotes, as needed since commit f8503e2.
2015-04-16 09:51:38 +02:00
Ludovic Courtès
ee5408576d Merge branch 'master' into core-updates 2015-04-09 21:10:46 +02:00
Federico Beffa
283cce508a build-system/haskell: Update configure flags, 'haddock' and %standard-phases.
* guix/build/haskell-build-system.scm (%standard-phases): move 'haddock phase
  before 'install phase.
* guix/build/haskell-build-system.scm (haddock): Simplify it as the 'install
  phase takes care of copying files.
* guix/build/haskell-build-system.scm (configure): Add '--libsubdir' flag.
  Fix use of '--extra-include-dirs' and '--extra-lib-dirs' flags.  Use 'doc',
  'bin' and 'lib' outputs if they are defined.
* guix/build/haskell-build-system.scm (make-ghc-package-database, register):
  Aligh location of 'package.conf.d' directory with '--libsubdir' flag.
2015-04-08 17:31:11 +02:00
宋文武
cf3e3e374c Merge branch 'master' into core-updates 2015-04-08 16:04:37 +08:00
Ludovic Courtès
347f54ed33 utils: 'find-files' does not follow symlinks by default.
Fixes <http://bugs.gnu.org/20081>.
Reported by Tomáš Čech <sleep_walker@suse.cz>.

* guix/build/utils.scm (find-files): Add #:stat parameter.  Pass it as
  last argument to 'file-system-fold'.
2015-04-06 23:09:54 +02:00
Federico Beffa
b198545df6 build-system/gnu: Add docstring to 'delete-info-dir-file'.
* guix/build/gnu-build-system.scm (delete-info-dir-file): Add docstring.
2015-04-06 10:47:31 +02:00
Federico Beffa
26b261ecfe build-system/gnu: Add 'delete-info-dir-file' phase.
* guix/build/gnu-build-system.scm (delete-info-dir-file): New procedure.
  (%standard-phases): Use it.
2015-04-06 10:22:21 +02:00
Ludovic Courtès
dacd5d2ca7 gremlin: Ignore non-store file names in RUNPATH and warn about them.
* guix/build/gremlin.scm (validate-needed-in-runpath)[runpath]:
  Add (filter absolute-file-name? ...).
  Emit a warning when RUNPATH file names that do not match
  'store-file-name?'.  Change format of error message to begin with file
  name.
* guix/build/utils.scm (store-file-name?): New procedure.
2015-04-05 15:40:48 +02:00
Federico Beffa
14dfdf2e0e build-system: Add haskell-build-system.
* guix/build-system/haskell.scm: New file.
* guix/build/haskell-build-system.scm: New file.
* doc/guix.texi: Add section on 'haskell-build-system'.
2015-04-04 09:11:31 +02:00
Andy Wingo
8b43df2b30 build-system/glib-or-gtk: Wrap libexec programs.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): Also
  wrap binaries in libexec/, such as those launched by dbus services.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-04-03 23:24:01 +02:00
Ludovic Courtès
112da58875 build-system/gnu: Add 'validate-runpath' phase.
* 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.
2015-04-01 16:47:49 +02:00
Ludovic Courtès
4ba3a84d07 utils: Make the second 'find-files' argument optional.
* guix/build/utils.scm (find-files): Make 'pred' optional.
2015-04-01 15:43:54 +02:00
Ludovic Courtès
7be8c63e0d gremlin: Guard against invalid ELF segments.
* guix/build/gremlin.scm (&elf-error, &invalid-segment-size): New error
  condition types.
  (dynamic-link-segment): Compare SEGMENT's offset + size to ELF's total
  size.
  (validate-needed-in-runpath): Wrap body in 'guard' form.
2015-04-01 14:17:39 +02:00
Ludovic Courtès
d83ccc9b42 gremlin: Add libnsl to libc's library list.
* guix/build/gremlin.scm (%libc-libraries): Add "libnsl.so".
2015-04-01 13:46:01 +02:00
Ludovic Courtès
1968262a23 utils: 'find-files' takes an arbitrary predicate as its second argument.
* guix/build/utils.scm (file-name-predicate): New procedure.
  (find-files): Rename second parameter to 'pred'.  When 'pred' is not a
  procedure, call 'file-name-predicate'.  Use PRED instead of
  'regexp-exec' in the leaf procedure.
2015-03-31 22:55:41 +02:00
Ludovic Courtès
f8503e2b25 utils: 'modify-phases' no longer introduces quotes.
Suggested by Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>.

* guix/build/utils.scm (%modify-phases): Remove quotes.
* guix/build/cmake-build-system.scm (%standard-phases): Adjust
  accordingly.
* guix/build/glib-or-gtk-build-system.scm (%standard-phases): Likewise.
* guix/build/gnu-dist.scm (%dist-phases): Likewise.
* guix/build/perl-build-system.scm (%standard-phases): Likewise.
* guix/build/python-build-system.scm (%standard-phases): Likewise.
* guix/build/ruby-build-system.scm (%standard-phases): Likewise.
* guix/build/waf-build-system.scm (%standard-phases): Likewise.
* gnu/packages/bash.scm, gnu/packages/code.scm, gnu/packages/gl.scm,
  gnu/packages/gnome.scm, gnu/packages/graphics.scm,
  gnu/packages/image.scm, gnu/packages/key-mon.scm,
  gnu/packages/ocr.scm, gnu/packages/plotutils.scm,
  gnu/packages/search.scm, gnu/packages/video.scm: Likewise.
2015-03-31 22:43:01 +02:00
Ludovic Courtès
15aa2c3842 Add (guix build gremlin).
* guix/build/gremlin.scm, tests/gremlin.scm: New files.
* Makefile.am (MODULES): Add guix/build/gremlin.scm.
  (SCM_TESTS): Add tests/gremlin.scm.
2015-03-31 22:23:57 +02:00
David Thompson
7578f6e32a build: ruby: Set $GEM_HOME that matches Ruby's $GEM_PATH.
* guix/build/ruby-build-system.scm (install): Ignore the Ruby patch version
  when creating $GEM_HOME.
2015-03-17 19:23:17 -04:00
Andreas Enge
0d6f936036 gnu: cmake: Add CMAKE_PREFIX_PATH as a native search path, and drop
CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH from the cmake build system.

* gnu/packages/cmake.scm (cmake)[native-search-paths]: New field.
* guix/build/cmake-build-system.scm (configure): Drop environment variables
  CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH.
2015-03-14 16:06:55 +01:00