[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50873] [PATCH 5/7] guix home: import: Delete duplicate modules when
From: |
Xinglu Chen |
Subject: |
[bug#50873] [PATCH 5/7] guix home: import: Delete duplicate modules when importing. |
Date: |
Sun, 10 Oct 2021 12:20:33 +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 21f762f239..b892ae3dfa 100644
--- a/guix/scripts/home/import.scm
+++ b/guix/scripts/home/import.scm
@@ -145,7 +145,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))))
@@ -188,7 +189,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 7/7] Add tests for ‘guix home import’., (continued)
[bug#50873] [PATCH 3/7] guix home: import: Fix module name for Bash service., Xinglu Chen, 2021/10/10
[bug#50873] [PATCH 2/7] guix home: import: Allow multiple modules to be imported for each service., Xinglu Chen, 2021/10/10
[bug#50873] [PATCH 4/7] guix home: import: Don’t use 'slurp-file-gexp'., Xinglu Chen, 2021/10/10
[bug#50873] [PATCH 6/7] doc: Document the ‘guix home import’ subcommand., Xinglu Chen, 2021/10/10
[bug#50873] [PATCH 5/7] guix home: import: Delete duplicate modules when importing.,
Xinglu Chen <=
[bug#50873] [PATCH v3 0/8] Fixes to ‘guix home import’, Xinglu Chen, 2021/10/30
- [bug#50873] [PATCH v3 1/8] guix home: import: Make the user to specify a destination directory., Xinglu Chen, 2021/10/30
- [bug#50873] [PATCH v3 6/8] doc: Document the ‘guix home import’ subcommand., Xinglu Chen, 2021/10/30
- [bug#50873] [PATCH v3 4/8] guix home: import: Don’t use 'slurp-file-gexp'., Xinglu Chen, 2021/10/30
- [bug#50873] [PATCH v3 2/8] guix home: import: Allow multiple modules to be imported for each service., Xinglu Chen, 2021/10/30
- [bug#50873] [PATCH v3 3/8] guix home: import: Fix module name for Bash service., Xinglu Chen, 2021/10/30
- [bug#50873] [PATCH v3 7/8] Add tests for ‘guix home import’., Xinglu Chen, 2021/10/30
- [bug#50873] [PATCH v3 5/8] guix home: import: Delete duplicate modules when importing., Xinglu Chen, 2021/10/30