emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49549: closed ([PATCH v2 4/4] home-services: Add fold-home-service-t


From: GNU bug Tracking System
Subject: bug#49549: closed ([PATCH v2 4/4] home-services: Add fold-home-service-types function)
Date: Tue, 24 Aug 2021 12:15:03 +0000

Your message dated Tue, 24 Aug 2021 15:14:25 +0300
with message-id <87h7ffujj2.fsf@gmail.com>
and subject line Re: bug#49419: [PATCH 0/4] Essential home services
has caused the debbugs.gnu.org bug report #49419,
regarding [PATCH v2 4/4] home-services: Add fold-home-service-types function
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
49419: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49419
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH v2 4/4] home-services: Add fold-home-service-types function Date: Mon, 5 Jul 2021 18:41:45 +0300
* gnu/home-services.scm (parent-directory, %guix-home-root-directory,
%service-type-path, all-home-service-modules, fold-home-service-types): New
variables.
---
 gnu/home-services.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index ffcee22bb8..78e5603edf 100644
--- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -444,3 +444,29 @@ environment, and its configuration file, when 
available.")))
 
 (define sexp->home-provenance sexp->system-provenance)
 (define home-provenance system-provenance)
+
+
+;;;
+;;; Searching
+;;;
+
+(define (parent-directory directory)
+  "Get the parent directory of DIRECTORY"
+  (string-join (drop-right (string-split directory #\/) 1) "/"))
+
+(define %guix-home-root-directory
+  ;; Absolute file name of the module hierarchy.
+  (parent-directory (dirname (search-path %load-path 
"gnu/home-services.scm"))))
+
+(define %service-type-path
+  ;; Search path for service types.
+  (make-parameter `((,%guix-home-root-directory . "gnu/home-services"))))
+
+(define (all-home-service-modules)
+  "Return the default set of home-service modules."
+  (cons (resolve-interface '(gnu home-services))
+        (all-modules (%service-type-path)
+                     #:warn warn-about-load-error)))
+
+(define* (fold-home-service-types proc seed)
+  (fold-service-types proc seed (all-home-service-modules)))
-- 
2.32.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#49419: [PATCH 0/4] Essential home services Date: Tue, 24 Aug 2021 15:14:25 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Andrew Tropin <andrew@trop.in> writes:

[…]

>> As Ludovic suggested, we could move modules to another namespace for
>> code sharing, but it is not a blocker from merging changes and we could
>> do it later when we need to share the code.  I think we should go
>> forward and push to the master.  WDYT?
>
> Yep, let's postpone moving modules to another namespace until it will be
> needed. Later, when the necessity appears, we will decide how to better
> organize the code.
>
> We can push it to master, but I planned to keep it in wip-guix-home for
> a while to bring all related stuff like documentation and cli to the
> branch and merge it to the master after everything is complete.
>
> Also, merging only part of Guix Home to the master will arise conflicts
> for users of rde channel (which contains current implementation of Guix
> Home).  However, it is solvable by removing already merged parts from
> rde repository, so, it's not a big deal and I'm fine with both merging
> options.

OK, pushed to the wip-guix-home.

https://git.savannah.gnu.org/cgit/guix.git/?h=wip-guix-home

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]