diff options
author | Mark H Weaver <mhw@netris.org> | 2016-01-19 00:18:37 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2016-01-19 00:18:37 -0500 |
commit | afe9f409491a055e5d058c8f747e80d1506391e5 (patch) | |
tree | 3b3747c9d2df32019a46b283b94f0a7af05ebf1d /emacs/guix-base.el | |
parent | bb8afbf5a1fbc85f700c0e07ce5581637e3674dc (diff) | |
parent | 1348185ac2bb48b373495830267cff8ddc6b1fa5 (diff) | |
download | patches-afe9f409491a055e5d058c8f747e80d1506391e5.tar patches-afe9f409491a055e5d058c8f747e80d1506391e5.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'emacs/guix-base.el')
-rw-r--r-- | emacs/guix-base.el | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/emacs/guix-base.el b/emacs/guix-base.el index dae658ebfa..d720a87833 100644 --- a/emacs/guix-base.el +++ b/emacs/guix-base.el @@ -1,6 +1,6 @@ ;;; guix-base.el --- Common definitions -*- lexical-binding: t -*- -;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com> +;; Copyright © 2014, 2015, 2016 Alex Kost <alezost@gmail.com> ;; This file is part of GNU Guix. @@ -91,14 +91,25 @@ For the meaning of location, see `guix-find-location'." "Return the file name of a PROFILE's GENERATION." (format "%s-%s-link" profile generation)) -(defun guix-manifest-file (profile &optional generation) +(defun guix-packages-profile (profile &optional generation system?) + "Return a directory where packages are installed for the +PROFILE's GENERATION. + +If SYSTEM? is non-nil, then PROFILE is considered to be a system +profile. Unlike usual profiles, for a system profile, packages +are placed in 'profile' subdirectory." + (let ((profile (if generation + (guix-generation-file profile generation) + profile))) + (if system? + (expand-file-name "profile" profile) + profile))) + +(defun guix-manifest-file (profile &optional generation system?) "Return the file name of a PROFILE's manifest. -If GENERATION number is specified, return manifest file name for -this generation." +See `guix-packages-profile'." (expand-file-name "manifest" - (if generation - (guix-generation-file profile generation) - profile))) + (guix-packages-profile profile generation system?))) ;;;###autoload (defun guix-edit (id-or-name) |