From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gA+NEKYtUWCCHgAA0tVLHw (envelope-from ) for ; Tue, 16 Mar 2021 22:13:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cF4+DKYtUWA6aAAAbx9fmQ (envelope-from ) for ; Tue, 16 Mar 2021 22:13:58 +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 aspmx1.migadu.com (Postfix) with ESMTPS id 27B512370F for ; Tue, 16 Mar 2021 23:13:57 +0100 (CET) Received: from localhost ([::1]:56812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMHwo-0004Qc-OC for larch@yhetil.org; Tue, 16 Mar 2021 18:13:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMHn3-0002xo-GL for help-guix@gnu.org; Tue, 16 Mar 2021 18:03:49 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMHn1-0000ia-7B for help-guix@gnu.org; Tue, 16 Mar 2021 18:03:49 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1615932221; cv=none; d=zohomail.com; s=zohoarc; b=ATMgJWW7g3Mah56u/VzwxD60hm3cxYmVNsXPNcK5IlYn711jcT5GB8Gdl9ddsWgAly2lPpthQuEghrouJSh1yF7sfjkBGrivi/9kV53EvkMTF3iuUmzAjrDp9PzMfTqtTVvvOsLIvbyAizf8lVwN+M9GHUs1hY3FDODxUzmzYdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615932221; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=JOnp8rIgjb2TujVMNq45rqgPAXWtIYSZXIxIZJVi0pA=; b=cuaemfee6u7dxFN6TRPscJXi34ZwZFVWbgRUqXRSk0wD8K3vuLZB9QIEu8xQ76HF1M22Az8HqzbBRJgKU1+Z0uWSltmtWzyHdFTY/FFuxbNiIYUdax8AnVr+gFEeuUG9HCcpHzr2lpJWybWA9T9yRZSouZ7MDNCKv7JjcBmm078= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1615932221; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=JOnp8rIgjb2TujVMNq45rqgPAXWtIYSZXIxIZJVi0pA=; b=K7/DW/9Z0VPoH1+LEsRqE/3r239hzIel5/XnmY6nLb1W6LcKEnzBIyikRXFiX9wU 9beQQzNmMgEiEKYqOrW/+/Em3JYP2fBYlMP5M8XUnobYKNcuixGymlvCirNlShnc4Co /kY2FVkkiSvwsOu1XteZvvfCNJQN0CP+8i1gFh/g= Received: from localhost (p54ad4b49.dip0.t-ipconnect.de [84.173.75.73]) by mx.zohomail.com with SMTPS id 1615932219636864.6121582064369; Tue, 16 Mar 2021 15:03:39 -0700 (PDT) References: <87y2eomngw.fsf@elephly.net> <51eadb71-592c-d024-3163-85766a1a060c@posteo.de> User-agent: mu4e 1.4.14; emacs 27.1 From: Ricardo Wurmus To: Zelphir Kaltstahl Subject: Re: About packaging documentation In-reply-to: <51eadb71-592c-d024-3163-85766a1a060c@posteo.de> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 16 Mar 2021 23:03:36 +0100 Message-ID: <874khan4cn.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 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_NONE=-0.0001, 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=no 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615932837; 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=JOnp8rIgjb2TujVMNq45rqgPAXWtIYSZXIxIZJVi0pA=; b=YvmBIqMe1bH33dtMLzr4MQDdvd46GaY8xT8e5fMgDnBu5hxYlwlCnqT7VSf3OLydBHErTj UZ9WFlijbY5dJ54uKyTGh6E5sq56V4M3G18LTpquEaa1k7M0X6WO5Gim+DVh4H1dAx8rlX hORja/g4iz7uQiUr32IAklePtDiePpMnf1WcCKKeSvhDeyoI8hpB0W04ZSnCenVFJZHCkr B9O3UwX45NaW9UuGQj43dcd5KpmKQNxbpw7SipEjz7L+FDjXi3SaxeQPTmabdpyUVagMvI w1ltuS8hilgjENSeDp89uqMDMZ53t2sl4E97bblfkdD/KArYNKGko5hig57iOw== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1615932837; a=rsa-sha256; cv=pass; b=dRYXKu6RPAipFXfe6lrjFu6AQnGtw4lm72RN2LZ1jfcyB1hocCpXuuFtoLFjVw947I6nKt LcDlKCyhLfLncs7kgwtP2knWO2FrUz92Yxf2uC8aZ6/vTh4FY+xuaWFYusM/jpsevq/CDu UImEfXA7aMOSvVMIWG3IfSSIOFUUHfTUIjd+6OIryD6SsZDECuZnVa68wbb7fXD1E04dBy hT1YXA6OBNxb3ix4nIdXYsPcetUUNkPQ1X8+wIjBaRaXRups/bxsYZu5QTJWyQym+b9R0A 1rhYOGkdHFVbDQSsFdAru4TaFhLG5oaNpC943FGzp5ZPZjZCE6965zyIjpXDVA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="K7/DW/9Z"; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (aspmx1.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.60 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="K7/DW/9Z"; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.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: 27B512370F X-Spam-Score: -3.60 X-Migadu-Scanner: scn0.migadu.com X-TUID: qUXmFaCQk/kn 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 p= ackage" >>> 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. Pe= rhaps I >>> did something slightly wrong. I do not know. Someone mentioned on the g= uile user >>> mailing list, that this is all that should be needed for a pure guile p= ackage. >>> Perhaps it can be updated? >> Could you share the code you=E2=80=99re trying to package? Perhaps it w= ill >> become clearer to us what you would like to see changed in the cookbook >> =E2=80=94 and perhaps it will become clearer to you how packaging for Gu= ix works. > > Yes, I'll link it: > > https://notabug.org/ZelphirKaltstahl/guile-fslib/commit/eacdbb5ee9e304133= 92908d9e3988e30e9411aa7 > > > Or: > > https://notabug.org/ZelphirKaltstahl/guile-fslib/src/0.2.0 Excellent. Here=E2=80=99s 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 [=E2=80=A6] 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 =3D # scheme@(guile-user)>=20 --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/s= ite /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0 /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/file-system.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/file-reader.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/test /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/test/test-string-utils.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/test/test-fslib.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/test/test-list-utils.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/string-utils.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/fslib.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/list-utils.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/guile/s= ite/3.0/logging.scm /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/gui= le-fslib-0.2.0 /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/gui= le-fslib-0.2.0/todo.org /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/gui= le-fslib-0.2.0/LICENSE /gnu/store/2k3x0j6mvypjagam39dx89fd5yan7a3y-guile-fslib-0.2.0/share/doc/gui= le-fslib-0.2.0/README.md --8<---------------cut here---------------end--------------->8--- One thing to note is that Guix didn=E2=80=99t run the tests, because it doe= sn=E2=80=99t know how to (there=E2=80=99s no generic way to run tests for Guile packages= , so the build system doesn=E2=80=99t try). This can be changed by adding an =E2=80=9Carguments=E2=80=9D field to the p= ackage definition that adds a phase to run the tests. --=20 Ricardo