From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zelphir Kaltstahl Newsgroups: gmane.lisp.guile.user Subject: Re: Scripting for installing a module Date: Sat, 2 Jul 2022 19:43:43 +0000 Message-ID: <1132e011-a27f-0e6a-606f-f2a0f6e83030@posteo.de> References: <20220701171539.uuwwdnvtkvsfetc4@jamescrake-meraniarch> <20220702084605.uodozysntgij3oky@jamescrake-meraniarch> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14807"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: James Crake-Merani , adriano Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Jul 02 21:46:17 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o7j4L-0003dm-2h for guile-user@m.gmane-mx.org; Sat, 02 Jul 2022 21:46:17 +0200 Original-Received: from localhost ([::1]:47318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7j4J-0001xa-99 for guile-user@m.gmane-mx.org; Sat, 02 Jul 2022 15:46:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7j47-0001x1-1m for guile-user@gnu.org; Sat, 02 Jul 2022 15:46:03 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:40945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7j42-00045H-SZ for guile-user@gnu.org; Sat, 02 Jul 2022 15:46:02 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2578C24010A for ; Sat, 2 Jul 2022 21:45:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1656791155; bh=GKaUHhMkAbAKsqkX80vRe0k2h/Ou1fCUEfQ8ZiDR+l0=; h=Date:Subject:To:Cc:From:From; b=EzAhXZGfDrmak738gpRFdECxhx2VkATF8NDBu3bakXelLv3G12G03FmDuL67lm1WR amaj6RC/VU+FDXSUVwZL0xJ81LyLvRtzW1USO8a5ToJsl9fqfMQehF3goVhjreq0Ma yzRFQCsORWWTXPTNtDt5ww4iwIJJ2Djy+KA5YU0VMd4Vuqgz48mcMHStAXRDj1WB3Z se4cZ0l/8QncT853NfPkmaCq/q8RY/FZFik8MQaOqI9NRL4t4POkrE7W6Nth5ox+Pm xO3LlX/J9Wjn8UXcol5CYdLemv+NUL6EXH/uW21Atu0AAiu7DLl4zu7BEbywoAsdVV pB6nnk2SpItNQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Lb2cK5WJSz6tmg; Sat, 2 Jul 2022 21:45:53 +0200 (CEST) Content-Language: en-US In-Reply-To: <20220702084605.uodozysntgij3oky@jamescrake-meraniarch> Received-SPF: pass client-ip=185.67.36.66; envelope-from=zelphirkaltstahl@posteo.de; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:18384 Archived-At: On 7/2/22 10:46, James Crake-Merani wrote: > On 22/07/02 09:11am, adriano wrote: >> Il giorno ven, 01/07/2022 alle 18.15 +0100, James Crake-Merani ha >> scritto: >>> Hello, >>> >>> I was just wondering what approach people tend to take when writing a >>> script which installs a module onto the load-path. I understand this >>> path might be different on different machines so how do you make sure >>> the module is installed in the right path? Would you use something >>> like a Makefile? >> not only a Makefile >> >> The whole Autotools chain >> >> There are 2 options: >> >> 1) you write the config.am and Makefile.am (or however they're called) >> by hand and you deal with the Autotools directly, by hand >> >> 2) You use guile-hall and it will wrap the Autotools making the >> experience a bit less frustrating >> >> >> >> BUT >> >> I wonder: why you want to install your module ? >> >> You might want to distribute it as a simple handful of source files >> >> Guile will compile it automagically at need >> >> If your module has no dependencies, that could be an easy option >> >> If it _has_ dependencies, then the Autotools might be of help >> >> Did you think about this ? >> >> I hate to second guess your question >> >> I understand it might be perceived as rude and I'm sorry for that >> >> I just think these distinctions in use cases are not clear at all, in >> the manual and in general >> >> So this could be an easy pitfall > Hi, > > Don't worry, you didn't come across as rude at all. My use case was simply that I wrote some modules that I wanted to distribute, and I thought that if I'm going to distribute them, I probably ought to put some sort of script in so users can install them as well. The modules in question are just a simple project which tests your conformance to a certain political ideology (which is not sophisticated at all because it was more of a joke between friends that I thought would make a good programming exercise). After seeing Guile Hall recommended by yourself, and Jeremy I thought this might be appropriate. My modules have no dependencies aside from those already part of Guile although I do intend to write another module which will depend on the previous module. > > So if I were to take the latter approach of just distributing the source code then I presume users would have to load the file manually, or install it manually unless I'm missing something. In that case, I would've thought using something like Guile Hall would be more appropriate but again I might be missing something. > > I have just found the manual pages detailing Guile Hall which I was not originally aware of. After reading them, it does seem to me that Hall would be appropriate for this but of course I would be willing to hear about alternatives to distributing the code. > > Thanks for your response. Hello James! If your code is Guile code exclusively, then you might not need Guile Hall for packaging your code. You can make a GNU Guix package without Guile Hall. That is not to say, that Guile Hall does not work well, but I had a project, which I wanted to package and ultimately I did not want to depend on all the autotools machinery, which I do not understand. It has been a while, since I have packaged anything (I should really clean the repo a bit …), but the project I have is https://notabug.org/ZelphirKaltstahl/guile-fslib. I think tag 0.2.1 should contain a valid guix.scm. This repo also still has files from previous Guile Hall attempts. However, you might have to study the docs to get things working for your own project and how to test it with guix. I remember, that I used a VM for testing installation of the package. Somewhere I have a repository, which describes the process. Regards, Zelphir -- repositories: https://notabug.org/ZelphirKaltstahl