all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergey Trofimov <sarg@sarg.org.ru>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Giacomo Leidi <goodoldpaul@autistici.org>,
	andrew@trop.in, 60521@debbugs.gnu.org
Subject: [bug#60521] [PATCH] home: Add home-stow-migration-service.
Date: Mon, 29 Jan 2024 14:40:29 +0100	[thread overview]
Message-ID: <878r48451r.fsf@sarg.org.ru> (raw)
In-Reply-To: <87a5ooqnsl.fsf@gnu.org>


Ludovic Courtès <ludo@gnu.org> writes:

> Sergey Trofimov <sarg@sarg.org.ru> skribis:
>
>> (define* (as-local-files dir #:optional (trim-prefix dir))
>>   (let ((absolute-dir (string-append (getcwd) "/" dir))
>>         (to-trim (string-append (getcwd) "/" trim-prefix "/")))
>>     (map (lambda (fn)
>>            (list
>>             (del-prefix to-trim fn)
>>             (local-file (canonicalize-path fn) (del-prefix "."
>>             (basename fn)) #:recursive? #t)))
>>          (find-files absolute-dir))))
>
> As you saw, I proposed a different solution: capturing
> (current-source-directory) in ‘home-dotfiles-configuration’ and 
> using
> that to compute absolute file names (without ever calling
> ‘canonicalize-path’).
>
> Using ‘getcwd’ would be incorrect or at least surprising: it 
> would
> resolve file names relative to the current directory instead of 
> relative
> to the directory that contains the source file.
>

Sure, in my config I use `with-directory-excursion`, so `getcwd` 
returns correct values.

Anyway, the reason I replied was that I am also a former Stow user 
and in my eyes we should've extended existing 
`home-files-service-type` instead of making a specialized new one. 
If you check `stow` manual 
(https://www.gnu.org/software/stow/manual/html_node/Invoking-Stow.html#Invoking-Stow), 
it should be invoked with the names of packages to be 
installed/removed. `home-dotfiles-service` doesn't have a 
parameter for the list of packages and assumes that everything in 
the specified directory should be installed, a limitation that 
prevents me to start using it. In my dotfiles I have optional 
packages which I install depending on OS or machine's purpose. 
Sure the service could be amended with the said parameter, but why 
adding a new service when a more generic one exists and is fitting 
the use case?




  reply	other threads:[~2024-01-29 13:57 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 16:51 [bug#60521] [PATCH] home: Add home-stow-migration-service goodoldpaul--- via Guix-patches via
2023-01-03 16:55 ` Giacomo Leidi via Guix-patches via
2023-01-17 13:09   ` Ludovic Courtès
2023-01-17 15:21     ` Andrew Tropin
2023-01-23 10:23       ` Ludovic Courtès
2023-01-25  6:32         ` Andrew Tropin
2023-01-17 17:09   ` Bruno Victal
2023-02-12 17:36 ` goodoldpaul--- via Guix-patches via
2023-04-12 20:31   ` goodoldpaul--- via Guix-patches via
2023-02-12 17:36 ` [bug#60521] [v2] home: Add home-dotfiles-service Giacomo Leidi via Guix-patches via
2023-04-12 20:32 ` [bug#60521] [v3] " Giacomo Leidi via Guix-patches via
2023-04-24 20:33   ` [bug#60521] [PATCH] home: Add home-stow-migration-service Ludovic Courtès
2023-06-24 15:47 ` paul via Guix-patches via
2023-08-26  9:34   ` goodoldpaul--- via Guix-patches via
2023-09-22 12:59     ` paul via Guix-patches via
2023-06-24 16:01 ` [bug#60521] [PATCH-v4] home: Add home-dotfiles-service Giacomo Leidi via Guix-patches via
2023-08-26  9:39 ` Giacomo Leidi via Guix-patches via
2023-09-22 13:01 ` [bug#60521] [PATCH] " Giacomo Leidi via Guix-patches via
2023-10-02  2:19 ` [bug#60521] Nicolas Odermatt-Lemay
2023-10-06 21:17 ` [bug#60521] [PATCH] home: Add home-dotfiles-service paul via Guix-patches via
2023-10-06 21:22 ` Giacomo Leidi via Guix-patches via
2023-10-29 12:58 ` [bug#60521] [60521] Add home-dotfiles-service-type - Rebased on master paul via Guix-patches via
2024-01-21 17:06   ` paul via Guix-patches via
2024-01-22  0:16     ` [bug#60521] " tumashu
2024-01-22  8:12       ` Giacomo via Guix-patches via
2024-01-22 12:36     ` [bug#60521] " Feng Shu
2024-01-22 16:45       ` paul via Guix-patches via
2024-01-23 12:14         ` Feng Shu
2024-01-24 11:58     ` Feng Shu
2024-01-26 17:47       ` paul via Guix-patches via
2024-01-27  2:54         ` Feng Shu
2024-01-21 17:07   ` paul via Guix-patches via
2023-10-29 12:59 ` [bug#60521] [PATCH v4] home: Add home-dotfiles-service Giacomo Leidi via Guix-patches via
2023-11-06  0:55 ` [bug#60521] [PATCH] home: Add home-stow-migration-service Feng Shu
2023-11-07  8:58 ` Feng Shu
2023-11-09  0:59 ` Feng Shu
2024-01-21 17:08 ` [bug#60521] [PATCH v5] home: Add home-dotfiles-service Giacomo Leidi via Guix-patches via
2024-01-26 17:48 ` [bug#60521] [PATCH v6] " Giacomo Leidi via Guix-patches via
2024-01-27 22:56   ` Ludovic Courtès
2024-01-28 15:36     ` paul via Guix-patches via
2024-01-27 20:21 ` [bug#60521] [PATCH] home: Add home-stow-migration-service Sergey Trofimov
2024-01-27 20:21 ` Sergey Trofimov
2024-01-29 13:20   ` Ludovic Courtès
2024-01-29 13:40     ` Sergey Trofimov [this message]
2024-01-29 14:23       ` Giacomo via Guix-patches via
2024-01-29 15:19         ` Sergey Trofimov
2024-01-29 16:09           ` Giacomo via Guix-patches via
2024-01-29 18:34             ` Sergey Trofimov
2024-02-07 22:17         ` [bug#60521] Dot file layout for ‘home-dotfiles-service’ Ludovic Courtès
2024-02-09  0:44           ` paul via Guix-patches via
2024-02-09  0:45             ` paul via Guix-patches via
2024-02-10 10:03             ` Ludovic Courtès
2024-02-10 10:47               ` Janneke Nieuwenhuizen
2024-01-29 16:10       ` [bug#60521] [PATCH] home: Add home-stow-migration-service Ludovic Courtès
2024-01-28 15:37 ` [bug#60521] [PATCH v7] home: Add home-dotfiles-service Giacomo Leidi via Guix-patches via
2024-01-28 21:02   ` bug#60521: " Ludovic Courtès
2024-01-28 21:14     ` [bug#60521] " paul via Guix-patches via
2024-01-28 21:22       ` paul via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878r48451r.fsf@sarg.org.ru \
    --to=sarg@sarg.org.ru \
    --cc=60521@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=goodoldpaul@autistici.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.