Commit Graph

3161 Commits

Author SHA1 Message Date
Mathieu Othacehe e224820386
bootloader: Factorize write-file-on-device.
* gnu/bootloader/extlinux.scm (install-extlinux): Factorize bootloader
writing in a new procedure write-file-on-device defined in (gnu build
bootloader).
* gnu/build/bootloader.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.
* gnu/system/vm.scm (qemu-img): Adapt to import and use (gnu build bootloader)
module during derivation building.
* gnu/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-15 11:52:38 +01:00
Ricardo Wurmus 1bc147d609
guix: ant-build-system: Do not compress jars.
Fixes <https://bugs.gnu.org/29700>.

* guix/build/ant-build-system.scm (strip-jar-timestamps): Do not compress jar
when repacking.
2017-12-15 00:00:34 +01:00
Ludovic Courtès 34797d8afc
hydra: Invalidate derivation caches after each architecture evaluation.
This reduces max RSS from 1.3G to 1.0G.

* guix/derivations.scm (invalidate-derivation-caches!): New procedure.
* build-aux/hydra/gnu-system.scm (hydra-jobs): Use it.  Add 'format'
call.
2017-12-13 23:11:53 +01:00
Ludovic Courtès d1f01e4845
memoization: Add 'invalidate-memoization!.
* guix/memoization.scm (%make-hash-table*): When not profiling, add the
new table to %MEMOIZATION-TABLES.
(invalidate-memoization!): New procedure.
2017-12-13 23:11:53 +01:00
Ludovic Courtès 90354e34e3
derivations: Don't memoize 'derivation-hash'.
This has little or no run-time impact and slightly reduces the memory
footprint.

* guix/derivations.scm (derivation-hash): Replace 'mlambda' with
'lambda'.
2017-12-13 23:11:53 +01:00
Ludovic Courtès eb1150c22c
derivations: Split 'derivation-hash' in two procedures.
* guix/derivations.scm (derivation/masked-inputs): New procedure.
(derivation-hash): Use it instead of the inline code.
2017-12-13 23:11:53 +01:00
Ludovic Courtès 22358bdb7c
Revert "derivations: 'derivation-hash' assumes inputs are coalesced."
This reverts commit 1d008d9f8c.
Reported by Rutger Helling <rhelling@mykolab.com>.
Fixes <https://bugs.gnu.org/29689>.
2017-12-13 15:13:38 +01:00
Ludovic Courtès 1d008d9f8c
derivations: 'derivation-hash' assumes inputs are coalesced.
* guix/derivations.scm (derivation-hash): Remove
redundant 'coalesce-duplicate-inputs' call.
2017-12-12 18:11:22 +01:00
Ludovic Courtès 3d19b7fbc2
derivations: Use 'define-immutable-record-type' as appropriate.
This is a followup to dc673fa113.

* guix/derivations.scm (<derivation-output>, <derivation-input>): Use
'define-immutable-record-type'.
2017-12-12 18:11:22 +01:00
Ludovic Courtès 6c80641d54
memoization: Profiling support keeps track of lookups and hits.
* guix/memoization.scm (<cache>): New record type.
(define-lookup-procedure, define-update-procedure): New macros.
(cache-ref, cacheq-ref, cache-set!, cacheq-set!): New procedures.
(cached/mv, cachedq/mv, cached, cachedq): Use them instead of 'hash-ref'
and 'hash-set!'.
(%make-hash-table*): When 'profiled?' returns true, return a <cache>
object.
(define-cache-procedure): Adjust to show cache lookups and hits.
2017-12-12 18:11:22 +01:00
Ludovic Courtès 252c408377
memoization: Add profiling support.
* guix/memoization.scm (%memoization-tables): New variable.
(%make-hash-table*, show-memoization-tables): New procedures.
(make-hash-table*): New macro.
Add top-level call to 'register-profiling-hook!'.
(memoize): Adjust to pass the resulting procedure to
'make-hash-table*'.
(%mlambda): Likewise.
2017-12-12 18:11:22 +01:00
Ludovic Courtès 03870da819
Add (guix profiling).
* guix/profiling.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/store.scm (record-operation): Use 'profiled?' and
'register-profiling-hook!'.
2017-12-12 18:11:22 +01:00
nee 47dc9a0dae
guix: utils: Add version-major.
* guix/utils.scm (version-major): New procedure.
2017-12-11 19:12:23 +00:00
Eric Bavier 7f04197fef
utils: Fix cond-expand for Guile 2.0.
* guix/build/download.scm (tls-wrap): Use 'guile-2.2' feature instead.
2017-12-10 15:58:55 -06:00
Ludovic Courtès 3b80b81358
ui: Display hints to resolve profile collisions.
Fixes <https://bugs.gnu.org/29255>.
Reported by Ben Sturmfels <ben@sturm.com.au>.

* guix/ui.scm (display-collision-resolution-hint): New procedure.
(call-with-error-handling): Call it upon '&profile-collistion-error'.
2017-12-10 23:44:58 +01:00
Ludovic Courtès 8bc1935c7c
build-system/asdf: Use 'mlambda'.
* guix/build-system/asdf.scm (package-with-build-system): Use 'mlambda'
instead of 'memoize'.
2017-12-10 23:44:58 +01:00
Efraim Flashner f4007b2547
lint: 'check-vulnerabilities' also checks package properties.
* guix/scripts/lint.scm (check-vulnerabilities): Also check for CVEs
listed as mitigated in the package properties.
* tests/lint.scm ("cve: known safe from vulnerability"): New test.
2017-12-10 21:59:07 +02:00
Rutger Helling 00cf98eb60
licenses: Add wxWindows 3.1 license.
* guix/licenses.scm (wxwindows3.1+): New variable.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-12-08 15:03:46 +01:00
Ludovic Courtès 7920e187c1
scripts: All commands enable build hooks by default.
* guix/scripts/archive.scm (%default-options): Add 'build-hook?'.
* guix/scripts/copy.scm (%default-options): Likewise.
* guix/scripts/environment.scm (%default-options): Likewise.
* guix/scripts/pack.scm (%default-options): Likewise.
* guix/scripts/package.scm (%default-options): Likewise.
* guix/scripts/pull.scm (%default-options): Likewise.
2017-12-07 23:12:37 +01:00
Ludovic Courtès 5a2f019c7d
Merge branch 'version-0.14.0' 2017-12-07 17:16:05 +01:00
Ludovic Courtès 609d126e86
Revert "packages: 'package-grafts' trims native inputs."
This reverts commit 91c9b5d016
following the concerns raised by Mark, Ben, and Tobias:
<https://lists.gnu.org/archive/html/guix-devel/2017-12/msg00081.html>.
2017-12-06 09:07:28 +01:00
Ludovic Courtès 45c32bd7e5
syscalls: Define 'input-flags' for 'tcgetattr' and friends.
* guix/build/syscalls.scm (input-flags): New macro.
2017-12-06 08:51:08 +01:00
Ludovic Courtès 91c9b5d016
packages: 'package-grafts' trims native inputs.
'package-grafts' returns a list of potentially applicable grafts, which
'cumulative-grafts' then narrows by looking at store item references and
determining the subset of the grafts that's actually applicable.

Until now, 'package-grafts' would traverse native inputs and would thus
return a large superset of the applicable grafts, since native inputs
are not in the reference graph by definition.  This patch fixes that by
having 'package-grafts' ignore entirely native inputs from the
dependency graph.

* guix/packages.scm (fold-bag-dependencies)[bag-direct-inputs*]: Add
special case for libc.
* guix/packages.scm (bag-grafts)[native-grafts, target-grafts]: Remove.
[grafts]: New procedure.
Use it.
* tests/packages.scm ("package-grafts, grafts of native inputs
ignored"): New test.
2017-12-05 16:32:40 +01:00
Ludovic Courtès ff0e0041f3
packages: 'fold-bag-dependencies' honors nativeness in recursive calls.
Previously recursive calls to 'loop' would always consider all the bag
inputs rather than those corresponding to NATIVE?.

* guix/packages.scm (fold-bag-dependencies)[bag-direct-inputs*]: New
procedure.  Use it both in the 'match' expression and in its body.
2017-12-05 15:13:38 +01:00
Mathieu Othacehe 4307397b5e
bootloader: extlinux: Stop using dd binary.
* gnu/bootloader/extlinux.scm (dd): Remove it,
(install-extlinux): replace dd call by Guile I/O procedures.
* gnu/system/vm.scm (qemu-image): Add (ice-9 binary-ports) to used-modules
list to provide "get-bytevector-n" and "put-bytevector".
* guix/scripts/system.scm (bootloader-installer-derivation): Ditto.
2017-12-04 18:26:59 +01:00
Ludovic Courtès 3fb6464ba4
ui: Tweak conflicting profile entry error message.
* guix/ui.scm (call-with-error-handling): Use 'manifest-entry-output*'
when reporting conflicting profile entries.
2017-12-03 23:18:53 +01:00
Ludovic Courtès cbb76780ef
profiles: Really disable deprecation warnings for 'profile-derivation'.
This is a followup to 2815fca142.

* guix/profiles.scm (profile-derivation)[builder]: Remove
'debug-disable' call, which was ineffective.
Pass #:env-vars to 'gexp->derivation'.
2017-12-03 23:18:53 +01:00
Ludovic Courtès d9721c2096
scripts: Default to Guile 2.2 as the guile-for-build.
* guix/scripts/environment.scm (guix-environment): '%guile-for-build'
now defaults to GUILE-2.2 instead of GUILE-2.0.
* guix/scripts/package.scm (guix-package): Likewise.
* guix/scripts/pull.scm (guix-pull): Likewise.
2017-12-03 23:18:53 +01:00
Ludovic Courtès 2815fca142
profile: Use _IO* but disable deprecation warning.
This fixes a regression introduced in
2f60084f77, whereby the profile derivation
would fail to run on Guile 2.0 (as is the case with "guix package
--bootstrap").

Reported by Christopher Baines.

* guix/profiles.scm (profile-derivation)[builder]: Use _IO* but add
'debug-disable' call.
2017-12-03 21:50:46 +01:00
Ludovic Courtès 2f60084f77
profiles: Avoid _IO* in profile builder.
* guix/profiles.scm (profile-derivation)[builder]: Avoid the deprecated
_IO* constants.
2017-12-03 19:12:16 +01:00
Ludovic Courtès cdc938daf9
profiles: Do not import the host's srfi-{19,26}.scm files.
Previously the "manual-database" derivation would always import the
host's srfi-{19,26}.scm files in the build side.  In practice this means
that different users could get different manual-database.drv depending
on the Guile version they're using in the host.

For example, the (gnu tests install) tests would fail if the host was
running Guile 2.2.3 because the guest is running 2.2.2, and thus has
different srfi-{19,26}.scm files.  The manual-database.drv would need to
be built from source, which would fail because prerequisites were
missing.

Reported by Mathieu Othacehe <m.othacehe@gmail.com>
at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29409#96>.

* guix/profiles.scm (manual-database): Do not pass #:modules to
'gexp->derivation'.  Wrap 'build' gexp in 'with-imported-modules' form.
2017-12-03 19:12:16 +01:00
Ludovic Courtès e2721a05e7
Do not set '%fresh-auto-compile'.
* guix/scripts/offload.scm (build-machines): Comment out
'(set! %fresh-auto-compile #t)' since with Guile 2.2.3 it could lead to
an actual rebuild of everything that gets loaded from there on.  See
<https://bugs.gnu.org/29226>.
* guix/ui.scm (load*): Likewise.
2017-12-01 18:47:34 +01:00
Ludovic Courtès cea25b08bf
records: Use 'make-struct/no-tail'.
* guix/records.scm (make-syntactic-constructor): Use
'make-struct/no-tail' as 'make-struct' is deprecated as of 2.2.3.
2017-12-01 18:47:34 +01:00
Ludovic Courtès e261e27676
guix system: 'init' displays a progress bar while copying.
Until now it would print the name of each store item being copied, which
was verbose and unhelpful.

* guix/scripts/system.scm (copy-closure): Use 'progress-reporter/bar'
and 'call-with-progress-reporter'.
(guix-system): Parameterize 'current-terminal-columns'.
2017-12-01 16:00:14 +01:00
Ludovic Courtès e4ecd51e23
guix system: Simplify closure copy.
* guix/scripts/system.scm (copy-item): Add 'references' argument and
remove 'references*' call.  Turn into a non-monadic procedure.
(copy-closure): Remove initial call to 'references*'.  Only pass ITEM to
'topologically-sorted*' since that's equivalent.  Compute the list of
references corresponding to TO-COPY and pass it to 'copy-item'.
2017-12-01 16:00:14 +01:00
Ludovic Courtès 1fafa2f587
weather: Use (guix progress) for progress report.
* guix/progress.scm (start-progress-reporter!, stop-progress-reporter!)
(progress-reporter-report!): New procedures.
* guix/scripts/weather.scm (call-with-progress-reporter): New procedure.
(package-outputs)[update-progress!]: Remove.
Use 'call-with-progress-reporter' instead.
(guix-weather): Parameterize 'current-terminal-columns'.
2017-12-01 16:00:14 +01:00
Ludovic Courtès 4cdb27af48
progress: Add 'progress-reporter/bar'.
* guix/progress.scm (progress-reporter/bar): New procedure.
2017-12-01 16:00:14 +01:00
Ludovic Courtès 5ed534ccc3
progress: 'progress-bar' accounts for brackets.
* guix/progress.scm (progress-bar): Subtract 2 to BAR-WIDTH to account
for brackets.
2017-12-01 16:00:14 +01:00
Ludovic Courtès 1252dd325b
progress: Factorize erase-in-line.
* guix/progress.scm (erase-in-line): New procedure.
(progress-reporter/file): Use it.
2017-12-01 16:00:14 +01:00
Mathieu Othacehe e45b573c2d
utils: Add target-arm32? procedure.
* guix/utils.scm (target-arm32?): New exported procedure.
2017-12-01 13:55:45 +01:00
Ludovic Courtès e42f026eb5
ui: Present 'use-modules' hints with a question mark.
Suggested by myglc2 <myglc2@gmail.com>.

* guix/ui.scm (report-load-error): Write "Did you forget" rather than
"Try adding."
2017-11-30 18:14:56 +01:00
Arun Isaac 3d0aa7f70b
build-system: Add scons-build-system.
* guix/build-system/scons.scm: New file.
* guix/build/scons-build-system.scm: New file.
* Makefile.am (MODULES): Register them.
* doc/guix.texi (Build Systems): Add scons-build-system.
2017-11-30 18:19:31 +05:30
Ludovic Courtès 6ee797f326
gexp: Default to 'guile-2.2' for 'program-file'.
Previously things returned by 'program-file', such as %MODPROBE-WRAPPER
in (gnu services), would refer to 'guile-final'.  This would introduce
'guile-final' in the system closure, which is otherwise absent.  By
referring to 'guile-2.2' we remove that extra Guile.

* guix/gexp.scm (default-guile): Refer to GUILE-2.2 instead of
GUILE-FINAL.
2017-11-29 23:40:39 +01:00
Ludovic Courtès a912c723f7
gexp: 'compiled-modules' disables deprecation warnings by default.
This avoids repeated deprecation messages, particularly while running
'guix system build' or similar.

* guix/gexp.scm (gexp->derivation): Add #:deprecation-warnings.  Pass it
to 'compiled-modules'.
(compiled-modules): Add #:deprecation-warnings and honor it.
* doc/guix.texi (G-Expressions): Update 'gexp->derivation'
documentation.
* guix/packages.scm (patch-and-repack): Pass #:deprecation-warnings #t.
2017-11-29 16:44:54 +01:00
Ludovic Courtès 0a154c15a8
lint: Adjust file-name length test for out-of-tree file names.
* guix/scripts/lint.scm (check-patch-file-names): Adjust
file-name-length calculation.
2017-11-28 15:52:01 +01:00
Ludovic Courtès eef01cfe8e
lint: 'patch-file-names' checks for file name length.
Reported at <https://bugs.gnu.org/27943>
by Danny Milosavljevic <dannym@scratchpost.org>.

* guix/scripts/lint.scm (%distro-directory): New variable.
(check-patch-file-names): Add check for the file name length.
* tests/lint.scm ("patches: file name too long"): New test.
2017-11-28 15:05:55 +01:00
Ludovic Courtès 0d2ecf8b50
ui: Avoid "pkg:out" syntax when reporting collisions.
* guix/ui.scm (call-with-error-handling)[manifest-entry-output*]: New
procedure.  Use it when reporting collisions.
2017-11-28 10:18:40 +01:00
Ludovic Courtès 026f6a42b6
gnu-maintenance: Relax recursion cutoff in 'latest-ftp-release'.
Fixes <https://bugs.gnu.org/25020>.
Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>.

* guix/gnu-maintenance.scm (latest-ftp-release)[contains-digit?]: Remove.
Relax test as to whether to recurse into subdirectories.
2017-11-24 18:48:11 +01:00
Ludovic Courtès b5bfa4773d
ui: 'known-variable-definition' protects against module cycles.
Fixes <https://bugs.gnu.org/29358>.
Reported by Marius Bakke <mbakke@fastmail.com>.

* guix/ui.scm (known-variable-definition): Add 'visited' set to guard
against cycles on 2.0.
2017-11-24 18:16:43 +01:00
Ludovic Courtès cd295fbe17
Revert "Add (guix self) and use it when pulling."
This reverts commit 5f93d97005.

'guix pull' would fail because (guix self) needs 'scheme-files'
from (guix discovery), which was not exported until now.
2017-11-21 23:53:10 +01:00
Ludovic Courtès 5f93d97005
Add (guix self) and use it when pulling.
This mitigates <https://bugs.gnu.org/27284>.

* guix/self.scm: New file.
* Makefile.am (MODULES): Add it.
* build-aux/build-self.scm (libgcrypt, zlib, gzip, bzip2, xz)
(false-if-wrong-guile, package-for-current-guile, guile-json)
(guile-ssh, guile-git, guile-bytestructures): Remove.
(build): Rewrite to simply delegate to 'compiled-guix'.
* gnu/packages.scm (%distro-root-directory): Rewrite to try different
directories.
* guix/discovery.scm (guix): Export 'scheme-files'.
* guix/scripts/pull.scm (build-and-install): Split into...
(install-latest): ... this.  New procedure.  And...
(build-and-install): ... this, which now takes a monadic value argument.
(indirect-root-added): Remove.
(guix-pull): Call 'add-indirect-root'.  Call 'build-from-source' and
pass the result to 'build-and-install'.
2017-11-21 23:09:16 +01:00
Ludovic Courtès fe9b3ec3ee
git: Do not add '.git' to the store.
This makes 'latest-repository-commit' significantly more efficient and
reduces disk usage in the store.

* guix/git.scm (copy-to-store)[dot-git?]: New procedure.
Pass it as the #:select? argument to 'add-to-store'.
2017-11-21 23:09:16 +01:00
Ludovic Courtès a6591381fc
pull: Trim import list.
* guix/scripts/pull.scm: Remove useless imports.
2017-11-21 23:09:16 +01:00
Ludovic Courtès de98b302a1
gexp: 'directory-union' has a #:quiet? parameter.
* guix/gexp.scm (directory-union): Add #:quiet? and honor it.
2017-11-21 23:09:16 +01:00
Ludovic Courtès 59523429d6
union: Parametrize the symlink procedure .
* guix/gexp.scm (directory-union): Add #:hard-links and honor it.
* guix/build/union.scm (union-build): Add #:symlink parameter.
2017-11-21 23:09:16 +01:00
Ludovic Courtès a5792deca5
compile: Put an upper bound on the number of workers.
* guix/build/compile.scm (compile-files): Don't use more than 8 workers.
2017-11-20 23:42:55 +01:00
Ludovic Courtès bd7e136d29
Add semicolon in commands that set GUIX_PROFILE.
Fixes <https://bugs.gnu.org/28223>.
Reported by Rosebud Uplink <Uplink.Introversion@outlook.com>.

* doc/guix.texi (Binary Installation): Add missing semicolon after
'GUIX_PROFILE=' line.
(Invoking guix package): Likewise.
* gnu/system.scm (operating-system-etc-service)[profile]: Likewise.
* guix/build/profiles.scm (build-etc/profile): Likewise.
2017-11-20 18:43:10 +01:00
Ludovic Courtès 85f4f7b790
zlib: Fix race condition when closing gzip ports.
Fixes <https://bugs.gnu.org/29335>.

* guix/zlib.scm (close-procedure): Remove.
(make-gzip-input-port): Do (dup (fileno port)) to get a file descriptor
for 'gzdopen'.  Close PORT before returning.  Use 'gzclose' as the
'close' procedure of the returned port.
(make-gzip-output-port): Likewise.
2017-11-19 23:09:01 +01:00
Ludovic Courtès 52d174d6d1
ssh: Use (guix i18n).
* guix/ssh.scm: Use (guix i18n) instead of (guix ui).
2017-11-19 23:09:01 +01:00
Julien Lepiller 965ba54be0
licenses: Add cddl1.1.
* guix/licenses.scm (cddl1.1): New variable.
2017-11-18 11:29:36 +01:00
Ricardo Wurmus 82af2c2f0f
build-system: texlive: Only make a union of directories.
* guix/build/texlive-build-system.scm (configure): Filter the input
directories to ensure that source tarballs are excluded.
2017-11-18 11:18:42 +01:00
Leo Famulari d8e257113c
build-system/go: Don't let Go executables refer to the Go compiler.
* guix/build/go-build-system.scm (remove-store-reference, remove-go-references):
New procedures.
(%standard-phases): Add 'remove-go-references' phase.
* guix/build-system/go.scm (go-build): Add allow-go-reference? key.
2017-11-17 18:25:20 -05:00
Ludovic Courtès d5ce7bcfa2
workers: Display backtrace in pre-unwind handler.
* guix/workers.scm (worker-thunk): Add (const #f) as the 'catch'
handler, and move previous handler as pre-unwind handler.  Protect
against 'make-stack' returning #f.
2017-11-17 10:47:56 +01:00
Ludovic Courtès 232b3d3101
workers: 'pool-idle?' returns true only if the workers are idle.
Fixes <https://bugs.gnu.org/28779>.
Reported by Eric Bavier <bavier@cray.com>.

* guix/workers.scm (<pool>)[busy]: New field.
(worker-thunk): Add #:idle and #:busy and use them.
(make-pool): Pass #:busy and #:idle to 'worker-thunk'.  Pass a 'busy'
value to '%make-pool'.
* guix/workers.scm (pool-idle?): Check whether 'pool-busy' returns zero
and adjust docstring.
2017-11-17 10:10:30 +01:00
Ludovic Courtès 304a53f67a
ui: Add source file name to the package search metrics.
* guix/ui.scm (%package-metrics): Include 'package-location'.  Increase
score of the other fields.
2017-11-16 08:45:15 +01:00
Ludovic Courtès 7482b98120
cve: Use 'http-fetch/cached' instead of having custom caching.
That way CVE fetching benefits from 'If-Modified-Since' handling.

* guix/http-client.scm (http-fetch/cached): Add #:write-cache and
 #:cache-miss parameters and honor them.
* guix/cve.scm (%current-year-ttl, %past-year-ttl): Reduce.
(call-with-cve-port): Remove.
(write-cache): New procedure.
(fetch-vulnerabilities): Rewrite in terms of 'http-fetch/cached'.
2017-11-16 08:45:15 +01:00
Ludovic Courtès 866f37fb7e
download: Improve efficiency of 'write-request' over TLS.
This is another instance of <https://bugs.gnu.org/22966>.
The Microsoft-IIS/7.5 server at static.nvd.nist.gov would sometimes hang
when receiving our requests byte by byte.

* guix/build/download.scm (tls-wrap) [!guile-2.0]: Add 'setvbuf' call.
2017-11-16 08:45:14 +01:00
Ludovic Courtès 9f8605958e
download: Pass the timeout to 'ftp-retr'.
This ensures the timeout applies when connecting to the port returned by
PASV.

* guix/ftp-client.scm (ftp-list): Add #:timeout parameter.  Use
'connect*' instead of 'connect' and pass TIMEOUT.
(ftp-retr): Likewise.
* guix/build/download.scm (ftp-fetch): Pass TIMEOUT to 'ftp-retr'.
2017-11-14 23:46:53 +01:00
Leo Famulari 412716eff2
grafts: Clarify the status of the workaround for <http://bugs.gnu.org/24659>.
* guix/build/graft.scm (mkdir-p*): Annotate.
2017-11-14 16:38:02 -05:00
Leo Famulari d0b87779f0
download: Use HTTPS for the first ImageMagick mirror.
* guix/download.scm (%mirrors)[imagemagick]: Use HTTPS for <sunsite.icm.edu.pl>.
2017-11-12 17:50:01 -05:00
Leo Famulari ecc585711e
download: Try FTP servers last.
* guix/download.scm (%mirrors)[savannah, kernel.org, apache, xorg, imagemagick]:
Re-arrange so that FTP is last.
2017-11-12 17:50:01 -05:00
Ludovic Courtès b1488c7653
git: Check whether 'clone-init-options' is defined.
This is a followup to 195f0d05c3.

* guix/git.scm (clone*): Check whether 'clone-init-options' is defined
before using it.
2017-11-11 20:09:25 +01:00
Ludovic Courtès 65a19abf3f
download: Work around more bogus HTTP handling in Guile 2.2 <= 2.2.2.
Reported by Mark H Weaver <mhw@netris.org>
at <https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00190.html>.

* guix/build/download.scm (guile-2.2) [write-request-line]: Backport
Guile commit 6ad28ae3bc6a6d9e95ab7d70510d12c97673a143.
2017-11-11 15:20:02 +01:00
Ludovic Courtès 59da6f04f4
download: Work around bogus HTTP handling in Guile 2.2 <= 2.2.2.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>
at <https://lists.gnu.org/archive/html/guix-devel/2017-11/msg00070.html>.

* guix/build/download.scm (write-request-line) [guile-2.2]: New
procedure.
2017-11-10 23:11:52 +01:00
Ludovic Courtès 195f0d05c3
git: Work around wrong default argument of 'clone'.
Fixes <https://bugs.gnu.org/29238>.
Reported by Benjamin Andresen <benny@in-ulm.de>.

* guix/git.scm (clone*): Pass second argument to 'clone'.
2017-11-10 13:07:54 +01:00
Ludovic Courtès dc856223f5
ui: Add an 'unbound-variable' exception printer.
* guix/ui.scm (print-unbound-variable-error): New variable.
Use it as the 'unbound-variable' printer.
2017-11-09 23:54:47 +01:00
Ludovic Courtès a2985bb101
ui: Provide hints for unbound-variable errors.
* guix/ui.scm (known-variable-definition): New procedure.
(report-load-error): Handle 'unbound-variable'.
2017-11-09 23:54:47 +01:00
Ludovic Courtès 935542fbde
ui: Add 'display-hint'.
* guix/ui.scm (known-variable-definition): New procedure.
(report-load-error): Use it.
2017-11-09 23:54:47 +01:00
Ludovic Courtès 23735137eb
ui: Define and honor '&error-location' and '&fix-hint' conditions.
* guix/utils.scm (&error-location, &fix-hint): New condition types.
* guix/ui.scm (report-load-error): Handle them.
(call-with-error-handling): Honor '&error-location'.
2017-11-08 22:31:58 +01:00
Ludovic Courtès 37eed374d9
ui: Introduce (guix i18n).
* guix/ui.scm (G_, N_, _P, %gettext-domain, %package-text-domain): Move
to...
* guix/i18n.scm: ... here.  New file.
2017-11-08 22:31:58 +01:00
Ricardo Wurmus 25e51b1c45
guix: Add archive support for bioconductor-uri.
* guix/build-system/r.scm (bioconductor-uri): Also return the archive URL.
* guix/import/cran.scm (latest-bioconductor-release, fetch-description):
Adjust because bioconductor-uri now returns a list.
2017-11-07 08:14:09 +01:00
Ricardo Wurmus 27baf50956
import: cran: Use Bioconductor 3.6 helpers.
* guix/import/cran.scm (bioconductor-mirror-url): Remove procedure.
(fetch-description): Extract DESCRIPTION file from tarball for Bioconductor
packages.
(latest-bioconductor-release): Use latest-bioconductor-package-version.
2017-11-07 08:13:35 +01:00
Ricardo Wurmus 84dfdc5759
import: cran: Add support for Bioconductor 3.6.
* guix/import/cran.scm (%bioconductor-version,
%bioconductor-packages-list-url): New variables.
(bioconductor-packages-list, latest-bioconductor-package-version): New
procedures.
2017-11-07 08:13:34 +01:00
Ricardo Wurmus 6b46b04f91
import: utils: Add string helpers.
* guix/import/utils.scm (read-lines, chunk-lines): New procedures.
2017-11-07 08:07:51 +01:00
Ludovic Courtès 8e57e416c0
refresh: Account for hidden packages.
Suggested by Marius Bakke <mbakke@fastmail.com>
in <https://bugs.gnu.org/29177>.

* guix/scripts/refresh.scm (all-packages): Pass #:select? to
'fold-packages'.
2017-11-07 00:12:10 +01:00
Ludovic Courtès c9405c461b
compile: Fix VPATH builds.
Fixes <https://bugs.gnu.org/29091>.
Reported by Eric Bavier <bavier@cray.com>.

* guix/build/compile.scm (relative-file): New procedure.
(load-files): Use it before calling 'file-name->module-name'.
(compile-files): Likewise before calling 'scm->go'.
* guix/build/pull.scm (build-guix): Remove 'with-directory-excursion'
and file name hack from ce33c3af76.
Pass OUT to 'all-scheme-files'.
2017-11-07 00:12:10 +01:00
Ludovic Courtès 0ad5f80982
Fix ambiguous imports.
* gnu/packages/ocaml.scm: Hide 'zip' from (srfi srfi-1).
* guix/git.scm: Select 'mkdir-p' from (guix build utils).
2017-11-07 00:12:10 +01:00
nee 6692d8454a
guix: records: Add match-record.
* guix/records.scm: New syntax-rule.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-11-05 15:21:53 +01:00
Tobias Geerinckx-Rice 63ae4800de
download: Refresh the cpan.org mirror list.
* guix/download.scm (%mirrors)[cpan]: Update the list of CPAN mirrors (of
which several are dead) with a more-or-less geographically diverse selection.
2017-11-01 01:02:03 +01:00
Tobias Geerinckx-Rice b5c7574b2f
Revert "import: cpan: Use HTTPS for home pages."
This reverts commit 29f7bf59d5d4d4b848eaedc6766bb4e02cae20d3: HTTPS support
at search.cpan.org is unreliable, at best.  Don't rely on it.
2017-10-30 17:20:42 +01:00
Tobias Geerinckx-Rice 29f7bf59d5
import: cpan: Use HTTPS for home pages.
* guix/import/cpan.scm (cpan-home): Use HTTPS.
* tests/cpan.scm ("cpan->guix-package"): Expect it.
2017-10-29 17:32:35 +01:00
Tobias Geerinckx-Rice 6d176ad379
import: cpan: Actually use CPAN-HOME.
* guix/import/cpan.scm (cpan-module->sexp): Use the CPAN-HOME procedure.
2017-10-29 17:32:35 +01:00
Tobias Geerinckx-Rice 73f33b9379
import: cpan: Add trailing "/" to CPAN-HOME.
Prevent regression after commit e4bc172730.

* guix/import/cpan.scm (cpan-home): Add trailing "/".
2017-10-29 17:32:12 +01:00
Eric Bavier e4bc172730
import: cpan: Add trailing "/" on home-page.
This appeases 'guix lint', which otherwise complains about permanent
redirects.

* guix/import/cpan.scm (cpan-module->sexp): Add trailing "/" on home-page.
* tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
2017-10-28 18:20:59 -05:00
Eric Bavier 23055424f2
import: cpan: Propagate imported dependencies.
This is most often the need for perl module dependencies.

* guix/import/cpan.scm (cpan-module->sexp): 'inputs -> 'propagated-inputs.
* tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.
2017-10-28 18:20:58 -05:00
Ludovic Courtès 34b1f339cd
graph: Remove mention of Graphviz from the summary line.
* guix/scripts/graph.scm (show-help): Remove mention of Graphviz from
the summary line.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 0a2ce1ea0a
import: elpa: Do not abort when failing to download the archive.
* guix/import/elpa.scm (elpa-fetch-archive): Use 'http-fetch/cached'
directly instead of 'call-with-downloaded-file'.  This ensures we don't
just abort when networking access is lacking, which is required to allow
'guix refresh -c refresh' to proceed.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 90297811a9
import: github: Gracefully handle multiple-URL origins.
* guix/import/github.scm (latest-release)[origin-github-uri]: New
procedure.  Use it.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 6d6d193221
lint: 'refresh' gracefully handles lack of networking access.
* guix/scripts/lint.scm (check-for-updates): Wrap
'package-latest-release*' call in 'with-networking-fail-safe'.
2017-10-28 09:45:54 +02:00
Ludovic Courtès 4b879e0acf
lint: Extract network-related exception handling.
* guix/scripts/lint.scm (call-with-networking-fail-safe): New procedure.
(with-networking-fail-safe): New macro.
(current-vulnerabilities*): Rewrite in terms of 'with-networking-fail-safe'.
2017-10-28 09:45:54 +02:00