From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aDc6CNoKx2abVQAA62LTzQ:P1 (envelope-from ) for ; Thu, 22 Aug 2024 09:54:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id aDc6CNoKx2abVQAA62LTzQ (envelope-from ) for ; Thu, 22 Aug 2024 11:54:34 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gob1FEbN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724320473; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=RNOP/1D8ncViqU2pBG4or/5CKHrvrawrHx5OmJZHYR4=; b=GN6Rzg96KtLK7RRai9ieOI6piYmBDrj8cnVA2JHOL7491EBXLOVzpDo1aXOjHS1WvKNvFn LfFKx6SPOtZ+8FN0iwr9E7GQkteheBTFGhkXtMalUIcIjzuFJKkOKHbUuipZqVbjnewseC eQDK10GRW/QErXEJHEVN24EDVfTbUaH48uVzQOwY4PBVW1i1OUO6GUEIglSyJgqxlV+6fQ no5pfMl18fwOi8wU/WanQSMuYNoL3Uq8GMTvlF/w8fXEAsqWjqPkDo7rvIYPVM5c6ecjM4 nrscc2o6LWPODB7/dT6NQOH4yX75H2u+1+7kk4OcCqxCITDmsNi4vWQU+DeHig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724320473; a=rsa-sha256; cv=none; b=XbWniUeYCZ6A56KYHw3x1eJ8QpO1SixCXHPTl00hknJsOdNGTMvihuGsiUKmsqAGaOTs2o n5EeKAbz9vXyl3qKggvfF44ycP9zHI4TI9j4QQudVMUuJqmjgw58X81DDlDBceahCWgHAs jZxVRYjDj/E+7vPoC7Fr9/XqJ3A+F3eMXuuVGlZ3j4V7ag0y80EUIJ00d+8LA4QZUxWFKY mT4fCwOgrgHPBvHLv2qYTCopRWQF49B1jmE8jm7OTZx+HwDPi15JCWX8uEa/dVBV7zvvbB NEGgm4wIZ/eE92iGbGFnc3kaGVbxKhMu72bv0LWVtU2WQ1dq6AUJNceSq8sOig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gob1FEbN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" 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 CE96162FCF for ; Thu, 22 Aug 2024 11:54:33 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sh4W8-0002yH-6v; Thu, 22 Aug 2024 05:54:08 -0400 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 1sh4W4-0002ov-N7 for guix-devel@gnu.org; Thu, 22 Aug 2024 05:54:04 -0400 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sh4W3-0002G6-0R for guix-devel@gnu.org; Thu, 22 Aug 2024 05:54:04 -0400 Received: by mail-qt1-x843.google.com with SMTP id d75a77b69052e-454b25f88ccso3540231cf.0 for ; Thu, 22 Aug 2024 02:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724320441; x=1724925241; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RNOP/1D8ncViqU2pBG4or/5CKHrvrawrHx5OmJZHYR4=; b=gob1FEbN2zu7Fkq7xORS+vAZYBv0RyJIprl8C/isFt3IXfFIjKi52vDboyZZQFYEDr UDtWOa6KR35EU7TMAgyS2jjJf60T3l/xi1F7QO9OuluOfyElG5UX0PcrfIQEhIUxMp/t 4cemQR6kkdW7s2zlsq4teZd6Sc9Vqc3NenTfoHaydnEgjZibDQbXLlKhBARpmKyBobo8 wIpbG3SVVttOmLGp/Mp7mDachnXS8H7R1tsuT9rE1IOsE9j6JDz/PRdQ/y1cacsHy6Vj sp2Vq8FLTngix4o/VxFif2QjSnWBVpxgCfIrR2lTLbKcqIGLEdH4HhTfPDSTJqObhQ5U 8KyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724320441; x=1724925241; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RNOP/1D8ncViqU2pBG4or/5CKHrvrawrHx5OmJZHYR4=; b=QtfyUN3GiUjZOGalynwh32fKBPSg/j32w80hzQGiY6shDg84/kVcPDONcb+e2uQf+q tyZP0rMjcpCJXizVjDuzGVeU4TUEa8zB/w8QEZMar4tPYThEqU7+Yehw+H5DS3qi1EVK mXlP0rA+FYea3ZcoxIJ0Vhzf8OQeRVgzqAyA0LXOlfRVmzOrEveu9GPlzE9MubDMF7hH ibpqlO8cbQkFf/OZp8iA4kRL6bRRxJ30P8TO5lyl+8E0sLZGEkxYuUEt6mGhof/0tZZc 4rXbnbrVpElFLBdk5FsGYZY/ntwYZYJdS0j4ABPHhP+rkiVJ9Ah7bc1c4mLMEwoldMVD 7sMg== X-Forwarded-Encrypted: i=1; AJvYcCU1z9HN0Fxdko1QgfaB7u84URNSWouCz/36sHVpH6/eEucMzTB4JncKzMS1QY368ZVI50tlCzde1eqv@gnu.org X-Gm-Message-State: AOJu0YxwQjQ1Q06cjhfzckV01aFQeqf1kbbWOmatLA7/UJXcWHKPsaS4 yp4YpEpvqOqTyGnTRkc2yN194yY3/WB3d791QarWI/nrJuNWJXvRZX37xjtx X-Google-Smtp-Source: AGHT+IFty1cEQLa1icnQDFl2YPe+7hzAAHTEnsJNgJ8z2qKxAsf54liG13JHEtistgzivf4YnbIB0w== X-Received: by 2002:a05:622a:408a:b0:444:e9b9:709f with SMTP id d75a77b69052e-454f21f5721mr66887731cf.19.1724320441253; Thu, 22 Aug 2024 02:54:01 -0700 (PDT) Received: from [127.0.0.1] ([188.168.201.151]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-454fe1b88ebsm4929751cf.84.2024.08.22.02.53.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Aug 2024 02:54:00 -0700 (PDT) Message-ID: <26f24821-13e6-4afe-82a4-57cf60bf2064@gmail.com> Date: Thu, 22 Aug 2024 14:53:57 +0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cookbook recipe from "The Repository as a Channel" section does not work for Guix with properly configured GUILE_LOAD_PATH To: "pelzflorian (Florian Pelz)" Cc: Attila Lendvai , guix-devel@gnu.org References: <63d4684d-7e8e-437b-91f5-ce20607ab882@gmail.com> <87ed6sebdp.fsf@pelzflorian.de> <4d2eb8d0-1bed-429d-a99e-a1ea182dec1c@gmail.com> <87ttfotjw1.fsf@pelzflorian.de> <87cymbyv57.fsf@pelzflorian.de> <87y14yq4wm.fsf@pelzflorian.de> <6fe218cd-2995-4d46-ba5f-3e262b730faf@gmail.com> <87sev1qzxm.fsf@pelzflorian.de> <8e565865-b601-46df-a4ce-2635f24151ff@gmail.com> <87ttfgwbvk.fsf@pelzflorian.de> <07bd739e-2444-46e3-beda-ff853b34f2cd@gmail.com> <87bk1np2a5.fsf@pelzflorian.de> <87bk1l88sx.fsf@pelzflorian.de> Content-Language: en-US From: Nigko Yerden In-Reply-To: <87bk1l88sx.fsf@pelzflorian.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::843; envelope-from=nigko.yerden@gmail.com; helo=mail-qt1-x843.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.78 X-Spam-Score: -5.78 X-Migadu-Queue-Id: CE96162FCF X-Migadu-Scanner: mx11.migadu.com X-TUID: +6T+NYcHB15O Hello Florian, I am sure you have nothing to apologize for. I have been thinking about your suggestion to submit `absolute-dirname' patch. In the Guix manual at the end of the section 6.7 Creating a channel [1] there is the following statement about Guix policy on changing API, not to mention ABI: "We, Guix developers, never change APIs gratuitously, but we do not commit to freezing APIs either. When you maintain package definitions outside Guix, we consider that the compatibility burden is on you." So it is okay to change the behavior of some procedures if it will improve Guix. But does changing the 'current-source-directory' to follow symlinks improve Guix? This change would adjust Guix in accordance with the documentation... What? Sounds very wrong. Should be the other way round, shouldn't it? Maybe this change would make Guix API more powerful and convenient? I assume that generally there is a practical necessity in determining current source directory both with and without following symlinks, 50/50. If I need to follow symlinks I still may use 'current-source-directory' not following symlinks this way: (dirname (canonicalize-path (string-append (current-source-directory) (current-filename)))) But what should I do if I need not to follow symlinks and 'current-source-directory' follows symlinks. There is no simple way. pelzflorian (Florian Pelz) wrote: > Would you send a patch doing implementing another option to > guix-patches? However, I would ask of you to send a patch to > guix-patches first and not to guile, since guile takes longer and > guix-patches would in my hope get others’ opinions involved. Yes, I could. I wonder which alternative should I implement? One, discussed earlier, adds an intermediate directory to the channel relative path in the repository. This is simple, but somewhat limited solution. Also changing directory structure may require additional (and undesirable) modifications to other files in guile repository. Thanks to Attila there is another variant [2] which leaves the directory structure intact: (define checkout-dir ;; search %load-path for module filename, ;; follow symlink and return checkout directory (string-append (dirname (canonicalize-path (search-path %load-path (module-filename (current-module))))) "/../..")) (define vcs-file? ;; Return true if the given file is under version control. (or (git-predicate checkout-dir) (const #t))) (define-public guile (package ... (source (local-file checkout-dir "guile-checkout" #:recursive? #t #:select? vcs-file?)) What do you think? Regards, Nigko [1] https://guix.gnu.org/en/manual/devel/en/html_node/Creating-a-Channel.html [2] https://gitlab.com/anigko/test-channel/-/blob/ef07ce6904c16533f0fc21fda74216ce0a38bafd/.guix/modules/test-repo-package.scm ('channel-dir' is a macro instead of a variable, but I don't see any real benefits in using macro here)