[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50873] [PATCH 4/5] guix home: import: Delete duplicate modules when
From: |
Xinglu Chen |
Subject: |
[bug#50873] [PATCH 4/5] guix home: import: Delete duplicate modules when importing. |
Date: |
Tue, 28 Sep 2021 19:36:00 +0200 |
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.
---
guix/scripts/home/import.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm
index 6d9ca98f28..5ba99378af 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -149,7 +149,8 @@ (define (qualified-name entry)
`(begin
(use-modules (gnu home)
(gnu packages)
- ,@(concatenate (map cdr configurations+modules)))
+ ,@((compose delete-duplicates concatenate)
+ (map cdr configurations+modules)))
,(home-environment-template
#:specs specs
#:services (map first configurations+modules))))
@@ -192,7 +193,8 @@ (define name
(use-modules (guix transformations)
(gnu home)
(gnu packages)
- ,@(concatenate (map cdr configurations+modules)))
+ ,@((compose delete-duplicates concatenate)
+ (map cdr configurations+modules)))
,@transformations
--
2.33.0
- [bug#50873] [PATCH 0/5] Fixes to ‘guix home import’, Xinglu Chen, 2021/09/28
- [bug#50873] [PATCH 1/5] guix home: import: Make the user to specify a destination directory., Xinglu Chen, 2021/09/28
- [bug#50873] [PATCH 4/5] guix home: import: Delete duplicate modules when importing.,
Xinglu Chen <=
- [bug#50873] [PATCH 2/5] guix home: import: Allow multiple modules to be imported for each service., Xinglu Chen, 2021/09/28
- [bug#50873] [PATCH 3/5] guix home: import: Fix module name for Bash service., Xinglu Chen, 2021/09/28
- [bug#50873] [PATCH 5/5] doc: Document the ‘guix home import’ subcommand., Xinglu Chen, 2021/09/28
- [bug#50873] [PATCH 0/2] Add pn., Antero Mejr, 2021/09/28