From 2df17bd0eeed1e29e64cf21ecec61413af19ba65 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Mon, 4 Jan 2016 19:11:30 +0300 Subject: emacs: Find packages in system profiles. For a usual profile, packages are placed in a profile directory itself, but for a system profile, packages are placed in 'profile' sub-directory. So we need to do some special cases for system profiles to find packages there as well. * emacs/guix-base.el (guix-packages-profile): New procedure. (guix-manifest-file): Use it. Add optional 'system?' argument. * emacs/guix-ui-generation.el (guix-system-generation?) (guix-generation-current-packages-profile): New procedures. (guix-generation-packages, guix-generation-insert-packages): Remove 'generation' argument. (guix-generation-packages-buffer): Add optional 'system?' argument. (guix-profile-generation-manifest-file) (guix-profile-generation-packages-buffer): Adjust accordingly. * emacs/guix-main.scm (generation-package-specifications+paths): Rename to... (profile->specifications+paths): ... this. Use a single 'profile' argument. --- emacs/guix-main.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'emacs/guix-main.scm') diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 8c38e7cae3..5460c9686e 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015 Alex Kost +;;; Copyright © 2014, 2015, 2016 Alex Kost ;;; ;;; This file is part of GNU Guix. ;;; @@ -144,11 +144,10 @@ return two values: name and version. For example, for SPEC (manifest-entries->package-specifications (manifest-entries manifest)))) -(define (generation-package-specifications+paths profile number) - "Return a list of package specifications and paths for generation NUMBER. +(define (profile->specifications+paths profile) + "Return a list of package specifications and paths for PROFILE. Each element of the list is a list of the package specification and its path." - (let ((manifest (profile-manifest - (generation-file-name profile number)))) + (let ((manifest (profile-manifest profile))) (map (lambda (entry) (list (manifest-entry->package-specification entry) (manifest-entry-item entry))) -- cgit v1.2.3