From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fI8p0-0005T8-E2 for guix-patches@gnu.org; Mon, 14 May 2018 04:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fI8ox-0003VO-A5 for guix-patches@gnu.org; Mon, 14 May 2018 04:27:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fI8ox-0003VC-5b for guix-patches@gnu.org; Mon, 14 May 2018 04:27:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fI8ow-0007bh-8O for guix-patches@gnu.org; Mon, 14 May 2018 04:27:02 -0400 Subject: [bug#31442] [PATCH 3/5] profiles: Add 'properties' field to manifest entries. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 14 May 2018 10:25:48 +0200 Message-Id: <20180514082550.1131-3-ludo@gnu.org> In-Reply-To: <20180514082550.1131-1-ludo@gnu.org> References: <20180514082550.1131-1-ludo@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31442@debbugs.gnu.org * guix/profiles.scm ()[properties]: New field. (manifest->gexp)[entry->gexp]: Serialize it. (sexp->manifest)[sexp->manifest-entry]: Deserialize it. --- guix/profiles.scm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 3cdc3d2f1..02828e465 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -78,6 +78,7 @@ manifest-entry-dependencies manifest-entry-search-paths manifest-entry-parent + manifest-entry-properties manifest-pattern manifest-pattern? @@ -181,7 +182,9 @@ (search-paths manifest-entry-search-paths ; search-path-specification* (default '())) (parent manifest-entry-parent ; promise (#f | ) - (default (delay #f)))) + (default (delay #f))) + (properties manifest-entry-properties ; list of symbol/value pairs + (default '()))) (define-record-type* manifest-pattern make-manifest-pattern @@ -320,18 +323,20 @@ denoting a specific output of a package." (define (entry->gexp entry) (match entry (($ name version output (? string? path) - (deps ...) (search-paths ...)) + (deps ...) (search-paths ...) _ (properties ...)) #~(#$name #$version #$output #$path (propagated-inputs #$(map entry->gexp deps)) (search-paths #$(map search-path-specification->sexp - search-paths)))) + search-paths)) + (properties . #$properties))) (($ name version output package - (deps ...) (search-paths ...)) + (deps ...) (search-paths ...) _ (properties ...)) #~(#$name #$version #$output (ungexp package (or output "out")) (propagated-inputs #$(map entry->gexp deps)) (search-paths #$(map search-path-specification->sexp - search-paths)))))) + search-paths)) + (properties . #$properties))))) (match manifest (($ (entries ...)) @@ -394,7 +399,9 @@ procedure is here for backward-compatibility and will eventually vanish." (dependencies deps*) (search-paths (map sexp->search-path-specification search-paths)) - (parent parent)))) + (parent parent) + (properties (or (assoc-ref extra-stuff 'properties) + '()))))) entry)))) (match sexp -- 2.17.0