diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-09-24 22:18:07 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-09-24 22:18:07 +0200 |
| commit | 1007b6bf0bef3f662f65ffdd0d4383179dd07355 (patch) | |
| tree | 4a9b2a4baa2d82434e12fe4aacc8f28e3266793e | |
| parent | 12cd4dd3a9052491e3912ffeecbe8854ea9b971a (diff) | |
| parent | a7a4fd9a7cd02e4897e7b2156bd9ecc7e72e9818 (diff) | |
Merge branch 'master' into core-updates
| -rw-r--r-- | doc/contributing.texi | 3 | ||||
| -rw-r--r-- | doc/emacs.texi | 49 | ||||
| -rw-r--r-- | doc/guix.texi | 3 | ||||
| -rw-r--r-- | emacs.am | 1 | ||||
| -rw-r--r-- | emacs/guix-command.el | 26 | ||||
| -rw-r--r-- | emacs/guix-devel.el | 136 | ||||
| -rw-r--r-- | emacs/guix-guile.el | 35 | ||||
| -rw-r--r-- | emacs/guix-init.el | 2 | ||||
| -rw-r--r-- | gnu/packages/audio.scm | 34 | ||||
| -rw-r--r-- | gnu/packages/graphics.scm | 40 | ||||
| -rw-r--r-- | gnu/packages/python.scm | 31 | ||||
| -rw-r--r-- | guix/build/download.scm | 36 | ||||
| -rw-r--r-- | guix/profiles.scm | 22 | ||||
| -rw-r--r-- | guix/ui.scm | 5 | ||||
| -rw-r--r-- | tests/cran.scm | 3 | ||||
| -rw-r--r-- | tests/ui.scm | 7 |
16 files changed, 400 insertions, 33 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi index ded54348bcd..b2d097dd622 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi | |||
| @@ -121,6 +121,9 @@ facilities to directly operate on the syntax tree, such as raising an | |||
| 121 | s-expression or wrapping it, swallowing or rejecting the following | 121 | s-expression or wrapping it, swallowing or rejecting the following |
| 122 | s-expression, etc. | 122 | s-expression, etc. |
| 123 | 123 | ||
| 124 | GNU Guix also comes with a minor mode that provides some additional | ||
| 125 | functionality for Scheme buffers (@pxref{Emacs Development}). | ||
| 126 | |||
| 124 | 127 | ||
| 125 | @node Coding Style | 128 | @node Coding Style |
| 126 | @section Coding Style | 129 | @section Coding Style |
diff --git a/doc/emacs.texi b/doc/emacs.texi index 67773466a44..b6f2701bc49 100644 --- a/doc/emacs.texi +++ b/doc/emacs.texi | |||
| @@ -12,7 +12,8 @@ Guix convenient and fun. | |||
| 12 | * Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands. | 12 | * Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands. |
| 13 | * Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. | 13 | * Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. |
| 14 | * Build Log Mode: Emacs Build Log. Highlighting Guix build logs. | 14 | * Build Log Mode: Emacs Build Log. Highlighting Guix build logs. |
| 15 | * Completions: Emacs Completions. Completing @command{guix} shell command. | 15 | * Completions: Emacs Completions. Completing @command{guix} shell command. |
| 16 | * Development: Emacs Development. Tools for Guix developers. | ||
| 16 | @end menu | 17 | @end menu |
| 17 | 18 | ||
| 18 | 19 | ||
| @@ -637,3 +638,49 @@ something: | |||
| 637 | @item @code{guix lint --checkers=synopsis,des}@key{TAB} | 638 | @item @code{guix lint --checkers=synopsis,des}@key{TAB} |
| 638 | 639 | ||
| 639 | @end itemize | 640 | @end itemize |
| 641 | |||
| 642 | |||
| 643 | @node Emacs Development | ||
| 644 | @section Development | ||
| 645 | |||
| 646 | By default, when you open a Scheme file, @code{guix-devel-mode} will be | ||
| 647 | activated (if you don't want it, set @code{guix-devel-activate-mode} to | ||
| 648 | nil). This minor mode provides the following key bindings: | ||
| 649 | |||
| 650 | @table @kbd | ||
| 651 | |||
| 652 | @item C-c . k | ||
| 653 | Copy the name of the current Guile module into kill ring | ||
| 654 | (@code{guix-devel-copy-module-as-kill}). | ||
| 655 | |||
| 656 | @item C-c . u | ||
| 657 | Use the current Guile module. Often after opening a Scheme file, you | ||
| 658 | want to use a module it defines, so you switch to the Geiser REPL and | ||
| 659 | write @code{,use (some module)} there. You may just use this command | ||
| 660 | instead (@code{guix-devel-use-module}). | ||
| 661 | |||
| 662 | @item C-c . b | ||
| 663 | Build a package defined by the current variable definition. The | ||
| 664 | building process is run in the current Geiser REPL. If you modified the | ||
| 665 | current package definition, don't forget to reevaluate it before calling | ||
| 666 | this command---for example, with @kbd{C-M-x} (@pxref{To eval or not to | ||
| 667 | eval,,, geiser, Geiser User Manual}) | ||
| 668 | (@code{guix-devel-build-package-definition}). | ||
| 669 | |||
| 670 | @end table | ||
| 671 | |||
| 672 | Unluckily, there is a limitation related to long-running REPL commands. | ||
| 673 | When there is a running process in a Geiser REPL, you are not supposed | ||
| 674 | to evaluate anything in a scheme buffer, because this will ``freeze'' | ||
| 675 | the REPL: it will stop producing any output (however, the evaluating | ||
| 676 | process will continue---you will just not see any progress anymore). Be | ||
| 677 | aware: even moving the point in a scheme buffer may ``break'' the REPL | ||
| 678 | if Autodoc (@pxref{Autodoc and friends,,, geiser, Geiser User Manual}) | ||
| 679 | is enabled (which is the default). | ||
| 680 | |||
| 681 | So you have to postpone editing your scheme buffers until the running | ||
| 682 | evaluation will be finished in the REPL. | ||
| 683 | |||
| 684 | Alternatively, to avoid this limitation, you may just run another Geiser | ||
| 685 | REPL, and while something is being evaluated in the previous REPL, you | ||
| 686 | can continue editing a scheme file with the help of the current one. | ||
diff --git a/doc/guix.texi b/doc/guix.texi index 07c5add5aac..8608e7a49f8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -113,7 +113,8 @@ Emacs Interface | |||
| 113 | * Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands. | 113 | * Popup Interface: Emacs Popup Interface. Magit-like interface for guix commands. |
| 114 | * Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. | 114 | * Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. |
| 115 | * Build Log Mode: Emacs Build Log. Highlighting Guix build logs. | 115 | * Build Log Mode: Emacs Build Log. Highlighting Guix build logs. |
| 116 | * Completions: Emacs Completions. Completing @command{guix} shell command. | 116 | * Completions: Emacs Completions. Completing @command{guix} shell command. |
| 117 | * Development: Emacs Development. Tools for Guix developers. | ||
| 117 | 118 | ||
| 118 | Programming Interface | 119 | Programming Interface |
| 119 | 120 | ||
| @@ -23,6 +23,7 @@ ELFILES = \ | |||
| 23 | emacs/guix-base.el \ | 23 | emacs/guix-base.el \ |
| 24 | emacs/guix-build-log.el \ | 24 | emacs/guix-build-log.el \ |
| 25 | emacs/guix-command.el \ | 25 | emacs/guix-command.el \ |
| 26 | emacs/guix-devel.el \ | ||
| 26 | emacs/guix-emacs.el \ | 27 | emacs/guix-emacs.el \ |
| 27 | emacs/guix-external.el \ | 28 | emacs/guix-external.el \ |
| 28 | emacs/guix-geiser.el \ | 29 | emacs/guix-geiser.el \ |
diff --git a/emacs/guix-command.el b/emacs/guix-command.el index 504d5f7ca00..b679ad9b1e4 100644 --- a/emacs/guix-command.el +++ b/emacs/guix-command.el | |||
| @@ -503,7 +503,10 @@ to be modified." | |||
| 503 | :name "log" :char ?l :doc "View build log")) | 503 | :name "log" :char ?l :doc "View build log")) |
| 504 | (("graph") | 504 | (("graph") |
| 505 | ,(guix-command-make-argument | 505 | ,(guix-command-make-argument |
| 506 | :name "view" :char ?v :doc "View graph"))) | 506 | :name "view" :char ?v :doc "View graph")) |
| 507 | (("size") | ||
| 508 | ,(guix-command-make-argument | ||
| 509 | :name "view" :char ?v :doc "View map"))) | ||
| 507 | "Alist of guix commands and additional 'execute' action arguments.") | 510 | "Alist of guix commands and additional 'execute' action arguments.") |
| 508 | 511 | ||
| 509 | (defun guix-command-execute-arguments (commands) | 512 | (defun guix-command-execute-arguments (commands) |
| @@ -525,7 +528,9 @@ to be modified." | |||
| 525 | (("build") | 528 | (("build") |
| 526 | ("log" . guix-run-view-build-log)) | 529 | ("log" . guix-run-view-build-log)) |
| 527 | (("graph") | 530 | (("graph") |
| 528 | ("view" . guix-run-view-graph))) | 531 | ("view" . guix-run-view-graph)) |
| 532 | (("size") | ||
| 533 | ("view" . guix-run-view-size-map))) | ||
| 529 | "Alist of guix commands and alists of special executers for them. | 534 | "Alist of guix commands and alists of special executers for them. |
| 530 | See also `guix-command-default-executors'.") | 535 | See also `guix-command-default-executors'.") |
| 531 | 536 | ||
| @@ -583,6 +588,23 @@ open the log file(s)." | |||
| 583 | (guix-find-file graph-file) | 588 | (guix-find-file graph-file) |
| 584 | (error "Couldn't create a graph")))) | 589 | (error "Couldn't create a graph")))) |
| 585 | 590 | ||
| 591 | (defun guix-run-view-size-map (args) | ||
| 592 | "Run 'guix ARGS ...' size command, and open the map file." | ||
| 593 | (let* ((wished-map-file | ||
| 594 | (cl-some (lambda (arg) | ||
| 595 | (and (string-match "--map-file=\\(.+\\)" arg) | ||
| 596 | (match-string 1 arg))) | ||
| 597 | args)) | ||
| 598 | (map-file (or wished-map-file (guix-png-file-name))) | ||
| 599 | (args (if wished-map-file | ||
| 600 | args | ||
| 601 | (apply #'list | ||
| 602 | (car args) | ||
| 603 | (concat "--map-file=" map-file) | ||
| 604 | (cdr args))))) | ||
| 605 | (guix-command-output args) | ||
| 606 | (guix-find-file map-file))) | ||
| 607 | |||
| 586 | 608 | ||
| 587 | ;;; Generating popups, actions, etc. | 609 | ;;; Generating popups, actions, etc. |
| 588 | 610 | ||
diff --git a/emacs/guix-devel.el b/emacs/guix-devel.el new file mode 100644 index 00000000000..6de49be3e65 --- /dev/null +++ b/emacs/guix-devel.el | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | ;;; guix-devel.el --- Development tools -*- lexical-binding: t -*- | ||
| 2 | |||
| 3 | ;; Copyright © 2015 Alex Kost <alezost@gmail.com> | ||
| 4 | |||
| 5 | ;; This file is part of GNU Guix. | ||
| 6 | |||
| 7 | ;; GNU Guix is free software; you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Guix is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | |||
| 22 | ;; This file provides commands useful for developing Guix (or even | ||
| 23 | ;; arbitrary Guile code) with Geiser. | ||
| 24 | |||
| 25 | ;;; Code: | ||
| 26 | |||
| 27 | (require 'guix-guile) | ||
| 28 | (require 'guix-geiser) | ||
| 29 | (require 'guix-utils) | ||
| 30 | (require 'guix-base) | ||
| 31 | |||
| 32 | (defgroup guix-devel nil | ||
| 33 | "Settings for Guix development utils." | ||
| 34 | :group 'guix) | ||
| 35 | |||
| 36 | (defcustom guix-devel-activate-mode t | ||
| 37 | "If non-nil, then `guix-devel-mode' is automatically activated | ||
| 38 | in Scheme buffers." | ||
| 39 | :type 'boolean | ||
| 40 | :group 'guix-devel) | ||
| 41 | |||
| 42 | (defun guix-devel-use-modules (&rest modules) | ||
| 43 | "Use guile MODULES." | ||
| 44 | (apply #'guix-geiser-call "use-modules" modules)) | ||
| 45 | |||
| 46 | (defun guix-devel-use-module (&optional module) | ||
| 47 | "Use guile MODULE in the current Geiser REPL. | ||
| 48 | MODULE is a string with the module name - e.g., \"(ice-9 match)\". | ||
| 49 | Interactively, use the module defined by the current scheme file." | ||
| 50 | (interactive (list (guix-guile-current-module))) | ||
| 51 | (guix-devel-use-modules module) | ||
| 52 | (message "Using %s module." module)) | ||
| 53 | |||
| 54 | (defun guix-devel-copy-module-as-kill () | ||
| 55 | "Put the name of the current guile module into `kill-ring'." | ||
| 56 | (interactive) | ||
| 57 | (guix-copy-as-kill (guix-guile-current-module))) | ||
| 58 | |||
| 59 | (defun guix-devel-setup-repl (&optional repl) | ||
| 60 | "Setup REPL for using `guix-devel-...' commands." | ||
| 61 | (guix-devel-use-modules "(guix monad-repl)" | ||
| 62 | "(guix scripts)" | ||
| 63 | "(guix store)") | ||
| 64 | ;; Without this workaround, the build output disappears. See | ||
| 65 | ;; <https://github.com/jaor/geiser/issues/83> for details. | ||
| 66 | (guix-geiser-eval-in-repl | ||
| 67 | "(current-build-output-port (current-error-port))" | ||
| 68 | repl 'no-history 'no-display)) | ||
| 69 | |||
| 70 | (defvar guix-devel-repl-processes nil | ||
| 71 | "List of REPL processes configured by `guix-devel-setup-repl'.") | ||
| 72 | |||
| 73 | (defun guix-devel-setup-repl-maybe (&optional repl) | ||
| 74 | "Setup (if needed) REPL for using `guix-devel-...' commands." | ||
| 75 | (let ((process (get-buffer-process (or repl (guix-geiser-repl))))) | ||
| 76 | (when (and process | ||
| 77 | (not (memq process guix-devel-repl-processes))) | ||
| 78 | (guix-devel-setup-repl repl) | ||
| 79 | (push process guix-devel-repl-processes)))) | ||
| 80 | |||
| 81 | (defun guix-devel-build-package-definition () | ||
| 82 | "Build a package defined by the current top-level variable definition." | ||
| 83 | (interactive) | ||
| 84 | (let ((def (guix-guile-current-definition))) | ||
| 85 | (guix-devel-setup-repl-maybe) | ||
| 86 | (guix-devel-use-modules (guix-guile-current-module)) | ||
| 87 | (when (or (not guix-operation-confirm) | ||
| 88 | (guix-operation-prompt (format "Build '%s'?" def))) | ||
| 89 | (guix-geiser-eval-in-repl | ||
| 90 | (concat ",run-in-store " | ||
| 91 | (guix-guile-make-call-expression | ||
| 92 | "build-package" def | ||
| 93 | "#:use-substitutes?" (guix-guile-boolean | ||
| 94 | guix-use-substitutes) | ||
| 95 | "#:dry-run?" (guix-guile-boolean guix-dry-run))))))) | ||
| 96 | |||
| 97 | (defvar guix-devel-keys-map | ||
| 98 | (let ((map (make-sparse-keymap))) | ||
| 99 | (define-key map (kbd "b") 'guix-devel-build-package-definition) | ||
| 100 | (define-key map (kbd "k") 'guix-devel-copy-module-as-kill) | ||
| 101 | (define-key map (kbd "u") 'guix-devel-use-module) | ||
| 102 | map) | ||
| 103 | "Keymap with subkeys for `guix-devel-mode-map'.") | ||
| 104 | |||
| 105 | (defvar guix-devel-mode-map | ||
| 106 | (let ((map (make-sparse-keymap))) | ||
| 107 | (define-key map (kbd "C-c .") guix-devel-keys-map) | ||
| 108 | map) | ||
| 109 | "Keymap for `guix-devel-mode'.") | ||
| 110 | |||
| 111 | ;;;###autoload | ||
| 112 | (define-minor-mode guix-devel-mode | ||
| 113 | "Minor mode for `scheme-mode' buffers. | ||
| 114 | |||
| 115 | With a prefix argument ARG, enable the mode if ARG is positive, | ||
| 116 | and disable it otherwise. If called from Lisp, enable the mode | ||
| 117 | if ARG is omitted or nil. | ||
| 118 | |||
| 119 | When Guix Devel mode is enabled, it provides the following key | ||
| 120 | bindings: | ||
| 121 | |||
| 122 | \\{guix-devel-mode-map}" | ||
| 123 | :init-value nil | ||
| 124 | :lighter " Guix" | ||
| 125 | :keymap guix-devel-mode-map) | ||
| 126 | |||
| 127 | ;;;###autoload | ||
| 128 | (defun guix-devel-activate-mode-maybe () | ||
| 129 | "Activate `guix-devel-mode' depending on | ||
| 130 | `guix-devel-activate-mode' variable." | ||
| 131 | (when guix-devel-activate-mode | ||
| 132 | (guix-devel-mode))) | ||
| 133 | |||
| 134 | (provide 'guix-devel) | ||
| 135 | |||
| 136 | ;;; guix-devel.el ends here | ||
diff --git a/emacs/guix-guile.el b/emacs/guix-guile.el index cff9bd4e9b3..35a97d77a3c 100644 --- a/emacs/guix-guile.el +++ b/emacs/guix-guile.el | |||
| @@ -24,6 +24,41 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Code: | 25 | ;;; Code: |
| 26 | 26 | ||
| 27 | (require 'geiser-guile) | ||
| 28 | |||
| 29 | (defvar guix-guile-definition-regexp | ||
| 30 | (rx bol "(define" | ||
| 31 | (zero-or-one "*") | ||
| 32 | (zero-or-one "-public") | ||
| 33 | (one-or-more space) | ||
| 34 | (zero-or-one "(") | ||
| 35 | (group (one-or-more (or word (syntax symbol))))) | ||
| 36 | "Regexp used to find the guile definition.") | ||
| 37 | |||
| 38 | (defun guix-guile-current-definition () | ||
| 39 | "Return string with name of the current top-level guile definition." | ||
| 40 | (save-excursion | ||
| 41 | (beginning-of-defun) | ||
| 42 | (if (looking-at guix-guile-definition-regexp) | ||
| 43 | (match-string-no-properties 1) | ||
| 44 | (error "Couldn't find the current definition")))) | ||
| 45 | |||
| 46 | (defun guix-guile-current-module () | ||
| 47 | "Return a string with the current guile module. | ||
| 48 | Return nil, if current buffer does not define a module." | ||
| 49 | ;; Modified version of `geiser-guile--get-module'. | ||
| 50 | (save-excursion | ||
| 51 | (geiser-syntax--pop-to-top) | ||
| 52 | (when (or (re-search-backward geiser-guile--module-re nil t) | ||
| 53 | (looking-at geiser-guile--library-re) | ||
| 54 | (re-search-forward geiser-guile--module-re nil t)) | ||
| 55 | (match-string-no-properties 1)))) | ||
| 56 | |||
| 57 | (defun guix-guile-boolean (arg) | ||
| 58 | "Return a string with guile boolean value. | ||
| 59 | Transform elisp ARG (nil or non-nil) to the guile boolean (#f or #t)." | ||
| 60 | (concat "#" (prin1-to-string (if arg 't 'f)))) | ||
| 61 | |||
| 27 | (defun guix-guile-make-call-expression (proc &rest args) | 62 | (defun guix-guile-make-call-expression (proc &rest args) |
| 28 | "Return \"(PROC ARGS ...)\" string. | 63 | "Return \"(PROC ARGS ...)\" string. |
| 29 | PROC and ARGS should be strings." | 64 | PROC and ARGS should be strings." |
diff --git a/emacs/guix-init.el b/emacs/guix-init.el index 3a727c7eb6f..96aa0c2ffcb 100644 --- a/emacs/guix-init.el +++ b/emacs/guix-init.el | |||
| @@ -12,4 +12,6 @@ avoid loading autoloads of Emacs packages installed in | |||
| 12 | (require 'guix-emacs) | 12 | (require 'guix-emacs) |
| 13 | (guix-emacs-load-autoloads 'all)) | 13 | (guix-emacs-load-autoloads 'all)) |
| 14 | 14 | ||
| 15 | (add-hook 'scheme-mode-hook 'guix-devel-activate-mode-maybe) | ||
| 16 | |||
| 15 | (provide 'guix-init) | 17 | (provide 'guix-init) |
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index cbf06250d09..a35ef278ee5 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm | |||
| @@ -60,6 +60,7 @@ | |||
| 60 | #:use-module (gnu packages readline) | 60 | #:use-module (gnu packages readline) |
| 61 | #:use-module (gnu packages xiph) | 61 | #:use-module (gnu packages xiph) |
| 62 | #:use-module (gnu packages xml) | 62 | #:use-module (gnu packages xml) |
| 63 | #:use-module (gnu packages xorg) | ||
| 63 | #:use-module (gnu packages zip) | 64 | #:use-module (gnu packages zip) |
| 64 | #:use-module (srfi srfi-1)) | 65 | #:use-module (srfi srfi-1)) |
| 65 | 66 | ||
| @@ -1739,6 +1740,39 @@ directly to a different computer on your LAN network. It is an audio daemon | |||
| 1739 | with a much different focus than most other audio daemons.") | 1740 | with a much different focus than most other audio daemons.") |
| 1740 | (license license:gpl3+))) | 1741 | (license license:gpl3+))) |
| 1741 | 1742 | ||
| 1743 | (define-public xjackfreak | ||
| 1744 | (package | ||
| 1745 | (name "xjackfreak") | ||
| 1746 | (version "1.0") | ||
| 1747 | (source (origin | ||
| 1748 | (method url-fetch) | ||
| 1749 | (uri (string-append | ||
| 1750 | "https://github.com/johnhldavis/xjackfreak/archive/v" | ||
| 1751 | version ".tar.gz")) | ||
| 1752 | (file-name (string-append name "-" version ".tar.gz")) | ||
| 1753 | (sha256 | ||
| 1754 | (base32 | ||
| 1755 | "0xj6gpxfnw9jbdgwgm0x23xgfvj2kwmwb1nk0drw8lxgcchkq7d9")))) | ||
| 1756 | (build-system gnu-build-system) | ||
| 1757 | (arguments | ||
| 1758 | `(#:make-flags | ||
| 1759 | (list (string-append "docdir=" (assoc-ref %outputs "out") | ||
| 1760 | "/share/doc/xjackfreak")))) | ||
| 1761 | (inputs | ||
| 1762 | `(("jack" ,jack-1) | ||
| 1763 | ("libx11" ,libx11) | ||
| 1764 | ("libxt" ,libxt) | ||
| 1765 | ("libxext" ,libxext))) | ||
| 1766 | (native-inputs | ||
| 1767 | `(("pkg-config" ,pkg-config))) | ||
| 1768 | (home-page "https://github.com/johnhldavis/xjackfreak") | ||
| 1769 | (synopsis "JACK audio frequency analyzer and display") | ||
| 1770 | (description | ||
| 1771 | "XJackFreak is an audio analysis and equalizing tool for the Jack Audio | ||
| 1772 | Connection Kit. It can display the FFT of any input, modify it and output the | ||
| 1773 | result.") | ||
| 1774 | (license license:gpl3+))) | ||
| 1775 | |||
| 1742 | (define-public zita-convolver | 1776 | (define-public zita-convolver |
| 1743 | (package | 1777 | (package |
| 1744 | (name "zita-convolver") | 1778 | (name "zita-convolver") |
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index f224ebfd322..02e65d32765 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | #:use-module (gnu packages autotools) | 28 | #:use-module (gnu packages autotools) |
| 29 | #:use-module (gnu packages bash) | 29 | #:use-module (gnu packages bash) |
| 30 | #:use-module (gnu packages boost) | 30 | #:use-module (gnu packages boost) |
| 31 | #:use-module (gnu packages image) | ||
| 32 | #:use-module (gnu packages python) | ||
| 31 | #:use-module (gnu packages fontutils) | 33 | #:use-module (gnu packages fontutils) |
| 32 | #:use-module (gnu packages pkg-config) | 34 | #:use-module (gnu packages pkg-config) |
| 33 | #:use-module (gnu packages compression) | 35 | #:use-module (gnu packages compression) |
| @@ -130,6 +132,44 @@ use in computer imaging applications. The IlmImf C++ libraries support | |||
| 130 | storage of the \"EXR\" file format for storing 16-bit floating-point images.") | 132 | storage of the \"EXR\" file format for storing 16-bit floating-point images.") |
| 131 | (license license:bsd-3))) | 133 | (license license:bsd-3))) |
| 132 | 134 | ||
| 135 | (define-public openimageio | ||
| 136 | (package | ||
| 137 | (name "openimageio") | ||
| 138 | (version "1.5.18") | ||
| 139 | (source (origin | ||
| 140 | (method url-fetch) | ||
| 141 | (uri (string-append "https://github.com/OpenImageIO/oiio/" | ||
| 142 | "archive/Release-" version ".tar.gz")) | ||
| 143 | (file-name (string-append name "-" version ".tar.gz")) | ||
| 144 | (sha256 | ||
| 145 | (base32 | ||
| 146 | "0mn7cz19mn8dcrhkq15h25gl20ammr1wz0j2j3c2vxs6ph7zn8jy")))) | ||
| 147 | (build-system cmake-build-system) | ||
| 148 | ;; FIXME: To run all tests successfully, test image sets from multiple | ||
| 149 | ;; third party sources have to be present. For details see | ||
| 150 | ;; https://github.com/OpenImageIO/oiio/blob/master/INSTALL | ||
| 151 | (arguments `(#:tests? #f)) | ||
| 152 | (native-inputs | ||
| 153 | `(("pkg-config" ,pkg-config))) | ||
| 154 | (inputs | ||
| 155 | `(("boost" ,boost) | ||
| 156 | ("libpng" ,libpng) | ||
| 157 | ("libjpeg" ,libjpeg-8) | ||
| 158 | ("libtiff" ,libtiff) | ||
| 159 | ("giflib" ,giflib) | ||
| 160 | ("openexr" ,openexr) | ||
| 161 | ("ilmbase" ,ilmbase) | ||
| 162 | ("python" ,python-2) | ||
| 163 | ("zlib" ,zlib))) | ||
| 164 | (synopsis "C++ library for reading and writing images") | ||
| 165 | (description | ||
| 166 | "OpenImageIO is a library for reading and writing images, and a bunch of | ||
| 167 | related classes, utilities, and applications. There is a particular emphasis | ||
| 168 | on formats and functionality used in professional, large-scale animation and | ||
| 169 | visual effects work for film.") | ||
| 170 | (home-page "http://www.openimageio.org") | ||
| 171 | (license license:bsd-3))) | ||
| 172 | |||
| 133 | (define-public ctl | 173 | (define-public ctl |
| 134 | (package | 174 | (package |
| 135 | (name "ctl") | 175 | (name "ctl") |
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index ca367929e08..0c13303d7d6 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm | |||
| @@ -3388,14 +3388,14 @@ a front-end for C compilers or analysis tools.") | |||
| 3388 | (define-public python-cffi | 3388 | (define-public python-cffi |
| 3389 | (package | 3389 | (package |
| 3390 | (name "python-cffi") | 3390 | (name "python-cffi") |
| 3391 | (version "0.8.6") | 3391 | (version "1.2.1") |
| 3392 | (source | 3392 | (source |
| 3393 | (origin | 3393 | (origin |
| 3394 | (method url-fetch) | 3394 | (method url-fetch) |
| 3395 | (uri (string-append "https://pypi.python.org/packages/source/c/" | 3395 | (uri (string-append "https://pypi.python.org/packages/source/c/" |
| 3396 | "cffi/cffi-" version ".tar.gz")) | 3396 | "cffi/cffi-" version ".tar.gz")) |
| 3397 | (sha256 | 3397 | (sha256 |
| 3398 | (base32 "0406j3sgndmx88idv5zxkkrwfqxmjl18pj8gf47nsg4ymzixjci5")))) | 3398 | (base32 "0g8yfzinry1vsj6d1jlnd19338bh92lhhk207ksy4lm1n3g73dga")))) |
| 3399 | (build-system python-build-system) | 3399 | (build-system python-build-system) |
| 3400 | (outputs '("out" "doc")) | 3400 | (outputs '("out" "doc")) |
| 3401 | (inputs | 3401 | (inputs |
| @@ -3405,10 +3405,10 @@ a front-end for C compilers or analysis tools.") | |||
| 3405 | (native-inputs | 3405 | (native-inputs |
| 3406 | `(("pkg-config" ,pkg-config) | 3406 | `(("pkg-config" ,pkg-config) |
| 3407 | ("python-sphinx" ,python-sphinx) | 3407 | ("python-sphinx" ,python-sphinx) |
| 3408 | ("python-pytest" ,python-pytest) | ||
| 3408 | ("python-setuptools" ,python-setuptools))) | 3409 | ("python-setuptools" ,python-setuptools))) |
| 3409 | (arguments | 3410 | (arguments |
| 3410 | `(#:tests? #f ; FIXME: requires pytest | 3411 | `(#:phases |
| 3411 | #:phases | ||
| 3412 | (alist-cons-after | 3412 | (alist-cons-after |
| 3413 | 'install 'install-doc | 3413 | 'install 'install-doc |
| 3414 | (lambda* (#:key outputs #:allow-other-keys) | 3414 | (lambda* (#:key outputs #:allow-other-keys) |
| @@ -4945,3 +4945,26 @@ printing of sub-tables by specifying a row range.") | |||
| 4945 | 4945 | ||
| 4946 | (define-public python2-prettytable | 4946 | (define-public python2-prettytable |
| 4947 | (package-with-python2 python-prettytable)) | 4947 | (package-with-python2 python-prettytable)) |
| 4948 | |||
| 4949 | (define-public python-pyasn1 | ||
| 4950 | (package | ||
| 4951 | (name "python-pyasn1") | ||
| 4952 | (version "0.1.8") | ||
| 4953 | (source | ||
| 4954 | (origin | ||
| 4955 | (method url-fetch) | ||
| 4956 | (uri (string-append "https://pypi.python.org/packages/source/p/" | ||
| 4957 | "pyasn1/pyasn1-" version ".tar.gz")) | ||
| 4958 | (sha256 | ||
| 4959 | (base32 | ||
| 4960 | "0iw31d9l0zwx35szkzq72hiw002wnqrlrsi9dpbrfngcl1ybwcsx")))) | ||
| 4961 | (build-system python-build-system) | ||
| 4962 | (home-page "http://pyasn1.sourceforge.net/") | ||
| 4963 | (synopsis "ASN.1 types and codecs") | ||
| 4964 | (description | ||
| 4965 | "This is an implementation of ASN.1 types and codecs in Python. It is | ||
| 4966 | suitable for a wide range of protocols based on the ASN.1 specification.") | ||
| 4967 | (license bsd-2))) | ||
| 4968 | |||
| 4969 | (define-public python2-pyasn1 | ||
| 4970 | (package-with-python2 python-pyasn1)) | ||
diff --git a/guix/build/download.scm b/guix/build/download.scm index d362fc1f265..4b7c53d2c6b 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm | |||
| @@ -101,27 +101,29 @@ width of the bar is BAR-WIDTH." | |||
| 101 | 101 | ||
| 102 | (define (string-pad-middle left right len) | 102 | (define (string-pad-middle left right len) |
| 103 | "Combine LEFT and RIGHT with enough padding in the middle so that the | 103 | "Combine LEFT and RIGHT with enough padding in the middle so that the |
| 104 | resulting string has length at least LEN. This right justifies RIGHT." | 104 | resulting string has length at least LEN (it may overflow). If the string |
| 105 | (string-append left | 105 | does not overflow, the last char in RIGHT will be flush with the LEN |
| 106 | (string-pad right (max 0 (- len (string-length left)))))) | 106 | column." |
| 107 | 107 | (let* ((total-used (+ (string-length left) | |
| 108 | (define (store-url-abbreviation url) | 108 | (string-length right))) |
| 109 | "Return a friendlier version of URL for display." | 109 | (num-spaces (max 1 (- len total-used))) |
| 110 | (let ((store-path (string-append (%store-directory) "/" (basename url)))) | 110 | (padding (make-string num-spaces #\space))) |
| 111 | ;; Take advantage of the implementation for store paths. | 111 | (string-append left padding right))) |
| 112 | (store-path-abbreviation store-path))) | ||
| 113 | 112 | ||
| 114 | (define* (store-path-abbreviation store-path #:optional (prefix-length 6)) | 113 | (define* (store-path-abbreviation store-path #:optional (prefix-length 6)) |
| 115 | "Return an abbreviation of STORE-PATH for display, showing PREFIX-LENGTH | 114 | "If STORE-PATH is the file name of a store entry, return an abbreviation of |
| 116 | characters of the hash." | 115 | STORE-PATH for display, showing PREFIX-LENGTH characters of the hash. |
| 117 | (let ((base (basename store-path))) | 116 | Otherwise return STORE-PATH." |
| 118 | (string-append (string-take base prefix-length) | 117 | (if (string-prefix? (%store-directory) store-path) |
| 119 | "…" | 118 | (let ((base (basename store-path))) |
| 120 | (string-drop base 32)))) | 119 | (string-append (string-take base prefix-length) |
| 120 | "…" | ||
| 121 | (string-drop base 32))) | ||
| 122 | store-path)) | ||
| 121 | 123 | ||
| 122 | (define* (progress-proc file size | 124 | (define* (progress-proc file size |
| 123 | #:optional (log-port (current-output-port)) | 125 | #:optional (log-port (current-output-port)) |
| 124 | #:key (abbreviation identity)) | 126 | #:key (abbreviation basename)) |
| 125 | "Return a procedure to show the progress of FILE's download, which is SIZE | 127 | "Return a procedure to show the progress of FILE's download, which is SIZE |
| 126 | bytes long. The returned procedure is suitable for use as an argument to | 128 | bytes long. The returned procedure is suitable for use as an argument to |
| 127 | `dump-port'. The progress report is written to LOG-PORT, with ABBREVIATION | 129 | `dump-port'. The progress report is written to LOG-PORT, with ABBREVIATION |
| @@ -519,7 +521,7 @@ on success." | |||
| 519 | (_ (list (string->uri url)))))) | 521 | (_ (list (string->uri url)))))) |
| 520 | 522 | ||
| 521 | (define (fetch uri file) | 523 | (define (fetch uri file) |
| 522 | (format #t "starting download of `~a' from `~a'...~%" | 524 | (format #t "~%Starting download of ~a~%From ~a...~%" |
| 523 | file (uri->string uri)) | 525 | file (uri->string uri)) |
| 524 | (case (uri-scheme uri) | 526 | (case (uri-scheme uri) |
| 525 | ((http https) | 527 | ((http https) |
diff --git a/guix/profiles.scm b/guix/profiles.scm index d19b49f6d2d..0b417a64ded 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm | |||
| @@ -474,7 +474,9 @@ MANIFEST." | |||
| 474 | '#$(manifest-inputs manifest))))) | 474 | '#$(manifest-inputs manifest))))) |
| 475 | 475 | ||
| 476 | (gexp->derivation "info-dir" build | 476 | (gexp->derivation "info-dir" build |
| 477 | #:modules '((guix build utils)))) | 477 | #:modules '((guix build utils)) |
| 478 | #:local-build? #t | ||
| 479 | #:substitutable? #f)) | ||
| 478 | 480 | ||
| 479 | (define (ghc-package-cache-file manifest) | 481 | (define (ghc-package-cache-file manifest) |
| 480 | "Return a derivation that builds the GHC 'package.cache' file for all the | 482 | "Return a derivation that builds the GHC 'package.cache' file for all the |
| @@ -527,7 +529,8 @@ entries of MANIFEST, or #f if MANIFEST does not have any GHC packages." | |||
| 527 | (map manifest-entry-name (manifest-entries manifest))) | 529 | (map manifest-entry-name (manifest-entries manifest))) |
| 528 | (gexp->derivation "ghc-package-cache" build | 530 | (gexp->derivation "ghc-package-cache" build |
| 529 | #:modules '((guix build utils)) | 531 | #:modules '((guix build utils)) |
| 530 | #:local-build? #t) | 532 | #:local-build? #t |
| 533 | #:substitutable? #f) | ||
| 531 | (return #f)))) | 534 | (return #f)))) |
| 532 | 535 | ||
| 533 | (define (ca-certificate-bundle manifest) | 536 | (define (ca-certificate-bundle manifest) |
| @@ -591,7 +594,8 @@ MANIFEST. Single-file bundles are required by programs such as Git and Lynx." | |||
| 591 | 594 | ||
| 592 | (gexp->derivation "ca-certificate-bundle" build | 595 | (gexp->derivation "ca-certificate-bundle" build |
| 593 | #:modules '((guix build utils)) | 596 | #:modules '((guix build utils)) |
| 594 | #:local-build? #t)) | 597 | #:local-build? #t |
| 598 | #:substitutable? #f)) | ||
| 595 | 599 | ||
| 596 | (define (gtk-icon-themes manifest) | 600 | (define (gtk-icon-themes manifest) |
| 597 | "Return a derivation that unions all icon themes from manifest entries and | 601 | "Return a derivation that unions all icon themes from manifest entries and |
| @@ -669,7 +673,8 @@ creates the GTK+ 'icon-theme.cache' file for each theme." | |||
| 669 | (guix build profiles) | 673 | (guix build profiles) |
| 670 | (guix search-paths) | 674 | (guix search-paths) |
| 671 | (guix records)) | 675 | (guix records)) |
| 672 | #:local-build? #t) | 676 | #:local-build? #t |
| 677 | #:substitutable? #f) | ||
| 673 | (return #f)))) | 678 | (return #f)))) |
| 674 | 679 | ||
| 675 | (define %default-profile-hooks | 680 | (define %default-profile-hooks |
| @@ -727,7 +732,14 @@ the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc." | |||
| 727 | (guix build utils) | 732 | (guix build utils) |
| 728 | (guix search-paths) | 733 | (guix search-paths) |
| 729 | (guix records)) | 734 | (guix records)) |
| 730 | #:local-build? #t))) | 735 | |
| 736 | ;; Not worth offloading. | ||
| 737 | #:local-build? #t | ||
| 738 | |||
| 739 | ;; Disable substitution because it would trigger a | ||
| 740 | ;; connection to the substitute server, which is likely | ||
| 741 | ;; to have no substitute to offer. | ||
| 742 | #:substitutable? #f))) | ||
| 731 | 743 | ||
| 732 | (define (profile-regexp profile) | 744 | (define (profile-regexp profile) |
| 733 | "Return a regular expression that matches PROFILE's name and number." | 745 | "Return a regular expression that matches PROFILE's name and number." |
diff --git a/guix/ui.scm b/guix/ui.scm index 4a3630f2429..67dd062a342 100644 --- a/guix/ui.scm +++ b/guix/ui.scm | |||
| @@ -803,7 +803,10 @@ converted to a space; sequences of more than one line break are preserved." | |||
| 803 | 803 | ||
| 804 | (define (texi->plain-text str) | 804 | (define (texi->plain-text str) |
| 805 | "Return a plain-text representation of texinfo fragment STR." | 805 | "Return a plain-text representation of texinfo fragment STR." |
| 806 | (stexi->plain-text (texi-fragment->stexi str))) | 806 | ;; 'texi-fragment->stexi' uses a string port so make sure it's a |
| 807 | ;; Unicode-capable one (see <http://bugs.gnu.org/11197>.) | ||
| 808 | (with-fluids ((%default-port-encoding "UTF-8")) | ||
| 809 | (stexi->plain-text (texi-fragment->stexi str)))) | ||
| 807 | 810 | ||
| 808 | (define (package-description-string package) | 811 | (define (package-description-string package) |
| 809 | "Return a plain-text representation of PACKAGE description field." | 812 | "Return a plain-text representation of PACKAGE description field." |
diff --git a/tests/cran.scm b/tests/cran.scm index c9cb5f69d0f..ba5699a1332 100644 --- a/tests/cran.scm +++ b/tests/cran.scm | |||
| @@ -149,8 +149,7 @@ | |||
| 149 | ('version "1.2.3") | 149 | ('version "1.2.3") |
| 150 | ('source ('origin | 150 | ('source ('origin |
| 151 | ('method 'url-fetch) | 151 | ('method 'url-fetch) |
| 152 | ('uri ('string-append "mirror://cran/src/contrib/my-example-sxml_" | 152 | ('uri ('cran-uri "my-example-sxml" 'version)) |
| 153 | 'version ".tar.gz")) | ||
| 154 | ('sha256 | 153 | ('sha256 |
| 155 | ('base32 | 154 | ('base32 |
| 156 | (? string? hash))))) | 155 | (? string? hash))))) |
diff --git a/tests/ui.scm b/tests/ui.scm index 25fc7094317..bd4c907525c 100644 --- a/tests/ui.scm +++ b/tests/ui.scm | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #:use-module (guix profiles) | 22 | #:use-module (guix profiles) |
| 23 | #:use-module (guix store) | 23 | #:use-module (guix store) |
| 24 | #:use-module (guix derivations) | 24 | #:use-module (guix derivations) |
| 25 | #:use-module (guix tests) | ||
| 25 | #:use-module (srfi srfi-1) | 26 | #:use-module (srfi srfi-1) |
| 26 | #:use-module (srfi srfi-11) | 27 | #:use-module (srfi srfi-11) |
| 27 | #:use-module (srfi srfi-19) | 28 | #:use-module (srfi srfi-19) |
| @@ -89,6 +90,12 @@ interface, and powerful string processing.") | |||
| 89 | (fill-paragraph "First line. | 90 | (fill-paragraph "First line. |
| 90 | Second line" 24)) | 91 | Second line" 24)) |
| 91 | 92 | ||
| 93 | (test-equal "package-description-string vs. Unicode" | ||
| 94 | "b•ll•t\n\n" ;see <http://bugs.gnu.org/21536> | ||
| 95 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | ||
| 96 | (package-description-string | ||
| 97 | (dummy-package "foo" (description "b•ll•t"))))) | ||
| 98 | |||
| 92 | (test-equal "package-specification->name+version+output" | 99 | (test-equal "package-specification->name+version+output" |
| 93 | '(("guile" #f "out") | 100 | '(("guile" #f "out") |
| 94 | ("guile" "2.0.9" "out") | 101 | ("guile" "2.0.9" "out") |
