Commit Graph

1751 Commits (3bb168b0997d2ba2ef15e8eef2890582c8a6df9c)

Author SHA1 Message Date
Ludovic Courtès 57aff6476e utils: Add 'every*'.
* guix/build/gnu-build-system.scm (every*): Move to...
* guix/build/utils.scm (every*): ... here.  New procedure.
2015-10-03 14:36:12 +02:00
Ludovic Courtès fde1783087 download: Check whether HORIZONTAL ELLIPSIS can be encoded.
* guix/build/download.scm (ellipsis): New procedure.
  (store-path-abbreviation): Use it.
2015-10-01 11:28:58 +02:00
Ludovic Courtès 30d9aa5422 guix gc: Add '--list-failures' and '--clear-failures'.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/scripts/gc.scm (show-help, %options): Add --list-failures and
  --clear-failures.
  (guix-gc): Honor them.
* doc/guix.texi (Invoking guix gc): Document them.
  (Invoking guix-daemon): Mention them.
2015-09-28 22:54:04 +02:00
Ludovic Courtès 16748d8015 store: Add 'query-failed-paths' and 'clear-failed-paths' RPCs.
Suggested by Mark H Weaver <mhw@netris.org>.

* guix/store.scm (query-failed-paths, clear-failed-paths): New
  procedures.
* tests/guix-daemon.sh: Add test with daemon started with
  --cache-failures.
2015-09-28 22:54:04 +02:00
Ludovic Courtès df0a3b7f9e tests: 'open-connection-for-tests' takes an optional parameter.
* guix/tests.scm (open-connection-for-tests): Add optional FILE
  parameter; pass it to 'open-connection'.
2015-09-28 22:53:59 +02:00
Mathieu Lirzin cd8b7cfb3f lint: Fix 'check-texinfo-markup'.
Fixes a regression introduced in 5d8d8f3.

* guix/scripts/lint.scm (check-description-style): When no exception is
  thrown in 'check-texinfo-markup', return the rendered description.
2015-09-28 00:23:12 +02:00
Ludovic Courtès e1556533d3 Merge branch 'core-updates' 2015-09-26 15:14:53 +02:00
Mathieu Lirzin 5d8d8f3b0a lint: Improve 'check-texinfo-markup'.
* guix/scripts/lint.scm (check-description-style): Set 'field' parameter
  when emitting a warning in 'check-texinfo-markup'.  Catch any error
  that may occur in during the 'texi->plain-text' conversion.  This is a
  followup to commit 2748ee3.
2015-09-26 15:10:13 +02:00
Ludovic Courtès 15d5ca1356 http-client: Backport Guile fix for 'read-chunk-header'.
Fixes the wrong-type-arg exception initially reported
at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19976#5>
by Ricardo Wurmus <rekado@elephly.net>.

* guix/http-client.scm (read-chunk-header): Backport Guile commit 53b8d5f.
2015-09-26 11:13:50 +02:00
Ludovic Courtès 5ef9d7deea offload: Use gzip instead of xz for compression on the master.
* guix/scripts/offload.scm (send-files): Use gzip --fast instead of xz.
2015-09-25 22:35:35 +02:00
Ludovic Courtès 62d2b57157 utils: Add #:options parameter for compression output ports.
* guix/utils.scm (compressed-output-port,
  call-with-compressed-output-port): Add #:options parameter and honor
  it.
2015-09-25 22:35:35 +02:00
Mathieu Lirzin 23464bfd99 lint: Accept '`' character.
* guix/scripts/lint.scm (properly-starts-sentence?): Match Texinfo
  highlighting commands as a sentence start.
2015-09-24 22:55:59 +02:00
Mathieu Lirzin 2748ee3bcf lint: Check non-translated package descriptions.
* guix/ui.scm (texi->plain-text): Export.
* guix/scripts/lint.scm (check-description-style): Use it instead of
  'package-description-string'.
2015-09-24 22:46:20 +02:00
Ludovic Courtès 1007b6bf0b Merge branch 'master' into core-updates 2015-09-24 22:18:07 +02:00
Ludovic Courtès a7a4fd9a7c profiles: Make profile-specific derivations non-substitutable.
This avoids gratuitous queries of the substituter.

* guix/profiles.scm (ghc-package-cache-file): Pass #:substitutable? #f
  to 'gexp->derivation'.
  (ca-certificate-bundle): Likewise.
  (gtk-icon-themes): Likewise.
  (profile-derivation): Likewise.
  (info-dir-file): Likewise, plus #:local-build? #t.
2015-09-24 22:16:10 +02:00
Ludovic Courtès 08d7e3592f ui: Gracefully handle Unicode description strings.
Fixes <http://bugs.gnu.org/21536>.
Reported by Alex Kost <alezost@gmail.com>.

* guix/ui.scm (texi->plain-text): Wrap body in 'with-fluids'.
* tests/ui.scm ("package-description-string vs. Unicode"): New test.
2015-09-24 22:04:51 +02:00
Ludovic Courtès 75726135ce download: Don't abbreviate things that are not store items.
Fixes a regression introduced in a8be7b9a.

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

* guix/build/emacs-build-system.scm (package-name-version->elpa-name-version):
  Remove unused 'name' binding.  Do not abuse 'strip-store-file-name' to
  remove the "emacs-" prefix, which worked before b7c7c03eb5 but not after.
2015-09-23 17:38:47 -04:00
Mark H Weaver bd90127ad4 Merge branch 'master' into core-updates 2015-09-22 16:38:48 -04:00
Alex Kost 430505eba3 scripts: Add 'build-package'.
* guix/scripts/system.scm (maybe-build): Move to ...
* guix/scripts.scm: ...here.
  (build-package): New procedure.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-09-22 22:05:10 +03:00
Ricardo Wurmus 4a4dac2083 licenses: Add Zope Public License.
* guix/licenses.scm (zpl2.1): New variable.
2015-09-22 14:57:00 +02:00
Ricardo Wurmus c009bb5a40 Update CRAN mirrors.
* guix/download.scm (%mirrors): Update mirror list for CRAN.
2015-09-21 10:48:26 +02:00
Ricardo Wurmus a52b625152 import: cran-sxml->sexp: Use cran-uri in package expression.
* guix/import/cran.scm (cran-sxml->sexp): Use the cran-uri procedure in
  the generated package expression.
2015-09-21 10:48:26 +02:00
Ricardo Wurmus 5546114e73 build: Add cran-uri procedure.
* guix/build-system/r.scm (cran-uri): New procedure.
2015-09-21 10:48:26 +02:00
Ludovic Courtès e0566f12f8 lint: Report lonely parentheses.
* guix/scripts/lint.scm (%hanging-paren-rx): New variable.
  (report-lone-parentheses): New procedure.
  (%formatting-reporters): Use it.
* tests/lint.scm ("formatting: lonely parentheses"): New test.
2015-09-18 21:54:04 +02:00
Alex Kost 4f740b677a store: Add 'set-build-options*'.
Suggested by: Ludovic Courtès <ludo@gnu.org>.

* guix/store.scm (set-build-options*): New procedure.
2015-09-18 21:42:07 +03:00
Alex Kost fa394eb99c ui: Add 'show-derivation-outputs'.
* guix/scripts/build.scm (guix-build): Extract code from here and move to...
* guix/ui.scm (show-derivation-outputs): ... here.  New procedure.
2015-09-18 21:42:06 +03:00
Alex Kost 88981dd3e2 Add (guix scripts).
* guix/ui.scm: Add missing copyright lines.
  (args-fold*, environment-build-options, %default-argument-handler,
  parse-command-line): Move to ...
* guix/scripts.scm: ...here.  New file.
* guix/scripts/archive.scm: Use it.
* guix/scripts/build.scm: Likewise.
* guix/scripts/download.scm: Likewise.
* guix/scripts/edit.scm: Likewise.
* guix/scripts/environment.scm: Likewise.
* guix/scripts/gc.scm: Likewise.
* guix/scripts/graph.scm: Likewise.
* guix/scripts/hash.scm: Likewise.
* guix/scripts/import/cpan.scm: Likewise.
* guix/scripts/import/cran.scm: Likewise.
* guix/scripts/import/elpa.scm: Likewise.
* guix/scripts/import/gem.scm: Likewise.
* guix/scripts/import/gnu.scm: Likewise.
* guix/scripts/import/hackage.scm: Likewise.
* guix/scripts/import/nix.scm: Likewise.
* guix/scripts/import/pypi.scm: Likewise.
* guix/scripts/lint.scm: Likewise.
* guix/scripts/package.scm: Likewise.
* guix/scripts/publish.scm: Likewise.
* guix/scripts/pull.scm: Likewise.
* guix/scripts/refresh.scm: Likewise.
* guix/scripts/size.scm: Likewise.
* guix/scripts/system.scm: Likewise.
* tests/ui.scm (with-environment-variable, "parse-command-line",
  "parse-command-line and --no options"): Move to ...
* tests/scripts.scm: ...here.  New file.
* Makefile.am (MODULES): Add guix/scripts.scm.
  (SCM_TESTS): Add tests/scripts.scm.
* po/guix/POTFILES.in: Add guix/scripts.scm.
2015-09-18 21:42:06 +03:00
Steve Sprang 47770296d2 download: Only show hours in the elapsed time if necessary.
* guix/build/download.scm
  (seconds->string): Conditionally include hours in timestamp.

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

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2015-09-16 23:50:12 +02:00
Mathieu Lirzin 3500e659f1 lint: Add 'check-texinfo-markup' checker.
* guix/script/lint.scm (check-description-style): Check for invalid
  Texinfo markup.
* tests/lint.scm: Test it.
2015-09-15 19:01:23 +02:00
Eric Bavier 50f5c46d06 guix: lint: Check for meaningful origin file names.
* guix/scripts/lint.scm (check-source-file-name): New procedure.
  (%checkers): Add 'source-file-name' checker.
* tests/lint.scm ("source-file-name", "source-file-name: v prefix")
  ("source-file-name: valid", "source-file-name: bad checkout")
  ("source-file-name: good checkout"): New tests.
* doc/guix.texi (Invoking guix lint): Mention file name check.
2015-09-14 18:03:33 -05:00
Eric Bavier 3b4d01035f guix: packages: Add origin-actual-file-name.
* guix/scripts/graph.scm (uri->file-name, node-full-name): Move origin file
  name logic to...
* guix/packages.scm (origin-actual-file-name): ...here.
* tests/packages.scm ("origin-actual-file-name")
  ("origin-actual-file-name, file-name"): New tests.
2015-09-14 18:02:37 -05:00
Steve Sprang eb95ace9f1 download: Avoid type errors when formatting download progress output.
* guix/build/download.scm (nearest-exact-integer): New procedure.
  (seconds->string, byte-count->string): Use it.
2015-09-14 23:36:26 -04:00
Ludovic Courtès d89e0990f5 guix system: Gracefully handle incomplete commands.
Fixes <http://bugs.gnu.org/21451>.
Reported by Steve Sprang <steve.sprang@gmail.com>.

* guix/scripts/system.scm (guix-system)[option-arguments]: Error out
  when ACTION is #f.
2015-09-15 00:04:27 +02:00
David Thompson 5dc876231b build: ruby: Add support for tarball and directory sources.
Previously, the Ruby build system only knew how to work with gem archives,
which made it difficult to build unreleased gems from a Git repository or
released gems in tarball form.

* gnu/build/ruby-build-system.scm (gnu:unpack, gem-archive?): New procedures.
  (unpack): Use GNU build system unpack phase for non-gem sources.
  (build): Rebuild the gemspec iff the source is a gem archive.
* guix.texi ("ruby-build-system"): Mention that tarballs and directories are
  acceptable.
2015-09-14 08:29:07 -04:00
Ludovic Courtès 75710da667 Merge branch 'master' into core-updates 2015-09-13 21:28:01 +02:00
宋文武 f47fbeb23a build-system/glib-or-gtk: Don't generate 'icon-theme.cache'.
* guix/build-system/glib-or-gtk.scm (default-gtk+): Remove.
  (lower): Adjust accordingly.
* guix/build/glib-or-gtk-build-system.scm (generate-icon-cache): Remove.
  (%standard-phases): Remove 'glib-or-gtk-icon-cache' phase.
2015-09-11 20:24:30 +08:00
Ludovic Courtès 3f208ad758 guix build: '--log-file' can return URLs.
* guix/scripts/build.scm (%default-log-urls): New variable.
  (log-url): New procedure.
  (guix-build): Use it.
* doc/guix.texi (Invoking guix build): Document it.
2015-09-10 23:14:16 +02:00
Ludovic Courtès 6b02a448d2 http-client: Backport delimited input port fix from Guile.
* guix/http-client.scm (make-delimited-input-port): Backport Guile
  commit 5a10e41.
  Monkey-patch 'make-delimited-input-port' for any Guile <= 2.0.11.
2015-09-10 23:14:16 +02:00
Ludovic Courtès 1c01a30d66 http-client: Remove redundant import clause.
* guix/http-client.scm: Remove redundant #:use-module (guix utils).
2015-09-10 23:14:16 +02:00
Eric Bavier a6d0b306c2 guix: packages: Add transitive-input-references.
* guix/packages.scm (transitive-input-references): New procedure.
* gnu/packages/version-control.scm (package-transitive-propagated-labels*)
  (package-propagated-input-refs): Delete.
  (git)[arguments]: Adjust to transitive-input-references.
2015-09-10 03:21:55 -05:00
Ludovic Courtès ef30b974c9 pull: Update to the new cgit snapshot URL.
* guix/scripts/pull.scm (%snapshot-url): Update to the new URL.
2015-09-10 08:49:36 +02:00
Steve Sprang 0c0a1f22ce build: Improve information density and appearance of download progress output.
* guix/build/download.scm (seconds->string): New function.
  (byte-count->string): New function.
  (progress-bar): New function.
  (throughput->string): Remove function.
  (progress-proc): Display base file name, elapsed time, and progress bar.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-09-08 21:47:30 +02:00
Mathieu Lirzin 1cd4027cfd ui: Add package-description-string.
Provide support for Texinfo's markup in package description.

* guix/ui.scm (%text-width): New parameter.
  (texi->plain-text): New variable.
  (package->recutils): Use them.
  (package-description-string): New variable.
* emacs/guix-main.scm (%package-param-alist): Use it.
* gnu/packages/perl.scm (perl-devel-globaldestruction)
  (perl-devel-lexalias, perl-exporter-lite): Adapt to Texinfo's markup.
* gnu/packages/python.scm (python2-empy): Likewise.
2015-09-08 07:44:53 +02:00
David Thompson ee78d02452 build: container: Use the same clone flags as fork(3).
The intent is to make 'clone' behave a lot more like 'primitive-fork', which
calls clone(2) with SIGCHLD, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID
flags.  Notably, running 'clone' at the REPL without these flags would break
the REPL beyond repair.

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

* guix/build/ruby-build-system.scm (unpack): Rename unpacked gem directory to
  "gem".
2015-09-07 08:27:10 -04:00
Mark H Weaver 140b4bc6cd packages: Build tarballs in sorted order even if tar doesn't support it.
This is a followup to commit 92226a470d.

* guix/packages.scm (patch-and-repack)[build]: Determine if tar supports the
  "--sort=name" option using a run-time test.  If not supported, generate the
  sorted file list with 'find-files' and pass it to tar using "--files-from".
2015-09-06 17:25:51 -04:00
Mark H Weaver f4ae827e26 utils: find-files: Add DIRECTORIES? and FAIL-ON-ERROR? arguments.
* guix/build/utils.scm (find-files): Add DIRECTORIES? and FAIL-ON-ERROR?
  keyword arguments.
2015-09-06 17:25:50 -04:00
Ludovic Courtès a5c0d8bc55 ui: Change 'P_' to return the empty string when passed the empty string.
Reported by Mathieu Lirzin <mathieu.lirzin@etu.u-bordeaux.fr>
at <https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00111.html>.

* guix/ui.scm (P_): Check whether MSGID is empty, and return it if it is.
2015-09-06 15:52:04 +02:00
Ludovic Courtès 12abc6e395 licenses: Add CC-BY-SA and CC-BY.
* guix/licenses.scm (cc-by-sa4.0, cc-by3.0): New variables.
2015-09-06 12:36:15 +02:00
Ludovic Courtès 52b9efe337 lint: Add 'license' checker.
* guix/scripts/lint.scm (check-license): New procedure.
  (%checkers): Add 'license' checker.
* tests/lint.scm ("license: invalid license"): New test.
2015-09-06 12:36:15 +02:00
Alex Kost 6480fcae24 emacs-build-system: Fix a file name of info directory.
* guix/build/emacs-build-system.scm (move-doc): Adjust to use
  "/share/info" instead of its sub-directory.
2015-09-06 12:15:51 +03:00
Ludovic Courtès 6b44a09747 download: Disable offloading for downloads.
* guix/download.scm (url-fetch): Use #:local-build? #t.
* guix/git-download.scm (git-fetch): Likewise.
2015-09-05 22:11:03 +02:00
David Thompson cf897cbacc build: syscalls: Properly handle clone errors.
* guix/build/syscalls.scm (clone): Catch -1 return value and throw error.
2015-09-05 13:42:02 -04:00
Ludovic Courtès dbbc248aee monads: Fix 'liftN' fallback case.
Reported by Andy Wingo <wingo@igalia.com>.

* guix/monads.scm (define-lift) <fallback case>: Add missing #'.  Remove
  extra formal parameter.
* tests/monads.scm ("lift"): Add test with 'lift1' as a procedure.
2015-09-04 18:31:06 +02:00
Ludovic Courtès 035b6ff707 packages: Define '%hurd-systems'.
* guix/packages.scm (%hurd-systems): New variable.
2015-09-04 13:50:38 +02:00
Ludovic Courtès 9d2f48df02 publish: Gracefully handle the lack of a deriver.
* guix/scripts/publish.scm (narinfo-string): Catch 'system-error' around
  'load-derivation' call; return BASE-INFO upon ENOENT.  This allows us
  to return the narinfo even if DERIVER is missing.  Before that, the
  exception would be uncaught, leading to 500 Internal Error on the
  client side.
2015-09-04 00:13:05 +02:00
Mark H Weaver 92226a470d Build tarballs with deterministic file ordering.
* guix/packages.scm (patch-and-repack)[build],
  gnu/system/install.scm (self-contained-tarball)[build],
  gnu/packages/make-bootstrap.scm (tarball-package),
  gnu/packages/admin.scm (isc-dhcp),
  gnu/packages/video.scm (avidemux): Pass "--sort=name" to 'tar'.
2015-09-03 12:57:01 -04:00
Mark H Weaver 52c20d8e15 packages: Add 'armhf-linux' to '%hydra-supported-systems'.
* guix/packages.scm (%hydra-supported-systems): Do not remove 'armhf-linux'
  from it.  It is now equal to '%supported-systems'.
2015-09-02 19:59:12 -04:00
Ludovic Courtès 4c8f997a7d graph: Add '--expression'.
* guix/scripts/graph.scm (%options, show-help): Add '--expression'.
  (guix-graph): Call 'read/eval-package-expression' for 'expression'
  pairs in OPTS.
* tests/guix-graph.sh: Add tests.
* doc/guix.texi (Invoking guix graph): Document it.
2015-09-02 23:40:07 +02:00
Ludovic Courtès df2d51f025 gexp: Remove duplicate 'mkdir-p' definition.
* guix/gexp.scm (%mkdir-p-definition): Remove.
  (%utils-module): New variable.
  (imported-files, compiled-modules): Have gexp load %UTILS-MODULE
  instead of using %MKDIR-P-DEFINITION.
2015-09-02 11:24:57 +02:00
Ricardo Wurmus dee38b7b41 guix: Add GUST font license 1.0.
* guix/licenses.scm (gfl1.0): New variable.
2015-09-02 08:44:54 +02:00
David Thompson a96524cc7d import: gem: Fix minor bug and add unit test.
* guix/import/gem.scm (make-gem-sexp): Properly handle an empty list of
  licenses.  When rendering a list of licenses, cons 'list onto the front of
  the expression.
* tests/gem.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2015-09-01 20:00:01 -04:00
Ricardo Wurmus f8f3bef6aa build: Add R build system.
* guix/build-system/r.scm: New file.
* guix/build/r-build-system: New file.
* Makefile.am (MODULES): Add new files.
* doc/guix.texi (Build Systems): Document r-build-system.
2015-08-31 15:39:34 +02:00
Ricardo Wurmus e1248602f9 import: Add 'cran' importer.
* guix/import/cran.scm: New file.
* guix/scripts/import.scm: Add "cran" to 'importers'.
* guix/scripts/import/cran.scm: New file.
* tests/cran.scm: New file.
* Makefile.am (MODULES): Add 'guix/import/cran.scm' and
  'guix/scripts/import/cran.scm'.
  (SCM_TESTS): Add 'tests/cran.scm'.
* doc/guix.texi (Invoking guix import): Document it.
* po/guix/POTFILES.in: Add 'guix/scripts/import/cran.scm'.
2015-08-31 15:39:34 +02:00
Ludovic Courtès 8c578a6094 utils: Move 'package-name->name+version' to (guix build utils).
* guix/utils.scm (package-name->name+version): Move to...
* guix/build/utils.scm (package-name->name+version): ... here.  New
  procedure.
* guix/build/emacs-build-system.scm (package-name->name+version):
  Remove.
2015-08-30 18:38:08 +02:00
Ludovic Courtès b7c7c03eb5 utils: Add 'strip-store-file-name'.
* guix/build/utils.scm (strip-store-file-name): New procedure.
* guix/build/emacs-build-system.scm (store-directory->name-version):
  Remove.  Update callers to use 'strip-store-file-name'.
* gnu/packages/gcc.scm (make-libstdc++-doc)[arguments]: Use
  'strip-store-file-name' instead of 'string-drop'.
2015-08-30 18:38:08 +02:00
Alex Kost caa6732e96 ui: Add 'run-guix'.
* guix/ui.scm (guix-main): Move the code to run guix command line to ...
  (run-guix): ...here.  New procedure.  Export it.
2015-08-30 18:26:02 +03:00
Alex Kost c1a8c5ab1c guix graph: Export node types and <node-type> accessors.
* guix/scripts/graph.scm (%node-types, node-type, node-type?,
  node-type-identifier, node-type-label, node-type-edges,
  node-type-convert, node-type-name, node-type-description): Export.
2015-08-30 18:26:02 +03:00
Alex Kost 521a11e0a6 guix lint: Export checkers and <lint-checker> accessors.
* guix/scripts/lint.scm (%checkers, lint-checker, lint-checker?,
  lint-checker-name, lint-checker-description, lint-checker-check):
  Export.
2015-08-30 18:26:01 +03:00
Ludovic Courtès 5c962e93e5 build-system/gnu: Use monotic time to measure elapsed time.
* guix/build/gnu-build-system.scm (gnu-build)[elapsed-time]: New
  procedure.
  Use it, and use (current-time time-monotonic) instead
  of (gettimeofday).  Show one digit after the comma for the elapsed
  time.
2015-08-30 17:07:45 +02:00
Ludovic Courtès 532164194a download: Keep a single copy of the mirror file.
This saves ~10% on 'guix build inkscape -Sd'.

* guix/download.scm (%mirror-file): New variable.
  (url-fetch): Remove #:mirrors parameter.
  Remove 'mirror-file'; refer to '%mirror-file' instead.
2015-08-29 23:56:47 +02:00
Ludovic Courtès 3d20ebd6cb refresh: Add missing newline in warning message.
Reported by karhunkynsi on #guix.

* guix/scripts/refresh.scm (update-package): Add missing newline in
  string literal passed to 'warning'.
2015-08-29 23:56:47 +02:00
Ludovic Courtès 4cc2ed98cf utils: Add 'install-file'.
* guix/build/utils.scm (install-file): New procedure.
2015-08-29 01:25:08 +02:00
Ludovic Courtès ced200328c download: Keep only 2 store items for all the downloads.
This significantly reduces churn in the store.  It also reduces run time
of 'guix build inkscape -Sd' by ~10%.

* guix/download.scm (url-fetch)[mirror-file]: New variable.
  [builder]: Get URL from the "guix download url" env. var.  Get the mirrors
  from MIRROR-FILE.  Pass #:script-name and #:env-vars to 'gexp->derivation'.
2015-08-29 01:22:54 +02:00
Ludovic Courtès 0309e1b0ba gexp: Add #:script-name parameter to 'gexp->derivation'.
* guix/gexp.scm (gexp->derivation): Add #:script-name parameter.
* doc/guix.texi (G-Expressions): Document it.
2015-08-29 01:22:54 +02:00
Ludovic Courtès b6c6105cac monads: Inline the procedure returned by liftN.
* guix/monads.scm (define-lift): Turn into a macro that open-codes the result
  of its lift.
2015-08-29 01:22:54 +02:00
David Thompson 3aae8145a7 import: Add Ruby gem importer.
* gnu/scripts/import.scm (importers): Add "gem".
* gnu/import/gem.scm: New file.
* gnu/scripts/import/gem.scm: New file.
* Makefile.am (MODULES): Add them.
* guix.texi ("invoking guix import"): Document it.
2015-08-27 19:45:06 -04:00
David Thompson 140b304815 import: pypi: Move generally useful procedures to utils module.
* guix/import/pypi.scm (make-pypi-sexp): Factorize license to symbol
  conversion code.
  (string->license, snake-case, guix-hash-url): Move from here...
* guix/import/utils.scm: ... to here.
  (license->symbol): New procedure.
2015-08-27 18:02:35 -04:00
Ludovic Courtès 888569161c Add 'guix graph'.
* guix/scripts/graph.scm, tests/graph.scm, tests/guix-graph.sh,
  doc/images/coreutils-bag-graph.dot, doc/images/coreutils-graph.dot: New
  files.
* Makefile.am (MODULES): Add guix/scripts/graph.scm.
  (SH_TESTS): Add tests/guix-graph.sh.
  (SCM_TESTS): Add tests/graph.scm.
* doc.am (DOT_FILES, DOT_VECTOR_GRAPHICS): New variables.
  (EXTRA_DIST): Use them.
  (dist_infoimage_DATA): Use $(DOT_FILES).
  (pdf-local, info-local, ps-local): Likewise.
* doc/guix.texi (Packages with Multiple Outputs): Add cross-reference to 'guix
  graph'.
  (Invoking guix gc): Likewise.
  (Invoking guix graph): New section.
2015-08-27 00:49:23 +02:00
Ludovic Courtès c2b8467645 gexp: Add 'lower-object'.
* guix/gexp.scm (lower-object): New procedure.
  (lower-inputs, lower-references, gexp->sexp): Use it.
* tests/gexp.scm ("lower-object"): New test.
* doc/guix.texi (G-Expressions): Document it.
2015-08-27 00:49:23 +02:00
Mark H Weaver 6bf99bac95 guix package: -s shows outputs.
* guix/ui.scm (package->recutils): Print "outputs:".
2015-08-24 20:22:36 -04:00
Ludovic Courtès fa96048f0a profiles: Remove duplicate entries in 'etc/profile'.
Reported by Andy Wingo
at <http://lists.gnu.org/archive/html/guix-devel/2015-08/msg00109.html>.

* guix/profiles.scm (profile-derivation)[builder]: Delete duplicates in
  SEARCH-PATHS.
2015-08-20 19:12:36 +02:00
Ricardo Wurmus 2824146bd8 guix: Add Sleepycat license.
* guix/licenses.scm (sleepycat): New variable.
2015-08-20 08:32:28 +02:00
David Thompson 0d2794005c scripts: package: Add --install-from-file option.
* guix/scripts/package.scm (show-help): Add help text for --install-from-file
  option.
  (%options): Add --install-from-file option.
* tests/guix-package.sh: Test it.
* doc/guix.texi ("invoking guix package"): Document it.
* doc/package-hello.scm: New file.
* doc.am (EXTRA_DIST): Add it.
2015-08-19 22:23:59 -04:00
Ludovic Courtès 83bde59fb3 size: Get the item's size from the daemon rather than compute it.
This removes all I/O, which obviously makes things faster.

* guix/scripts/size.scm (file-size, store-item-exists?): Remove.
  (query-path-info*): New procedure.
  (file-size*): Rename to...
  (file-size): ... this; adjust caller.  Use 'query-path-info*' instead of
  'file-size'.
2015-08-19 11:39:18 +02:00
Ludovic Courtès 40a7d4e58b lint: Add 'formatting' checker.
* guix/scripts/lint.scm (report-tabulations, report-trailing-white-space,
  report-long-line, report-formatting-issues, check-formatting): New
  procedures.
  (%formatting-reporters): New variable.
  (%checkers): Add 'formatting' checker.
* tests/lint.scm ("formatting: tabulation", "formatting: trailing white
  space", "formatting: long line", "formatting: alright"): New tests.
* doc/guix.texi (Invoking guix lint): Mention the 'formatting' checker.
2015-08-19 11:39:17 +02:00
David Thompson e83c6d009f build: ruby: Rewrite build system to use gem archives.
Co-Authored-By: Pjotr Prins <pjotr.public01@thebird.nl>

* guix/build-system/ruby.scm (lower): Remove git dependency.
  (rubygems-uri): New procedure.
* guix/build/ruby-build-system (gitify): Delete.
  (unpack): Use 'gem unpack' utility.
  (check): Add docstring.
  (build): Repack modified gem.
  (install): Rebuild unpacked gem and install it.
  (%standard-phases): Remove gitify and build phases.
* gnu/packages/ruby.scm (ruby-hoe, ruby-rake-compiler, ruby-i18n,
  ruby-rspec-support, ruby-rspec-core, ruby-diff-lcs-for-rspec,
  ruby-rspec-expectations, ruby-rspec-mocks, ruby-rspec, bundler,
  ruby-useragent, ruby-bacon, ruby-arel, ruby-connection-pool,
  ruby-net-http-persistent, ruby-minitest, ruby-minitest-sprint,
  ruby-minitest-bacon, ruby-daemons, ruby-git, ruby-slop,
  ruby-multipart-post): Convert to new build system.
* doc/guix.texi (ruby-build-system): Document the gem archive requirement.
2015-08-18 17:58:13 -04:00
David Thompson 39e336b5c8 syscalls: setns: Skip binding if there is no such C function.
On systems with a glibc prior to 2.14, the 'setns' function is not available.

Thanks to Eric Bavier for reporting the issue.

* guix/build/syscalls.scm (setns): Wrap with 'false-if-exception'.
2015-08-17 14:51:18 -04:00
Alex Kost 1d3eaef90c import: elpa: Fix typo.
Reported by Eric Dvorsak <eric@dvorsak.fr> on #guix.

* guix/scripts/import/elpa.scm (%default-options): Remove redundant
  quote which led to an error if --archive option was not specified.
2015-08-10 15:46:10 +03:00
Mark H Weaver 9f6509c655 python-build-system: Fix 'get-python-version'.
* guix/build/python-build-system.scm (get-python-version): Rewrite to handle
  multiple-digit version number components.
2015-08-06 16:33:54 -04:00
Federico Beffa 40aee1a133 build: emacs: Fix bug and improvement robustness.
* guix/build/emacs-build-system.scm (emacs-inputs): Fix matching pattern.
  (patch-el-files): Improve regexp pattern.
2015-08-01 12:37:13 +02:00
Federico Beffa 6544aba5fc import: elpa: Improve error message reporting.
* guix/import/elpa.scm (filter-dependencies): Fix bug.
  (call-with-downloaded-file): Add optional parameter 'error-thunk'.
  (fetch-package-description): Use it.
2015-08-01 12:36:21 +02:00
Ludovic Courtès e7f5691d45 syscalls: Add 'network-interfaces', which wraps libc's 'getifaddrs'.
Based on discussions with Rohan Prinja <rohan.prinja@gmail.com>.

* guix/build/syscalls.scm (<interface>): New record type.
  (write-interface, values->interface, unfold-interface-list,
  network-interfaces, free-ifaddrs): New procedures.
  (ifaddrs): New C struct.
  (%struct-ifaddrs-type, %sizeof-ifaddrs): New macros.
* tests/syscalls.scm ("network-interfaces returns one or more interfaces",
  "network-interfaces returns \"lo\""): New tests.
2015-07-25 14:43:45 +02:00
Ludovic Courtès 573b4c1ff3 syscalls: 'define-c-struct' properly align reads.
* guix/build/syscalls.scm (alignof*, align): New macros.
  (write-types, read-types): Use 'align' to compute the actual offset to
  read/write a value of TYPE0.
2015-07-25 14:43:45 +02:00
Ludovic Courtès 3ca337699a syscalls: 'read-socket-address' gracefully handles unsupported families.
* guix/build/syscalls.scm (PF_PACKET, AF_PACKET): New variables.
  (read-socket-address): Make 'index' optional.  Return (vector FAMILY) when
  FAMILY is neither AF_INET nor AF_INET6.
2015-07-25 14:43:44 +02:00
Ludovic Courtès 4a30e84e61 syscalls: 'define-c-struct' distinguishes pointers from integers.
* guix/build/syscalls.scm (read-type): Add special-case for when TYPE is '*.
2015-07-25 14:43:44 +02:00
Ludovic Courtès b89e74054e syscalls: Rename 'network-interfaces' and 'all-network-interfaces'.
* guix/build/syscalls.scm (network-interfaces): Rename to...
  (network-interface-names): ... this.
  (all-network-interfaces): Rename to...
  (all-network-interface-names): ... this.
* gnu/services/networking.scm (dhcp-client-service): Adjust accordingly.
* tests/syscalls.scm ("all-network-interfaces"): Rename to...
  ("all-network-interface-names"): ... this, and adjust accordingly.
  ("network-interfaces"): Rename to...
  ("network-interface-names"): ... this, and adjust accordingly.
2015-07-25 14:43:44 +02:00