From 76192896e9fa9a79e76752b60b96a911a3e632ee Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 31 Dec 2015 22:10:11 +0200 Subject: services: Add connman-service. * gnu/services/networking.scm (connman-service): New procedure. (connman-service-type, %connman-activation): New variables. (connman-shepherd-service): New procedure. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 0d72574619..b575faffd7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18,7 +18,8 @@ Copyright @copyright{} 2014 Pierre-Antoine Rault@* Copyright @copyright{} 2015 Taylan Ulrich Bayırlı/Kammer@* Copyright @copyright{} 2015, 2016 Leo Famulari@* Copyright @copyright{} 2016 Ben Woodcroft@* -Copyright @copyright{} 2016 Chris Marusich +Copyright @copyright{} 2016 Chris Marusich@* +Copyright @copyright{} 2016 Efraim Flashner Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -7390,6 +7391,17 @@ Return a service that runs NetworkManager, a network connection manager attempting to keep network connectivity active when available. @end deffn +@cindex Connman +@deffn {Scheme Procedure} connman-service @ + [#:connman @var{connman}] +Return a service that runs @url{https://01.org/connman,Connman}, a network +connection manager. + +This service adds the @var{connman} package to the global profile, providing +several the @command{connmanctl} command to interact with the daemon and +configure networking." +@end deffn + @deffn {Scheme Procedure} ntp-service [#:ntp @var{ntp}] @ [#:name-service @var{%ntp-servers}] Return a service that runs the daemon from @var{ntp}, the -- cgit 1.4.1 From b8785cb944ac51c30672b7293c09311bffbb5308 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 8 May 2016 23:48:17 +0200 Subject: doc: Suggest long OpenPGP key ID. * doc/guix.texi (Binary Installation): Use long OpenPGP key ID. --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index b575faffd7..88bb0277c8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -375,7 +375,7 @@ If that command fails because you do not have the required public key, then run this command to import it: @example -$ gpg --keyserver keys.gnupg.net --recv-keys 3D9AEBB5 +$ gpg --keyserver keys.gnupg.net --recv-keys 090B11993D9AEBB5 @end example @noindent -- cgit 1.4.1 From f8476e17a70ecc7d46c746480130477b7c35306b Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Tue, 5 Apr 2016 23:39:03 +0300 Subject: emacs: Add 'guix-package-from-file' command. * emacs/guix-main.scm (register-package, packages-from-file): New procedures. (%patterns-makers): Add 'from-file' search type. * emacs/guix-messages.el (guix-messages): Add messages for it. * emacs/guix-ui-package.el (guix-package-from-file): New command. (guix-package-info-insert-location): Adjust for 'from-file' type. * doc/emacs.texi (Emacs Commands): Document it. --- doc/emacs.texi | 5 +++++ emacs/guix-main.scm | 34 ++++++++++++++++++++++++++++------ emacs/guix-messages.el | 7 +++++++ emacs/guix-ui-package.el | 33 ++++++++++++++++++++++++--------- 4 files changed, 64 insertions(+), 15 deletions(-) (limited to 'doc') diff --git a/doc/emacs.texi b/doc/emacs.texi index 575e87c262..d124eca3cb 100644 --- a/doc/emacs.texi +++ b/doc/emacs.texi @@ -166,6 +166,11 @@ Display package(s) located in the specified file. These files usually have the following form: @file{gnu/packages/emacs.scm}, but don't type them manually! Press @key{TAB} to complete the file name. +@item M-x guix-package-from-file +Display package that the code within the specified file evaluates to. +@xref{Invoking guix package, @code{--install-from-file}}, for an example +of what such a file may look like. + @item M-x guix-search-by-regexp Search for packages by a specified regexp. By default ``name'', ``synopsis'' and ``description'' of the packages will be searched. This diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 5d7df2a7f9..e645a85e7d 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -300,17 +300,26 @@ Example: ;;; Finding packages. -(define package-by-address +(define-values (package-by-address + register-package) (let ((table (delay (fold-packages (lambda (package table) (vhash-consq (object-address package) package table)) vlist-null)))) - (lambda (address) - "Return package by its object ADDRESS." - (match (vhash-assq address (force table)) - ((_ . package) package) - (_ #f))))) + (values + (lambda (address) + "Return package by its object ADDRESS." + (match (vhash-assq address (force table)) + ((_ . package) package) + (_ #f))) + (lambda (package) + "Register PACKAGE by its 'object-address', so that later +'package-by-address' can be used to access it." + (let ((table* (force table))) + (set! table + (delay (vhash-consq (object-address package) + package table*)))))))) (define packages-by-name+version (let ((table (delay (fold-packages @@ -410,6 +419,15 @@ MATCH-PARAMS is a list of parameters that REGEXP can match." '() (find-newest-available-packages))) +(define (packages-from-file file) + "Return a list of packages from FILE." + (let ((package (load (canonicalize-path file)))) + (if (package? package) + (begin + (register-package package) + (list package)) + '()))) + ;;; Making package/output patterns. @@ -662,6 +680,8 @@ ENTRIES is a list of installed manifest entries." (lookup-license license-name)))) (location-proc (lambda (_ location) (packages-by-location-file location))) + (file-proc (lambda (_ file) + (packages-from-file file))) (all-proc (lambda _ (all-available-packages))) (newest-proc (lambda _ (newest-available-packages)))) `((package @@ -672,6 +692,7 @@ ENTRIES is a list of installed manifest entries." (regexp . ,regexp-proc) (license . ,license-proc) (location . ,location-proc) + (from-file . ,file-proc) (all-available . ,all-proc) (newest-available . ,newest-proc)) (output @@ -682,6 +703,7 @@ ENTRIES is a list of installed manifest entries." (regexp . ,regexp-proc) (license . ,license-proc) (location . ,location-proc) + (from-file . ,file-proc) (all-available . ,all-proc) (newest-available . ,newest-proc))))) diff --git a/emacs/guix-messages.el b/emacs/guix-messages.el index 7ebe7e8b5c..52436af9e4 100644 --- a/emacs/guix-messages.el +++ b/emacs/guix-messages.el @@ -44,6 +44,9 @@ ,(lambda (_ entries locations) (apply #'guix-message-packages-by-location entries 'package locations))) + (from-file + (0 "No package in file '%s'." val) + (1 "Package from file '%s'." val)) (regexp (0 "No packages matching '%s'." val) (1 "A single package matching '%s'." val) @@ -80,6 +83,10 @@ ,(lambda (_ entries locations) (apply #'guix-message-packages-by-location entries 'output locations))) + (from-file + (0 "No package in file '%s'." val) + (1 "Package from file '%s'." val) + (many "Package outputs from file '%s'." val)) (regexp (0 "No package outputs matching '%s'." val) (1 "A single package output matching '%s'." val) diff --git a/emacs/guix-ui-package.el b/emacs/guix-ui-package.el index 38f0c08fc7..edc36486fc 100644 --- a/emacs/guix-ui-package.el +++ b/emacs/guix-ui-package.el @@ -393,15 +393,17 @@ formatted with this string, an action button is inserted.") (guix-format-insert nil) (let ((location-file (car (split-string location ":")))) (guix-info-insert-value-indent location 'guix-package-location) - (guix-info-insert-indent) - (guix-info-insert-action-button - "Packages" - (lambda (btn) - (guix-package-get-display (guix-ui-current-profile) - 'location - (button-get btn 'location))) - (format "Display packages from location '%s'" location-file) - 'location location-file)))) + ;; Do not show "Packages" button if a package 'from file' is displayed. + (unless (eq (guix-ui-current-search-type) 'from-file) + (guix-info-insert-indent) + (guix-info-insert-action-button + "Packages" + (lambda (btn) + (guix-package-get-display (guix-ui-current-profile) + 'location + (button-get btn 'location))) + (format "Display packages from location '%s'" location-file) + 'location location-file))))) (defun guix-package-info-insert-systems (systems entry) "Insert supported package SYSTEMS at point." @@ -1000,6 +1002,19 @@ Interactively with prefix, prompt for PROFILE." (guix-ui-read-profile))) (guix-package-get-display profile 'location location)) +;;;###autoload +(defun guix-package-from-file (file &optional profile) + "Display Guix package that the code from FILE evaluates to. +If PROFILE is nil, use `guix-current-profile'. +Interactively with prefix, prompt for PROFILE." + (interactive + (list (read-file-name "File with package: ") + (guix-ui-read-profile))) + (guix-buffer-get-display-entries + 'info 'package + (list (or profile guix-current-profile) 'from-file file) + 'add)) + ;;;###autoload (defun guix-search-by-regexp (regexp &optional params profile) "Search for Guix packages by REGEXP. -- cgit 1.4.1 From 1aaf116d3158bf822d1da1b0f17b48a064bb8dd1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 9 May 2016 23:10:27 +0200 Subject: doc: Fix typo. * doc/guix.texi (Base Services): "gpm-service", not "gmp-service-type". --- doc/guix.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 88bb0277c8..0e63ecadfd 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7331,7 +7331,7 @@ See @code{man loadkeys} for details. @end deffn -@deffn {Scheme Procedure} gpm-service-type [#:gpm @var{gpm}] @ +@deffn {Scheme Procedure} gpm-service [#:gpm @var{gpm}] @ [#:options] Run @var{gpm}, the general-purpose mouse daemon, with the given command-line @var{options}. GPM allows users to use the mouse in the console, -- cgit 1.4.1