From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kCbhChJqUmB+fAAA0tVLHw (envelope-from ) for ; Wed, 17 Mar 2021 20:44:02 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mIsNBhJqUmDSMQAAbx9fmQ (envelope-from ) for ; Wed, 17 Mar 2021 20:44:02 +0000 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 aspmx2.migadu.com (Postfix) with ESMTPS id 4CAD122C9D for ; Wed, 17 Mar 2021 21:44:01 +0100 (CET) Received: from localhost ([::1]:59062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMd1K-00006t-QA for larch@yhetil.org; Wed, 17 Mar 2021 16:43:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMd1A-000055-Br for help-guix@gnu.org; Wed, 17 Mar 2021 16:43:48 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMd17-0007Yd-Bj for help-guix@gnu.org; Wed, 17 Mar 2021 16:43:48 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id AFAD82400FC for ; Wed, 17 Mar 2021 21:43:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1616013821; bh=HnTsGWmokcNV3vMZOJxtORSJGoKRInCDoA172amxu18=; h=Subject:To:Cc:From:Date:From; b=MWt6/ME4vaIh4G6h2j+AxSM6HGqYRsXG0tWRCVQ5kNzax74SI93InRspGStsA4DfT 8tz3nEcQ9CrWreCYjNfMJ0UoOV6qWlyFNBFqrwxkQhPt95j/zAsu+dm9Jw6eLHK2/h XddH4UVd/19XLJv+0Ltuorv17vhlL0YmNh50GHngoPUIRSG34nwNr6ExMjI2QcdOdI eFhS7xjYahs8uHWSg7/qTh9j9k49fduX39ZHYS5ZDW97ZwH+XMwM20mdz9xLBUsafb /VKgkBZ7XazHGLGsjGaQVIyGLTr/S+NBjB+VFRP0yMinj0bX8dv7cvPGOtHBgGygh0 +BPwZZmnCRPnw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4F12Dr2tSvz9rxW; Wed, 17 Mar 2021 21:43:40 +0100 (CET) Subject: Re: About packaging documentation To: Ricardo Wurmus References: <87y2eomngw.fsf@elephly.net> <51eadb71-592c-d024-3163-85766a1a060c@posteo.de> <874khan4cn.fsf@elephly.net> From: Zelphir Kaltstahl Message-ID: Date: Wed, 17 Mar 2021 21:43:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <874khan4cn.fsf@elephly.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=185.67.36.66; envelope-from=zelphirkaltstahl@posteo.de; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL=1.623 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616013841; 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=rKijfPp6Nx3Rvq6jH5UpLT6fqJ933oaoyN2h2W3DPKI=; b=BCcyPXN2AOjwkmJVvBji5GuX9UnjtOks6sP9eCGzur5cQC2XOaZToLU9zGJ10jMQDX0g91 WrwkxPaffSbninvCZoL4/8ZbIfly95quVWK81QcsSiZPmKrKXVb5XZKJTBP7Zl/Ogq40Jx eOKDD5MUD+I//EO800agMII0GWAp2MvdgkkfX6QJfBRaU2qOonHJH4ekiupoEviuiksEGi pNFIHbA9AeQfqpgRr1usXRieHGLad0rmT4lm9MEfrgF5XWWdnb+qFTxCun19voByH6kVqV r90CrDSWQ1mToSlQKprUFca/F3JsGB8qqUrLoc2P40vTHNL3K0zH+4FfgS2prA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616013841; a=rsa-sha256; cv=none; b=kxQvKP1cDDx9C8ZE4qhh6/K0Z66SQxvNMA9w1e4DC009QNw7UX190BDO8LaNCUIq6K1e+C vyIerU0nmpM4c6y8SDYEJkiv43kOahf0K4Mxf1LDmwWh4KMhtWGb7/GTm0EvN8XsmqkWFJ jV8+YfKgZWkCLER59Lf2kXVMOZ3d7NdPhSkNALOOIt9r2bddOO9PGb3sDz1sdRwQ9JBdRY RwhzvorYqntfF020LqbnFBGA56es86Dhp2LTm7yWUvuqnlxcWXwTEF8pAnQnOJJaiSqgs9 SX8gGkw+Jhu4n0bT5nBmqdl3EbCZtGkMUFnl4Bo7A7RYTd3fW6D8r/Kv8w6qDA== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b="MWt6/ME4"; dmarc=pass (policy=none) header.from=posteo.de; spf=pass (aspmx2.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx2.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b="MWt6/ME4"; dmarc=pass (policy=none) header.from=posteo.de; spf=pass (aspmx2.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 4CAD122C9D X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: zLpk+IpmL5PR Hi Ricardo! On 3/16/21 11:03 PM, Ricardo Wurmus wrote: > Hi Zelphir, > >> Hello Ricardo! >> >> On 3/15/21 4:43 PM, Ricardo Wurmus wrote: >>> Hi Zelphir, >>> >>>> https://guix.gnu.org/cookbook/en/html_node/Packaging-Tutorial.html >>>> is a good >>>> start. It has even got cookbook in the name. Definitely the right idea to >>>> complement the general documentation. I am aware of its existence. >>>> Unfortunately, I could not get the basic approach of the "Hello World package" >>>> working for my package, even though it is pure guile, no other library required >>>> and no FFI or anything. I would have preferred not having to go through all the >>>> autotools stuff, and to have this simple way working for my package. Perhaps I >>>> did something slightly wrong. I do not know. Someone mentioned on the guile user >>>> mailing list, that this is all that should be needed for a pure guile package. >>>> Perhaps it can be updated? >>> Could you share the code you’re trying to package? Perhaps it will >>> become clearer to us what you would like to see changed in the cookbook >>> — and perhaps it will become clearer to you how packaging for Guix works. >> Yes, I'll link it: >> >> https://notabug.org/ZelphirKaltstahl/guile-fslib/commit/eacdbb5ee9e30413392908d9e3988e30e9411aa7 >> >> >> Or: >> >> https://notabug.org/ZelphirKaltstahl/guile-fslib/src/0.2.0 > Excellent. > > Here’s the package (I dumped this in (gnu packages guile-xyz)): > > --8<---------------cut here---------------start------------->8--- > (define-public guile-fslib > (package > (name "guile-fslib") > (version "0.2.0") > (source > (origin > (method git-fetch) > (uri (git-reference > (url "https://notabug.org/ZelphirKaltstahl/guile-fslib/") > (commit version))) > (file-name (git-file-name name version)) > (sha256 > (base32 > "118d84p443w7hrslv8hjyhgws631ia08mggiyklkmk0b9plfdsvz")))) > (build-system guile-build-system) > (inputs > `(("guile" ,guile-3.0))) > (home-page "https://notabug.org/ZelphirKaltstahl/guile-fslib") > (synopsis "File system utilities") > (description > "This package contains like super cool file system utilities and stuff. > It's really good and so easy to install!") > (license license:agpl3+))) > --8<---------------cut here---------------end--------------->8--- > > I only gave it a quick test like this: > > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix environment --ad-hoc guile guile-fslib -- guile > […] > GNU Guile 3.0.5 > Copyright (C) 1995-2021 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> ,use (file-system) > scheme@(guile-user)> file-size-in-bytes > $1 = # > scheme@(guile-user)> > --8<---------------cut here---------------end--------------->8--- > > Seems to work. > > And this is what was installed: > > --8<---------------cut here---------------start------------->8--- > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0 > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0 > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/logging.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-fslib.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-list-utils.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/test/test-string-utils.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/fslib.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-reader.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/list-utils.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/file-system.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/lib/guile/3.0/site-ccache/string-utils.go > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0 > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/file-system.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/file-reader.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test/test-string-utils.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test/test-fslib.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/test/test-list-utils.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/string-utils.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/fslib.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/list-utils.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/site/3.0/logging.scm > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0 > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0/todo.org > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0/LICENSE > /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/guile-fslib-0.2.0/README.md > --8<---------------cut here---------------end--------------->8--- > > One thing to note is that Guix didn’t run the tests, because it doesn’t > know how to (there’s no generic way to run tests for Guile packages, so > the build system doesn’t try). > > This can be changed by adding an “arguments” field to the package > definition that adds a phase to run the tests. > Thank you for taking the time and having a look at this. I will have to look into what mistakes I made following the cookbook and how to add tests using the arguments field. Once I know more, I will get back to you or ask more questions on the mailing list. Best regards, Zelphir -- repositories: https://notabug.org/ZelphirKaltstahl