From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 2FjkHLOut2X3XgEAe85BDQ:P1 (envelope-from ) for ; Mon, 29 Jan 2024 14:57:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2FjkHLOut2X3XgEAe85BDQ (envelope-from ) for ; Mon, 29 Jan 2024 14:57:07 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=HwkXoqFP; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706536627; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rC8XRiGY4pSyKkxQ0tjDZaDMn4PZgDVNKG/AuM0DD/k=; b=B6E1MuIOyZoY6poousEcS2m3DdaMhN6wf93/5n9icK/q5AAaMFceZ2sBdAySO9UJ+CnxHh e+WqpOsBFORPeCvn3chyjgSTfzqblibYxpuoQrB2oiNwjgs3fVb4HMjH6JHziRVeAk59YX A8MU/eePxvjL0LjpY8QQsjTPkwQp26Nxf2nQ+kZcviUbLfOb3qvmAwQzrThmlvhOdfEC+M z/luTHUaq307Jye7gDmw/PETwLeoVkvsRRhUEARRtDzNTq5TxnArEYKs/dV0NwVtLfxVv6 shDBQ8r+fRHEVF4t1uomeqU9S65eEGzTxjjgN9zD2RM3ZB+wxCwf7yU3UWMLyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=sarg.org.ru header.s=google header.b=HwkXoqFP; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706536627; a=rsa-sha256; cv=none; b=ArXIKWJbW76EWmZ7wYfC1euhnIWGaoHqhFuBMBJoobgLQYNZ17faZdxSW8rPPlu3MvBmuQ klQwMM4oSJQ/j568GMlDxzkJW1WcGvK4/lAP73Qm/hgwE/vcoCyma4rtxVlkBwMB+WcMa6 K7AwQ3+BimDJxxDWqTxXspqvZ6nPoFnEGoQH8HGz9Ud7K5kwZJGzBjIY1sOvAH+3kJmrn1 pIvW1ZSv4PqvCuNv9hOQCWTgNvEKQDPDeFyM/vw8moy7Pu2nGnYvo/yEFg7jfOKHfrhuUI TY76IL1wamRkaAMa+IkBenmmhpjawA559/rcCvYIf9eADoU6VOfCDTMTmMa0Ew== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4D3E03835B for ; Mon, 29 Jan 2024 14:57:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUS89-0007Yd-5b; Mon, 29 Jan 2024 08:56:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUS86-0007YM-5e for guix-patches@gnu.org; Mon, 29 Jan 2024 08:56:54 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUS85-00061c-Tf for guix-patches@gnu.org; Mon, 29 Jan 2024 08:56:53 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rUS8D-0007J7-M5 for guix-patches@gnu.org; Mon, 29 Jan 2024 08:57:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60521] [PATCH] home: Add home-stow-migration-service. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 29 Jan 2024 13:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60521 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: moreinfo patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Giacomo Leidi , andrew@trop.in, 60521@debbugs.gnu.org Received: via spool by 60521-submit@debbugs.gnu.org id=B60521.170653658028035 (code B ref 60521); Mon, 29 Jan 2024 13:57:01 +0000 Received: (at 60521) by debbugs.gnu.org; 29 Jan 2024 13:56:20 +0000 Received: from localhost ([127.0.0.1]:59334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUS7Y-0007I7-Dv for submit@debbugs.gnu.org; Mon, 29 Jan 2024 08:56:20 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:54276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUS7V-0007Hq-DY for 60521@debbugs.gnu.org; Mon, 29 Jan 2024 08:56:19 -0500 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a35e65df2d8so69085266b.0 for <60521@debbugs.gnu.org>; Mon, 29 Jan 2024 05:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1706536563; x=1707141363; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=rC8XRiGY4pSyKkxQ0tjDZaDMn4PZgDVNKG/AuM0DD/k=; b=HwkXoqFPLq9n1aTjcYNUKJJ7ssX9IUI+eFb5nuXwka02fvunWCciSSFasQDxPUs11K mCHYDUL6u5LGHrWvK2dXYfJU+Clz3FTKbqadpUewG/XypE88gI33xqeopHgI7LO/+1ni /oUPShsrDtB+VJnbH+lTJ6EhsCYN6oQsvzA04= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706536563; x=1707141363; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=rC8XRiGY4pSyKkxQ0tjDZaDMn4PZgDVNKG/AuM0DD/k=; b=N99ch9xI1296gNvuebsmECBJERpu0wRuf7e/vvPXXO60X5FGXIsXn4eI/He89cd8vY 4IGmefQBAZj1hQbJTHe66C1Qxma5o016QH3n9dZzZ8A3faXloCwTplAMWjtjgHsA1ZbK 0zFPKZGjp8fiE9TARfGDPqC/EZPiIOSgAiM2SnNfI4ONdTIQ/McfQERyrCquMbK7K9s9 ANLqkrnZ9aQ+tg8uPqkV0U11bZrAQvB7ZDw56DPixwr5qF1VIiQV+pBYEbh4hHA9yXwb zhkdXdDAiTetUDKtjN+SFuRRB/OAXEthJQo5rX03KYM6NqJwkokiFCbT5ipCL1wR4fNw Gesg== X-Gm-Message-State: AOJu0YwSruSDD32qr+HJnPlbhYmStmyTGc2j6klulXXHVKWqOh05OxxV sWXoSD8l/O8O6AfqgE1jinp7EDQaKS/qQJkthNKcEw/yFXQkubWKsqFhtFAdvWA= X-Google-Smtp-Source: AGHT+IGMAUP39DejBh05yLSqf18RCmwMnioP6A567LW2mCWsRYl3W+O2zvWJLCfUcdkPcGoybyz4sQ== X-Received: by 2002:a17:906:6d44:b0:a35:4664:8830 with SMTP id a4-20020a1709066d4400b00a3546648830mr4063552ejt.0.1706536562673; Mon, 29 Jan 2024 05:56:02 -0800 (PST) Received: from localhost ([2a02:2454:a09d:d000:3f1e:a87:ccd2:4aec]) by smtp.gmail.com with ESMTPSA id ss6-20020a170907c00600b00a3535b76c42sm3009317ejc.15.2024.01.29.05.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 05:56:02 -0800 (PST) References: <87ede27c9f.fsf@sarg.org.ru> <87a5ooqnsl.fsf@gnu.org> User-agent: mu4e 1.10.8; emacs 29.1 From: Sergey Trofimov Date: Mon, 29 Jan 2024 14:40:29 +0100 In-reply-to: <87a5ooqnsl.fsf@gnu.org> Message-ID: <878r48451r.fsf@sarg.org.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.16 X-Spam-Score: -1.16 X-Migadu-Queue-Id: 4D3E03835B X-Migadu-Scanner: mx12.migadu.com X-TUID: 2p3pS8wLKtuw Ludovic Courtès writes: > Sergey Trofimov 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?