me
/
guix
Archived
1
0
Fork 0

guix home: import: Delete duplicate modules when importing.

Two different services might require the same module(s), so delete duplicates
when generating the ‘use-modules’ form.

* import.scm (manifest->code): Delete duplicate modules.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Xinglu Chen 2021-10-30 12:42:37 +02:00 committed by Ludovic Courtès
parent e12e8aad35
commit 256bd71264
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 2 deletions

View File

@ -145,7 +145,8 @@ available."
(use-modules (gnu home) (use-modules (gnu home)
(gnu packages) (gnu packages)
(gnu services) (gnu services)
,@(concatenate (map cdr configurations+modules))) ,@((compose delete-duplicates concatenate)
(map cdr configurations+modules)))
,(home-environment-template ,(home-environment-template
#:specs specs #:specs specs
#:services (map first configurations+modules)))) #:services (map first configurations+modules))))
@ -190,7 +191,8 @@ available."
(gnu home) (gnu home)
(gnu packages) (gnu packages)
(gnu services) (gnu services)
,@(concatenate (map cdr configurations+modules))) ,@((compose delete-duplicates concatenate)
(map cdr configurations+modules)))
,@transformations ,@transformations