Commit Graph

2899 Commits (df981d8b36754c820f41f01758c585bf282065c1)

Author SHA1 Message Date
Ludovic Courtès 2633bd324b
store: 'references/substitutes' save an RPC is the trivial case.
* guix/store.scm (references/substitutes): Save a
'substitutable-path-info' call when MISSING is empty.
2017-07-02 00:41:12 +02:00
Mathieu Othacehe b02469d298
guix: git: Stop using libgit2-shutdown.
* guix/git.scm (with-libgit2): Stop calling (libgit2-shutdown) to prevent
segfaults when pointer finalizers are run.
2017-07-01 16:32:42 +02:00
Ludovic Courtès a8ac4f081a
vm: Estimate the disk size by default.
* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.
2017-06-30 00:16:50 +02:00
Ludovic Courtès 0040140d34
guix package: Allow '--rollback', after all.
* guix/scripts/package.scm (%options): Add "rollback" as an alias for
"roll-back".
2017-06-26 22:52:06 +02:00
Ludovic Courtès fc8fdcf56e
guix package: 'guix package -r PKG -u' does not upgrade PKG.
Fixes <http://bugs.gnu.org/27262>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/package.scm (transaction-upgrade-entry): Check if ENTRY
matches 'manifest-transaction-removal-candidate?' and return TRANSACTION
if it does.
(process-actions): Move 'options->removable' from step 2 to step 1.
2017-06-26 22:52:06 +02:00
Ludovic Courtès 6d382339de
profiles: Add 'manifest-transaction-removal-candidate?'.
* guix/profiles.scm (manifest-transaction-removal-candidate?): New
procedure.
* tests/profiles.scm ("manifest-transaction-removal-candidate?"): New
test.
2017-06-26 22:52:06 +02:00
Ludovic Courtès 94a400beba
import cran: Generate a valid 'license' field for "GPL".
Fixes <http://bugs.gnu.org/27294>.
Reported by Joshua Sierles <joshua@joshua.si>.

* guix/import/cran.scm (string->license) <"GPL">: Return a quoted list.
2017-06-26 22:52:06 +02:00
Ludovic Courtès a1b46bdc06
guix package: Warn about packages that no longer exist.
Fixes <http://bugs.gnu.org/27261>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/package.scm (transaction-upgrade-entry): Add call to
'warning' when NAME cannot be found in the package set.
2017-06-25 22:29:15 +02:00
Ludovic Courtès 4c228f9e54
refresh: Be more verbose when passed an explicit package list.
* guix/scripts/refresh.scm (check-for-package-update): Use
'version-compare' instead of 'version>?'.  When WARN? is true, print
something for the '=' and '<' cases.
2017-06-24 23:28:23 +02:00
Ludovic Courtès 5df1395a8d
store: Define a default port for TCP connections.
* guix/store.scm (%default-guix-port): New variable.
(connect-to-daemon)[connect]: Use it when (uri-port uri) is #f.
* doc/guix.texi (The Store): Mention the default port number.
2017-06-22 10:59:07 +02:00
Ludovic Courtès 7ae97a4c3f
store: Pass a socket type hint to 'getaddrinfo'.
* guix/store.scm (open-inet-socket): Pass hints in the 'getaddrinfo'
call.
2017-06-22 10:59:06 +02:00
Ludovic Courtès afd06f605b
environment: Disable profile collision checks.
Reported by Efraim Flashner.
This is a followup to a654dc4bcf.

* guix/profiles.scm (profile-derivation): Add #:allow-collisions? and
honor it.
* guix/scripts/environment.scm (inputs->profile-derivation): Pass
 #:allow-collisions? #f to 'profile-derivation'.
* tests/guix-environment.sh: Test "guix environment guix".
2017-06-21 16:53:22 +02:00
Ludovic Courtès 2e2b5ad7bb
profiles: Move 'manifest-entry-dependencies' user after definition.
Reported by Efraim Flashner.

* guix/profiles.scm (manifest-transitive-entries): Move after
<manifest-entry> definition.
2017-06-21 11:59:33 +02:00
Ludovic Courtès 8c9e90debf
guix package: '--search-paths' shows search paths from propagated inputs.
* guix/scripts/package.scm (process-query) <'search-paths>: Use
'manifest-transitive-entries' instead of 'manifest-entries'.
2017-06-21 11:05:53 +02:00
Ludovic Courtès a654dc4bcf
profiles: Catch and report collisions in the profile.
* guix/profiles.scm (&profile-collision-error): New error condition.
(manifest-transitive-entries, manifest-entry-lookup, lower-manifest-entry)
(check-for-collisions): New procedures.
(profile-derivation): Add call to 'check-for-collisions'.
* guix/ui.scm (call-with-error-handling): Handle '&profile-collision-error'.
* tests/profiles.scm ("collision", "collision of propagated inputs")
("no collision"): New tests.
2017-06-21 11:05:53 +02:00
Ludovic Courtès 81e3485c0d
guix package: Always upgrade packages that have propagated inputs.
* guix/scripts/package.scm (transaction-upgrade-entry): Always upgrade
packages that have propagated inputs.
2017-06-21 11:05:53 +02:00
Ludovic Courtès b3a00885c0
profiles: Manifest entries keep a reference to their parent entry.
* guix/profiles.scm (<manifest-entry>)[parent]: New field.
(package->manifest-entry): Add #:parent parameter.  Fill out the
'parent' field of <manifest-entry>; pass #:parent in recursive calls.
* guix/profiles.scm (sexp->manifest)[sexp->manifest-entry]: New
procedure.  Use it for version 3.
* tests/profiles.scm ("manifest-entry-parent"): New procedure.
("read-manifest")[entry->sexp]: Add 'manifest-entry-parent' to the
result.
2017-06-21 11:05:52 +02:00
Ludovic Courtès 55b4715fd4
profiles: Represent propagated inputs as manifest entries.
* guix/profiles.scm (package->manifest-entry): Turn DEPS into a list of
manifest entries.
(manifest->gexp)[entry->gexp]: Call 'entry->gexp' on DEPS.
Bump version to 3.
(sexp->manifest)[infer-dependency]: New procedure.
Use it for versions 1 and 2.  Parse version 3.
(manifest-inputs)[entry->gexp]: New procedure.
Adjust to 'dependencies' being a list of <manifest-entry>.
* tests/profiles.scm ("packages->manifest, propagated inputs")
("read-manifest"): New fields.
2017-06-21 11:05:52 +02:00
Arun Isaac 148585c240
gnu: Move contents of zip module into compression module.
* gnu/packages/zip.scm (zip, unzip, zziplib, perl-zip): Move to...
* gnu/packages/compression.scm: ...here.
* gnu/packages/zip.scm: Delete file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Unregister deleted file.
* po/packages/POTFILES.in: Unregister deleted file.
* gnu/packages/{audio, avr, bioinformatics, busybox, cdrom, ci, compression,
docbook, documentation, fonts, fpga, game-development, games, gl, gnome,
gnuzilla, graphics, guile, haskell, image, java, kodi, ldc, libreoffice,
markup, maths, mc, monitoring, music, php, pretty-print, python, scheme,
smalltalk, statistics, synergy, tex, textutils, video, web-browsers, xml,
zip}.scm, guix/build-system/{ant, font}.scm, guix/{download, packages}.scm:
Adapt module import.
2017-06-20 18:10:35 +05:30
Ludovic Courtès e037e9dbec
store: Buffer RPC writes.
For a command like:

  guix build python2-numpy -n

this reduces the number of 'write' syscalls from 9.5K to 2.0K.

* guix/store.scm (<nix-server>)[buffer, flush]: New fields.
(open-connection): Adjust accordingly.  Call 'buffering-output-port' to
compute the two new fields.
(write-buffered-output, buffering-output-port): New procedures.
(operation): Write to (nix-server-output-port server).  Call
'write-buffered-output'.
2017-06-19 23:23:14 +02:00
Ricardo Wurmus 00f037ca44
build-system/texlive: Update to texlive-2017.1, revision 44591.
* guix/build-system/texlive.scm (%texlive-tag): Change to texlive-2017.1.
(%texlive-revision): Change to 44591.
2017-06-19 08:22:04 +02:00
Ludovic Courtès d46c4423f4
discovery: 'scheme-files' returns '() for a non-accessible directory.
Fixes a regression introduced in
d27cc3bfaa.

Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/discovery.scm (scheme-files): Catch 'scandir*' system errors.
Return '() and optionally raise a warning upon 'system-error'.
* tests/discovery.scm ("scheme-modules, non-existent directory"): New
test.
2017-06-18 00:14:07 +02:00
Ludovic Courtès 3bacc655c5
syscalls: 'opendir*' error message shows the file name.
* guix/build/syscalls.scm (opendir*): Add NAME to the 'system-error'
message.
2017-06-18 00:14:07 +02:00
Ludovic Courtès f4453df9a5
store: Add an RPC counter.
* guix/store.scm (%rpc-calls): New variable.
(show-rpc-profile, record-operation): New procedures.
(operation): Add call to 'record-operation'.
* guix/ui.scm (run-guix-command): Wrap COMMAND-MAIN in 'dynamic-wind'.
Run EXIT-HOOK.
2017-06-16 17:08:22 +02:00
Ludovic Courtès d27cc3bfaa
discovery: Rewrite 'scheme-files' using 'scandir*'.
On a command like:

  guix environment --ad-hoc coreutils -- true

this reduces the number of 'stat' calls from 14.1K to 9.7K on my
setup (previously each getdents(2) call would be followed by one stat(2)
call per entry).

* guix/discovery.scm (scheme-files): Rewrite using 'scandir*'.
2017-06-16 17:08:22 +02:00
Ludovic Courtès fa73c19373
syscalls: Add 'scandir*'.
* guix/build/syscalls.scm (%struct-dirent-header): New C struct.
(string->pointer/utf-8, pointer->string/utf-8): New procedures.
(opendir*, closedir*, readdir*, scandir*): New procedures.
* tests/syscalls.scm ("scandir*, ENOENT")
("scandir*, ASCII file names", "scandir*, UTF-8 file names")
("scandir*, properties): New tests.
2017-06-16 17:08:22 +02:00
Ludovic Courtès cbee955901
ui: Remove the empty string from '%load-extensions'.
* guix/ui.scm (run-guix): Set %LOAD-EXTENSIONS.
2017-06-15 23:07:47 +02:00
Ludovic Courtès 7ebc6cf869
packages: Patches can be any lowerable object.
* guix/packages.scm (patch-and-repack)[instantiate-patch]: Replace
'origin?' with 'struct?'.
2017-06-15 23:07:47 +02:00
Ricardo Wurmus afbc94194e
guix: Add texlive importer.
* guix/import/texlive.scm: New file.
* guix/scripts/import/texlive.scm: New file.
* Makefile.am (MODULES): Add them.
* tests/texlive.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/scripts/import.scm (importers): Add texlive importer.
* doc/guix.texi (Invoking guix import): Document it.
2017-06-15 17:03:19 +02:00
Ricardo Wurmus 205794c868
build-system: Add 'texlive-build-system'.
* guix/build-system/texlive.scm: New file.
* guix/build/texlive-build-system.scm: New file.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document it.
* gnu/packages/tex.scm (%texlive-tag, %texlive-revision): Remove variables.
(texlife-ref): Remove procedure.
2017-06-15 17:03:16 +02:00
Ricardo Wurmus 942c4f812a
licenses: Add common TeX and LaTeX licenses.
* guix/licenses.scm (knuth, lppl, lppl1.0+, lppl1.2, lppl1.2+, lppl1.3,
lppl1.3+, lppl1.3a, lppl1.3a+, lppl1.3b, lppl1.3b+, lppl1.3c, lppl1.3c+): New
variables.
2017-06-15 17:03:14 +02:00
Ricardo Wurmus bef0db3769
guix: Add download-svn-to-store.
* guix/svn-download.scm (download-svn-to-store): New procedure.
2017-06-15 17:03:14 +02:00
Danny Milosavljevic d1e7ca2df8
import: pypi: Always use pypi.io URL with downcased package name.
* guix/import/pypi.scm (make-pypi-sexp): Always use pypi.io URL with
downcased package name.
2017-06-15 09:49:13 +02:00
Ludovic Courtès 4e863eb35f
guix package: '--search' sorts by relevance.
* guix/scripts/package.scm (find-packages-by-description): Rewrite to
compute a score based on the number of regexps matched and the number of
matches for each regexp.  Sort according to this score and return it as
a second value.
(process-query) <'search>: Capture the two return values of
'find-packages-by-description'.  Pass #:extra-fields to
'package->recutils'.
* doc/guix.texi (Invoking guix package): Mention relevance, give an
example.
2017-06-13 23:22:19 +02:00
Ludovic Courtès 4ee79f22f5
ui: 'package->recutils' takes #:extra-fields.
* guix/ui.scm (package->recutils): Add #:extra-fields and honor it.
2017-06-13 23:22:19 +02:00
Ludovic Courtès 015f17e8b9
derivations: Introduce 'read-derivation-from-file'.
This avoids the open/fstat/close syscalls upon a cache hit that we had
with the previous idiom:

  (call-with-input-file file read-derivation)

where caching happened in 'read-derivation' itself.

* guix/derivations.scm (%read-derivation): Rename to...
(read-derivation): ... this.
(read-derivation-from-file): New procedure.
(derivation-prerequisites, substitution-oracle)
(derivation-prerequisites-to-build):
(derivation-path->output-path, derivation-path->output-paths):
(derivation-path->base16-hash, map-derivation): Use
'read-derivation-from-file' instead of (call-with-input-file …
read-derivation).
* guix/grafts.scm (item->deriver): Likewise.
* guix/scripts/build.scm (log-url, options->things-to-build): Likewise.
* guix/scripts/graph.scm (file->derivation): Remove.
(derivation-dependencies, %derivation-node-type): Use
'read-derivation-from-file' instead.
* guix/scripts/offload.scm (guix-offload): Likewise.
* guix/scripts/perform-download.scm (guix-perform-download): Likewise.
* guix/scripts/publish.scm (load-derivation): Remove.
(narinfo-string): Use 'read-derivation-from-file'.
2017-06-12 17:53:51 +02:00
Ludovic Courtès b46712159c
store: Speed up 'add-to-store'.
* guix/store.scm (add-to-store): Remove 'lstat' call.
2017-06-12 17:53:51 +02:00
Mathieu Othacehe f96752e378
bootloader: Rename boot-name to bootloader-name.
* gnu/system (<boot-parameters>)[boot-name]: Rename field to...
[bootloader-name]: ... this.  Adjust users.
* gnu/scripts/system.scm: Adjust accordingly.
2017-06-10 18:32:11 +02:00
Mathieu Othacehe 6b7b3ca981
guix: git: Add new module.
* guix/git.scm: New file.
* configure.ac: Check for (guile git).
* Makefile.am: Build guix/git.scm if (guile git) is available.
2017-06-09 09:48:26 +02:00
Maxim Cournoyer df34f47894
build-system: emacs: Factorize include/exclude default arguments.
The `install' phase of the emacs-build-system contained default arguments
duplicated from the host side `emacs-build' procedure. This change factorizes
them so that:

1. They are not duplicated.
2. They can be reused and extended easily when defining emacs packages.

* guix/build/emacs-build-system.scm (%default-include, %default-exclude): New
  variables.
(install): Use %default-include and %default-exclude as default arguments.
* guix/build-system/emacs.scm: Use and re-export %default-include,
%default-exclude from (guix build emacs-build-system).
(emacs-build): Use %default-include and %default-exclude as default arguments.

Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
2017-06-08 19:45:27 +05:30
James Richardson 4679dd6967
import: cpan: Update CPAN importer to use MetaCPAN v1 API.
* guix/import/cpan.scm (module->dist-name, cpan-fetch): Use metacpan.org
URLs.
* tests/cpan.scm ("cpan->guix-package"): Adjust accordingly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-06-07 15:06:34 +02:00
Ludovic Courtès de9d8f0e29
ssh: Improve error reporting when 'send-files' fails.
Fixes <http://bugs.gnu.org/26972>.

* guix/ssh.scm (store-import-channel)[import]: Add 'consume-input'
procedure.  Wrap body in 'catch' and 'guard'.  Use 'open-remote-pipe'
with OPEN_BOTH instead of 'open-remote-output-pipe'.
(send-files): After the 'channel-send-eof' call, do (read port).
Interpret the result sexp and raise an error condition if needed.
2017-06-04 23:00:32 +02:00
Mathieu Othacehe 1335ac3141
scripts: refresh: Add -m manifest option.
* guix/scripts/refresh.scm (%options): Add -m option,
(show-help): document it,
(packages-from-manifest): new procedure,
(guix-refresh): use packages from manifest if specified, otherwise
keep the previous behaviour.
* doc/guix.texi (Invoking guix refresh): document new option.
2017-06-04 09:07:43 +02:00
Marius Bakke 8b8bf88f21
licenses: Add CC-BY 4.0.
* guix/licenses.scm (cc-by4.0): New variable.
2017-06-03 17:35:49 +02:00
Ludovic Courtès 36a9d3f10d
substitute: Do not display the installed size.
* guix/scripts/substitute.scm (process-substitution): Do not show the
installed size in the "Downloading" message.
2017-06-02 18:47:07 +02:00
Ludovic Courtès dcfc6f213b
ui: 'show-what-to-build' warns when we don't have enough disk space.
* guix/ui.scm (check-available-space): New procedure.
(show-what-to-build): Compute 'installed-size' and call
'check-available-space'.
2017-06-02 18:47:07 +02:00
Ludovic Courtès 65f224dc8d
syscalls: Provide 'free-disk-space'.
* guix/build/syscalls.scm (free-disk-space): New procedure.
* guix/scripts/gc.scm (guix-gc)[ensure-free-space]: Use it instead of
'statfs'.
2017-06-02 18:47:07 +02:00
Ludovic Courtès d9bad2f082
ui: 'show-what-to-build' displays how much will be downloaded.
* guix/ui.scm (show-what-to-build)[download-size]
[display-download-size?]: New variables.
Add cases for when DISPLAY-DOWNLOAD-SIZE? is true.
2017-06-02 18:47:06 +02:00
Ludovic Courtès 2dc98729af
derivations: 'derivation-prerequisites-to-build' returns <substitutable>.
* guix/derivations.scm (derivation-prerequisites-to-build): Rename
 #:substitutable? to #:substitutable-info.
[derivation-substitutable?]: Rename to...
[derivation-substitutable-info]: ... this.  Return a list of <substitutable>.
Second return value is now a list of <substitutable> instead of a list
of strings.
* guix/ui.scm (show-what-to-build)[substitutable?]: Rename to...
[substitutable-info]: ... this.
Adjust to new 'derivation-prerequisites-to-build' return value type.
* tests/derivations.scm ("derivation-prerequisites-to-build and
substitutes"): Adjust.
("derivation-prerequisites-to-build and substitutes, local build"):
Likewise.
2017-06-02 18:47:06 +02:00
Ludovic Courtès ef51ac21ee
derivations: 'substitution-oracle' returns a <substitutable>.
* guix/derivations.scm (substitution-oracle): Use
'substitution-path-info' instead of 'substitution-paths'.  Turn SUBST
into a vhash from path to <substitutable>.  Change the returned
procedure to provide a <substitutable> instead of a Boolean.
* tests/derivations.scm ("substitution-oracle and #:substitute? #f"):
Mock 'substitutable-path-info' instead of 'substitutable-paths'.
2017-06-02 18:47:06 +02:00
Alex Griffin 046175cd4e
build: font: Support font collection files.
* guix/build/font-build-system.scm (install): Support TrueType
Collection (TTC) and OpenType Collection (OTC) files.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-05-31 23:24:41 +02:00
Christopher Baines 151cb9738a
git-download: Fix 'git-predicate' to use absolute paths.
git ls-files will return paths relative to the repository directory. This
commit prepends the repository directory to those paths when calling lstat,
such that 'git-predicate' works if the current working directory is not the
repository directory.

* guix/git-download.scm (git-predicate): Prepend repository directory to the
  file path when calling lstat.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-05-30 18:08:37 +02:00
Ludovic Courtès 27fd13c3c2
download: Work around GnuTLS bug with UTF-8 certificate file names.
Reported by Mark H Weaver <mhw@netris.org>
at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26948#17>.

* guix/build/download.scm (set-certificate-credentials-x509-trust-file!*):
New procedure.
(make-credendials-with-ca-trust-files): Use it instead of
'set-certificate-credentials-x509-trust-file!'.
2017-05-30 13:24:55 +02:00
Ludovic Courtès 8902d0f267
scripts: Set thread names.
This allows 'guix publish' threads as well as 'guix substitute' and
'guix offload' processes to be properly labeled in 'top', 'pstree', etc.

* guix/workers.scm (worker-thunk): Add #:thread-name parameter and honor it.
(make-pool): Likewise.
* guix/scripts/publish.scm (http-write): Add calls to 'set-thread-name'
in bodies of 'call-with-new-thread'.
(guix-publish): Call 'set-thread-name'.   Pass #:thread-name to 'make-pool'.
* guix/scripts/offload.scm (guix-offload): Call 'set-thread-name'.
* guix/scripts/substitute.scm (guix-substitute): Likewise.
2017-05-28 23:13:39 +02:00
Ludovic Courtès aa401f9ba6
syscalls: Add 'thread-name' and 'set-thread-name'.
* guix/build/syscalls.scm (PR_SET_NAME, PR_GET_NAME)
(%max-thread-name-length): New variables.
(%prctl, set-thread-name, thread-name): New procedures.
* tests/syscalls.scm ("set-thread-name"): New test.
2017-05-28 23:13:39 +02:00
Arun Isaac 3d90fa982b
build-system: Add 'font-build-system'.
* Makefile.am (MODULES): Add 'guix/build-system/font.scm' and
  'guix/build/font-build-system.scm'.
* guix/build-system/font.scm: New file.
* guix/build/font-build-system.scm: New file.
* doc/guix.texi (Build Systems): Add 'font-build-system'.
2017-05-28 19:30:05 +05:30
Ricardo Wurmus 3a62dd6b22
build-system: gnu: Fix cross-gcc call.
This is a follow-up to 7b3318e34f.

* guix/build-system/gnu.scm (standard-cross-packages): Use keyword arguments
in cross-gcc call.
2017-05-25 17:02:08 +02:00
Ludovic Courtès 20ed093977
pull: Catch '&missing-dependency-error' raised by 'source-module-closure'.
Fixes <http://bugs.gnu.org/26987>.
Reported by Mathieu Othacehe <m.othacehe@gmail.com>.

* guix/build/pull.scm (depends-on-guile-ssh?): Remove.
(has-all-its-dependencies?): New procedure.
(build-guix): Use it to filter source files.
2017-05-25 14:25:17 +02:00
Ludovic Courtès bfe5264aa1
modules: Raise an error when a dependency could not be found.
* guix/modules.scm (&missing-dependency-error): New error condition.
(source-module-dependencies): Raise it when 'search-path' returns #f.
* tests/modules.scm ("&missing-dependency-error"): New test.
2017-05-25 14:25:17 +02:00
Ludovic Courtès 4862a98be4
base64: Turn into a regular Guile module.
* guix/base64.scm: Replace 'library' form with 'define-module'.
2017-05-25 14:25:17 +02:00
Ludovic Courtès 737397355c
publish: Do not bake the same item several times.
Before this patch, there was a possibility that we'd queue several
baking tasks for the same item.  The first one would bake the item but
subsequent tasks wouldn't check whether the item had been baked in the
meantime and would re-bake it.

* guix/scripts/publish.scm (render-narinfo/cached): Don't call
'bake-narinfo+nar' when (file-exists? cached).
2017-05-24 11:17:42 +02:00
Ludovic Courtès 807ba51950
guix package: Swallow EPIPE upon 'guix package --list-generations'.
Fixes <http://bugs.gnu.org/27017>.
Reported by Alex Vong <alexvong1995@gmail.com>.

* guix/scripts/package.scm (process-query) <'list-generations>: Wrap
body in 'leave-on-EPIPE'.
2017-05-23 23:57:28 +02:00
Efraim Flashner 59d0f067ff
packages: Add aarch64-linux to %supported-systems.
* guix/packages.scm (%supported-systems): Add aarch64-linux.
(%hydra-supported-systems): Remove aarch64-linux.
2017-05-23 21:51:36 +03:00
Arun Isaac d879685176
build-system: emacs: Install only a subset of files.
* guix/build/emacs-build-system.scm (install): Install files matching
  #:include while excluding files matching #:exclude.
* guix/build-system/emacs.scm (emacs-build): Add keyword arguments #:include
  and #:exclude.
2017-05-23 06:12:43 +05:30
Arun Isaac d0a26f3a68
build: emacs: Fix `store-file->elisp-source-file'.
This prevents a ".el.el" extension for source files with no version number in
their file name.

* guix/build/emacs-build-system.scm (store-file->elisp-source-file): Remove
  ".el" extension from file name before splitting to name and version.
2017-05-23 04:35:06 +05:30
Arun Isaac 5ae59eb6d9
guix: lint: Slightly simplify `check-source-file-name'.
* guix/scripts/lint.scm (check-source-file-name): Implement file name matching
  with regular expression.
2017-05-23 04:35:06 +05:30
Arun Isaac ad25e9962e
gnu: lint: Fix typo.
* guix/scripts/lint.scm (check-source-file-name): Fix wrong return value in
  docstring.
2017-05-23 04:35:06 +05:30
Marius Bakke fd3782d13b
Merge branch 'version-0.13.0' 2017-05-22 18:25:01 +02:00
Ludovic Courtès 8a29dc07a4
guix system: Don't warn about old distros for "guix system init".
* guix/scripts/system.scm (process-action): Don't call
'warn-about-old-distro' when ACTION is 'init' or 'build'.
2017-05-21 11:49:07 +02:00
Ludovic Courtès 092c58e745
guix system: Increase image size for 'guix system vm'.
This is a followup to 9a1bfe7648.

* guix/scripts/system.scm (system-derivation-for-action): Add 40MiB to
the default size for 'vm'.
2017-05-21 01:25:16 +02:00
Leo Famulari 40fd5600a2
download: Prune the ImageMagick mirror list.
These sites' TLS certificates are invalid.

* guix/download.scm (%mirrors) <imagemagick>: Remove
mirrors-{au,ru,uk}.go-parts.com.
2017-05-20 14:06:20 -04:00
Ludovic Courtès 96afb480f8
pack: Use 'guile2.0-json' when building with Guile 2.0.
Fixes <http://bugs.gnu.org/27005>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

Fixes a regression introduced in commit
2252f087d4.

* guix/scripts/pack.scm (docker-image)[json]: New variable.
[build]: Use it.
2017-05-20 14:39:50 +02:00
Ludovic Courtès d6bf931cb2
pack: Use 'guile2.0-json' when building with Guile 2.0.
Fixes <http://bugs.gnu.org/27005>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

Fixes a regression introduced in commit
2252f087d4.

* guix/scripts/pack.scm (docker-image)[json]: New variable.
[build]: Use it.
2017-05-20 14:30:01 +02:00
Ludovic Courtès 4ee6584cbf
modules: Add more source-less modules.
* guix/modules.scm (%source-less-modules): New variable.
(source-module-dependencies): Use it.
2017-05-20 10:17:43 +02:00
Ludovic Courtès 4a628d57fc
publish: Fix narinfo rendering for already-compressed items.
Fixes <http://bugs.gnu.org/26975>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/publish.scm (bake-narinfo+nar): Pass #f as the 2nd
argument to 'stat' and properly handle #f.
* tests/publish.scm (wait-for-file): New procedure.
("with cache"): Remove 'wait-for-file' procedure.
("with cache, uncompressed"): New test.
2017-05-20 10:17:36 +02:00
Ludovic Courtès 36c99429a3
union: Gracefully handle dangling symlinks in the input.
Fixes <http://bugs.gnu.org/26949>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

* guix/build/union.scm (file-is-directory?): Return #f when FILE does
not exist or is a dangling symlink.
(file=?): Pass #f as a second argument to 'stat'; return #f when both
ST1 or ST2 is #f.
* tests/profiles.scm (test-equalm): New macro.
("union vs. dangling symlink"): New test.
2017-05-20 10:17:14 +02:00
Maxim Cournoyer 6d1ae43dcb
profiles: Add elapsed time to manual-database hook to output message.
* guix/profiles.scm (manual-database): Add elapsed time to manual-database
hook to output message.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-05-20 10:15:47 +02:00
Ludovic Courtès 7afc2aabdf
modules: Add more source-less modules.
* guix/modules.scm (%source-less-modules): New variable.
(source-module-dependencies): Use it.
2017-05-19 10:45:12 +02:00
Ludovic Courtès ffa5e0a6d2
publish: Fix narinfo rendering for already-compressed items.
Fixes <http://bugs.gnu.org/26975>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/scripts/publish.scm (bake-narinfo+nar): Pass #f as the 2nd
argument to 'stat' and properly handle #f.
* tests/publish.scm (wait-for-file): New procedure.
("with cache"): Remove 'wait-for-file' procedure.
("with cache, uncompressed"): New test.
2017-05-18 21:35:35 +02:00
Ludovic Courtès 27c81fcb86
lint: inputs-should-be-native: Add "cmake".
Suggested by Nicolas Goaziou <mail@nicolasgoaziou.fr>.

* guix/scripts/lint.scm (check-inputs-should-be-native)[input-names]:
Add "cmake".
2017-05-18 14:22:03 +02:00
Ludovic Courtès 22ef06b801
union: Gracefully handle dangling symlinks in the input.
Fixes <http://bugs.gnu.org/26949>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.

* guix/build/union.scm (file-is-directory?): Return #f when FILE does
not exist or is a dangling symlink.
(file=?): Pass #f as a second argument to 'stat'; return #f when both
ST1 or ST2 is #f.
* tests/profiles.scm (test-equalm): New macro.
("union vs. dangling symlink"): New test.
2017-05-18 11:38:48 +02:00
Maxim Cournoyer 516bfed7a3
profiles: Add elapsed time to manual-database hook to output message.
* guix/profiles.scm (manual-database): Add elapsed time to manual-database
hook to output message.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-05-16 23:10:10 +02:00
Ricardo Wurmus 17a69cf623
import cran: Check if pkg-config is needed.
* guix/import/cran.scm (needs-pkg-config?): New procedure.
(description->package): Use it.
2017-05-16 21:43:35 +02:00
Ricardo Wurmus a0f43208cb
import cran: Refactor "needs-zlib?".
* guix/import/cran.scm (tarball-files-match-pattern?): New procedure.
(needs-zlib?): Implement in terms of "tarball-files-match-pattern?".
2017-05-16 21:43:15 +02:00
Ricardo Wurmus ff8c179ab6
import cran: Export package predicates.
* guix/import/cran.scm (cran-package?, bioconductor-package?,
bioconductor-data-package?, bioconductor-experiment-package?): Export
procedures.
2017-05-16 21:42:18 +02:00
Ricardo Wurmus daaa270ecc
import cran: Add predicate for Bioconductor experiment packages.
* guix/import/cran.scm (bioconductor-experiment-package?): New variable.
2017-05-16 21:40:39 +02:00
Ricardo Wurmus c9ffa91fd3
import cran: Exclude experiment packages in predicate "bioconductor-package?".
* guix/import/cran.scm (bioconductor-package?): Exclude experiment packages,
because they cannot be updated with the default bioconductor updater.
2017-05-16 21:40:03 +02:00
Ricardo Wurmus 7c9fcb0825
import cran: Fetch DESCRIPTION files from Github mirror.
* guix/import/cran.scm (%bioconductor-svn-url): Remove variable.
(bioconductor-mirror-url): New procedure.
(fetch-description): Take a REPOSITORY symbol instead of a BASE-URL string.
(cran->guix-package): Pass REPOSITORY symbol to "fetch-description".
(latest-cran-release, latest-bioconductor-release): Adjust accordingly.
(bioconductor-package?): Update comment about SVN.
2017-05-16 21:39:06 +02:00
Andy Patterson 0383afa02a
build-system/asdf: Handle tests defined in external systems.
* guix/build-system/asdf.scm (asdf-build): Add a #:test-asd-file argument.
[builder]: Pass it to the build system.
(package-with-build-system)[transform]: Strip it from source systems' arguments.
* guix/build/asdf-build-system.scm (check): Pass the fully qualified path to
it on to the test-system procedure.
* guix/build/lisp-utils.scm (test-system): Load the file, or otherwise one of
the often used names for it, before running the tests.  Adjust the docstring
accordingly.
2017-05-16 15:18:16 +02:00
Andy Patterson 4209c31b8f
build-system/asdf: Retain references to source files for binary outputs.
In support of long-running programs in which the users would like to be able
to jump to the source of a definition of any of the dependencies (itself
included) of the program.

* guix/build/asdf-build-system.scm (library-outputs): Move from here ...
* guix/build/lisp-utils.scm (library-outputs): ... to here.
(build-program): Accept dependency-prefixes argument, to allow the caller to
specify references which should be retained.  Default to the library's output.
(build-image): Likewise.
(generate-executable): Likewise.
* gnu/packages/lisp.scm (sbcl-stumpwm+slynk, sbcl-slynk, sbcl-stumpwm): Adjust
accordingly to the new interface.
(sbcl-stumpwm+slynk)[native-inputs]: Move to ...
[inputs]: ... here.
2017-05-16 15:18:16 +02:00
Andy Patterson b9afcb9ed4
build-system/asdf: Simplify the use of lisp-eval-program.
Accept a list of statements, each run within its own `--eval' argument. This
allows statements to use reader package namespacing after a package has been
loaded.

* guix/build/lisp-utils.scm (spread-statements): New procedure.
(lisp-invoke): Rename to ...
(lisp-invocation): ... this. Use spread-statements. Change interface to accept
list of statements instead of a single statement.
(asdf-load-all-systems): Simplify returned statements.
(compile-system): Simplify the program passed to `lisp-eval-program'.
(test-system): Likewise.
(generate-executable-for-system): Likewise. Accept the full symbol describing
the asdf operation to use.
(generate-executable): Document the change.
(build-program, build-image): Use the new interface.
2017-05-16 15:18:15 +02:00
Andy Patterson 40f56176c5
build-system/asdf: Handle unusually-named systems.
* guix/build/lisp-utils.scm (valid-char-set): New variable.
(normalize-string): New procedure.
(compiled-system): Truncate the name of a system which contains slashes.
(generate-system-definition, make-asd-file): Use `normalize-string' to alter
the names of the created system and its dependencies.
* guix/build/asdf-build-system.scm (create-asd-file): Normalize the name of
the asd file being created.
2017-05-16 15:18:15 +02:00
Andy Patterson 0186a463d0
build-system/asdf: Always pre-load the system's definition file.
* guix/build-system/asdf.scm (asdf-build)[builder]: Pass a default
`#:asd-file' argument to the build procedure, using the system's name.
* guix/build/asdf-build-system.scm (build, check): Adjust to assume that
`asd-file' will always be a string.
* guix/build/lisp-utils.scm (compile-system, system-dependencies)
(test-system): Likewise.
2017-05-16 15:18:15 +02:00
Andy Patterson 457702b1d9
build-system/asdf: Pass the system name as an argument to the builder.
* guix/build-system/asdf.scm (asdf-build): Use the user-defined system name,
or calculate it from the package's full name.
[builder]: Pass the value along to the build procedure.
(package-with-build-system): Remove #:asd-system-name from source packages'
arguments.
* guix/build/asdf-build-system.scm: Adjust accordingly.
* guix/build/lisp-utils.scm (remove-lisp-from-name): Delete variable.
2017-05-16 15:18:15 +02:00
Andy Patterson b4c9f0c50d
build-system/asdf: Parameterize the lisp type and implementation globally.
* guix/build-system/asdf.scm (asdf-build)[builder]: Parameterize %lisp-type
and %lisp before invoking the build procedure. Don't pass #:lisp-type as an
argument to said procedure.
* guix/build/asdf-build-system.scm: Adjust accordingly.
(source-install-prefix): Rename to %lisp-source-install-prefix.
* guix/build/lisp-utils.scm: Adjust accordingly.
(%lisp-type): New parameter.
(bundle-install-prefix): Rename to %bundle-install-prefix.
* gnu/packages/lisp.scm: Adjust accordingly.
2017-05-16 15:18:15 +02:00
Andy Patterson 6de91ba2a1
build-system/asdf: Make #:lisp a package argument.
* guix/build-system/asdf.scm (lower): Change argument name to `lisp-type'.
(asdf-build): Change argument name to `lisp-type'.  Remove `lisp' as an
argument to the returned procedure.  Change the argument passed to build
phases to `lisp-type'.
* guix/build/asdf-build-system.scm (copy-source, build, check)
(create-asd-file, symlink-asd-files, cleanup-files, strip): Respect
`lisp-type` argument.
* gnu/packages/lisp.scm (sbcl-stumpwm, sbcl-stumpwm+slynk): Likewise.
2017-05-16 15:18:15 +02:00
Andy Patterson 26a16d37ff
build-system/asdf: Keep ecl's generated archive files.
This may be necessary to produce programs or images with ecl.

* guix/build/asdf-build-system.scm (cleanup-files): Don't delete .a files.
2017-05-16 15:18:14 +02:00
Andy Patterson 0e1371be09
build-system/asdf: Don't rename inputs.
* guix/build-system/asdf.scm (package-with-build-system)[transform]: Use updated
`new-inputs' procedure for inputs and native-inputs.
<rewrite>: Don't rename inputs.
<new-propagated-inputs>: Draw from package-inputs and package-native-inputs
for source packages.  Use the original package's propagated-inputs otherwise.
<new-inputs>: Convert into a function to be used to transform inputs and
native-inputs.
* gnu/packages/lisp.scm (sbcl-fiveam, sbcl-bordeaux-threads)
(sbcl-flexi-streams, sbcl-cl-ppcre, sbcl-stumpwm, sbcl-slynk-arglists)
(sbcl-slynk-fancy-inspector): Don't prefix input names.
2017-05-16 15:18:14 +02:00
Andy Patterson 35189728cd
build-system/asdf: Use asdf to determine dependencies.
This removes the need for conventions to determine which inputs are run-time
dependencies, and also the need to specify "special" dependencies.

* guix/build/lisp-utils.scm (patch-asd-file, lisp-dependencies)
(wrap-perform-method): Remove them.
(inputs->asd-file-map, system-dependencies, generate-system-definition)
(generate-dependency-links, make-asd-file): New procedures.
(lisp-eval-program): Add an error if no lisp matches.
(compile-system): Don't use asdf's in-built asd-file generator.
2017-05-16 15:18:14 +02:00
Andy Patterson 6c76ce39ac
build-system/asdf: Make it possible to use "lib" as the build output.
* guix/build/asdf-build-system.scm (library-output): New procedure.
(copy-source, build, check, patch-asd-files, symlink-asd-files)
(cleanup-files): Use it.
(copy-files-to-output): Rework to take an output instead of an outputs and
string pair.
(install, copy-source): Use the new method.
2017-05-16 15:18:14 +02:00