From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CIBnMwvPvGY1WAEAqHPOHw:P1 (envelope-from ) for ; Wed, 14 Aug 2024 15:36:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id CIBnMwvPvGY1WAEAqHPOHw (envelope-from ) for ; Wed, 14 Aug 2024 17:36:43 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pelzflorian.de header.s=key2 header.b=IFWalaHr; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723649803; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=g+5+L3cUkDPbJh7ymhQLB0OiL2n+KxlDwanQBxO+WMs=; b=KhRAE6sJT0t/Qr74siqbMnlqCk+iE83Pb6GmtDESdDz1rAEkylsm2k2V1ZTxCYjILm/irJ a1/NUSW3xZVTNb9slScXGqRXigNvVq8iEMmn6NIi2mFTj+9OEPQEJwDRngvG7cYAZ7N2AY xuFl6vx6fZKX2wkgLgZGmOrtTeX39PI/9OsLCzS1+9TjE8pquqP+UT4uhO7d/qYromR7Pf AwisXNGAmv3BOmJwpnuQKf9CddKOPA0WKMMKfEPeIpb/hxgPIqwTS8MveXoNuHIg9vx00i R6qbiWH7gr+1lfnUZqOik6/QZMAOEHH06iRmJu0rYQ7maS0Wg2Yv66SN1vaO1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=pelzflorian.de header.s=key2 header.b=IFWalaHr; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723649803; a=rsa-sha256; cv=none; b=Ly6CNw1vp7MXbP0uLBLfnK8TbWbvTygzMoEO0P116r0A0nz9SPr30MPMyrZdjIfAIFJmD0 cIzg7TzX3le1wbogc6gLHHIyo3juXPSqarqII/yJ/Ws+r2W7LVUtDQCfwA1L9VrEu5bxHG aWK5R+HQuvK6hbxbJUN0d2l3OFPBlH0GtksQVkJmrmbMODJZ6ID4XdoYoIka9fVPz7JMZB MHKcjDcNWYQPvq0QJfBSgCR59Q00hM/rrHbiO3L+aR61EKjwk554vWOJen888oHShJoZjR ekFOEiQHku5M70Xy5JM6R59eKaHWCd2YWuaYSE55uh0HgzbNyjdKHsbGnn8RTg== 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 5B0EB9E44 for ; Wed, 14 Aug 2024 17:36:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seG2g-0003fU-W1; Wed, 14 Aug 2024 11:36:07 -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 1seG2f-0003cC-Dg for guix-devel@gnu.org; Wed, 14 Aug 2024 11:36:05 -0400 Received: from relay.yourmailgateway.de ([194.59.206.189]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seG2b-00080y-5f for guix-devel@gnu.org; Wed, 14 Aug 2024 11:36:05 -0400 Received: from relay02-mors.netcup.net (localhost [127.0.0.1]) by relay02-mors.netcup.net (Postfix) with ESMTPS id 4WkXQg56fmz44yp; Wed, 14 Aug 2024 17:35:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1723649755; bh=jldEa3ezO+NafbmTDKH920bQ6i0xu8rdJmH+s+Q6mrw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=IFWalaHrtUZsKCTDBzg1zS1Qw5WSpshNmsayMgchc6xR3K2JcJHBecABwvvVzERoI SAXfO0w7LuT8B28qGcWJY+/BLns10lFyyGe4H4+QWK8TW6APaLx6K5f5gYJkZinT18 LSTkhKS409Rtc4ZPIpTxVR+owAXBTgaPXb6naoM+w10le86+EDAECFGIvQh617ccnG Mwf7UMGVmvJZ9aHMpLaA3qLDMTOHvqsG9J/o0HKDZYfAKHKbnzP6LVBNNFrVHVHu2E 4ykOkFrhEGYXgSNgH6o7bECPCBt/uHAUfDECSSLjHpLHAH1E3y9Yqoat4tP4EwXEqz QomK/Vc1yTHlw== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by relay02-mors.netcup.net (Postfix) with ESMTPS id 4WkXQg4jchz7xTl; Wed, 14 Aug 2024 17:35:55 +0200 (CEST) Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4WkXQg0QX4z8sZV; Wed, 14 Aug 2024 17:35:55 +0200 (CEST) Received: from florianhp (ipb2186896.dynamic.kabel-deutschland.de [178.24.104.150]) by mxe217.netcup.net (Postfix) with ESMTPSA id C396B8406F; Wed, 14 Aug 2024 17:35:48 +0200 (CEST) From: "pelzflorian (Florian Pelz)" To: Nigko Yerden Cc: Attila Lendvai , guix-devel@gnu.org Subject: Re: Cookbook recipe from "The Repository as a Channel" section does not work for Guix with properly configured GUILE_LOAD_PATH In-Reply-To: (Nigko Yerden's message of "Tue, 13 Aug 2024 22:49:13 +0500") References: <63d4684d-7e8e-437b-91f5-ce20607ab882@gmail.com> <87ed6sebdp.fsf@pelzflorian.de> <4d2eb8d0-1bed-429d-a99e-a1ea182dec1c@gmail.com> <87ttfotjw1.fsf@pelzflorian.de> Date: Wed, 14 Aug 2024 17:35:48 +0200 Message-ID: <87cymbyv57.fsf@pelzflorian.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Rspamd-Queue-Id: C396B8406F X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: yOkcv1ufwe2YOttyvoGYF2r166ZasH6ynZB8gXqd1QznviQtjxnWY6FB Received-SPF: pass client-ip=194.59.206.189; envelope-from=pelzflorian@pelzflorian.de; helo=relay.yourmailgateway.de 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, SPF_HELO_PASS=-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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.48 X-Migadu-Queue-Id: 5B0EB9E44 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.48 X-TUID: IgT/rs8XJFAy --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Nigko, that you attempted the recipe and found an error and a fix is extremely helpful. It seems to me that what is written in "The Repository as a Channel", when copied literally, has never worked. I tried with a guile package instead of your test-repo package, using gnu-build-system rather than copy-build-system, and both current guix master branch as well as old version-1.4.0 branch. It still failed, like you wrote. I turned your description of the work-around into a patch, (see e-mail attachment), in your name and e-mail address, with copyright. Your work-around is to move the package, for which guix.scm is a symlink, to its own directory. It works for me. And looks like a good recommendation in general. I believe Attila Lendvai=E2=80=99s bug with (current-filename) being #f will *not* lead to a fix that makes this cookbook change unnecessary. Is the patch okay? Do you have suggestions for a better commit message? May I push it to the guix repo? Regards, Florian --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=doc-cookbook-Fix-non-working-recipe.patch Content-Transfer-Encoding: quoted-printable From: Nigko Yerden Date: Wed, 14 Aug 2024 17:06:49 +0200 Subject: [PATCH] doc: cookbook: Fix non-working recipe. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Fixes: * doc/guix-cookbook.texi (Software Development)[The Repository as a Channel= ]: Move package to its own directory. With Guix=E2=80=99 default GUILE_LOAD_P= ATH setting, `local-file' cannot correctly follow symlinks otherwise. Change-Id: I45d6878139e32f33b40465e272356c106a6d920a --- doc/guix-cookbook.texi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index da67921ad0..bcb1bf67fc 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -25,6 +25,7 @@ Copyright @copyright{} 2023-2024 Ludovic Court=C3=A8s@* Copyright @copyright{} 2023 Thomas Ieong@* Copyright @copyright{} 2024 Florian Pelz@* +Copyright @copyright{} 2024 Nigko Yerden@* =20 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -4623,9 +4624,9 @@ The Repository as a Channel symlink for the sake of @command{guix shell}: =20 @lisp -mkdir -p .guix/modules -mv guix.scm .guix/modules/guile-package.scm -ln -s .guix/modules/guile-package.scm guix.scm +mkdir -p .guix/modules/guile +mv guix.scm .guix/modules/guile/package.scm +ln -s .guix/modules/guile/package.scm guix.scm @end lisp =20 To make it usable as part of a channel, we need to turn our @@ -4639,21 +4640,21 @@ The Repository as a Channel looks like this (not repeating things that haven't changed): =20 @lisp -(define-module (guile-package) +(define-module (guile package) #:use-module (guix) #:use-module (guix git-download) ;for =E2=80=98git-predicate=E2=80=99 @dots{}) =20 (define vcs-file? ;; Return true if the given file is under version control. - (or (git-predicate (dirname (dirname (current-source-directory)))) + (or (git-predicate (dirname (dirname (dirname (current-source-directory)= )))) (const #t))) ;not in a Git checkout =20 (define-public guile (package (name "guile") (version "3.0.99-git") ;funky version number - (source (local-file "../.." "guile-checkout" + (source (local-file "../../.." "guile-checkout" #:recursive? #t #:select? vcs-file?)) @dots{})) base-commit: 174ecf5b1077d29498d9de22e27b13047f314feb --=20 2.45.2 --=-=-=--