From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KJRBNMEh/WPKEgEAbAwnHQ (envelope-from ) for ; Mon, 27 Feb 2023 22:33:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +NkNNMEh/WPymwAAauVa8A (envelope-from ) for ; Mon, 27 Feb 2023 22:33:53 +0100 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 94A3D28D1A for ; Mon, 27 Feb 2023 22:33:53 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021100501 header.b=XShrqqrl; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=fsfe.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677533633; a=rsa-sha256; cv=none; b=alpNNdtNH+5JjiDQGkZBem7pqdNte0HUcIiTazuJiqog2CJsUOxaLLtdLtbUQKoJTZMgN0 kdYRVBR+dgnvNhFQpYYRT9BoSnv/XnMSz0nJ8bAhWgOh2OMdAUl7oZoQ7pOi4hFJRPXV8j bp4yJvXCFObphN/7W0UhciQqoszza8uipRH9JuBxGNIVKHaQ5vHxeoefzMMWXB3rb/Y609 WKKCUBRjCJ/yobmf2uVQOKCVIcwGGfo5q4Fk/RC+nP7FPxHOQc+xaAtOrnx1ebBmIjn15g XKh2ztiMGlz5HGx3eiwsfuR1n8CSSnvbFmtuEfffQUw0IoubYry7zF5ipzf11g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021100501 header.b=XShrqqrl; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=fsfe.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677533633; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=Ps+GKmRSD6A6jSpcJYkE3KtcRkkfivOF18b9NACT5+E=; b=dGyaxfHOEBwB6ue3xfcKSLqtt+8kujhPchFt0e//YbSHquLs4Oc9nz6cClYt82ZQJqcVEa XBMd8josu7vW2CGe4kAb8CvdqLlDqGCvcPBtqnP3Co55aXg5m8BGH+u+xfhIWsV2B1J8Gj R/LIRegM8TURXIENFEIf+YefUtQySwBvJJNvpQ+hDrQ9qxRCIVUI5NsRHE7qpn06IfyqMs CzrUaF5ShNTrRio0CskPIW5oJj/Ed7Q16+zBcWkCXW8moUHEvdrpb4/5ENkU/o7hPEz+iW 9tlBmTpgjG9WEKUZakV0qg9BsrcEIdG8v1mwXKvh+Mzxd67ycTeGZd/cQ3V+nQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWl7e-00070a-8S; Mon, 27 Feb 2023 16:33:26 -0500 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 1pWl7c-0006vV-LU for help-guix@gnu.org; Mon, 27 Feb 2023 16:33:24 -0500 Received: from mail1.fsfe.org ([2001:aa8:ffed:f5f3::151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWl7a-0004Eo-Ci for help-guix@gnu.org; Mon, 27 Feb 2023 16:33:24 -0500 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1677533597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ps+GKmRSD6A6jSpcJYkE3KtcRkkfivOF18b9NACT5+E=; b=XShrqqrl+DFxRiTFcuVc4ZUYrLe5QLsKkq9eJxabhzS8Y041jyaUCiQgwciI5ndcpQXS1x R+y4cS9mL5K1h9Ol6l6+p7TUb3pyIc1Z720WFwjgFp/XhM7xRbMw9rslBgA8Qcqye8V42B D8EcbpmakBKQXTJvSy39ugocWVFStYg= To: Rodrigo Morales , help-guix@gnu.org Subject: Re: Minimal working examples of packages for experimentation? In-Reply-To: References: Date: Mon, 27 Feb 2023 22:33:16 +0100 Message-ID: <87zg8y4wv7.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2001:aa8:ffed:f5f3::151; envelope-from=jlicht@fsfe.org; helo=mail1.fsfe.org X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.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, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 94A3D28D1A X-Spam-Score: -7.55 X-Migadu-Spam-Score: -7.55 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: YAM+PE3xrFMo Hello Rodrigo! Rodrigo Morales writes: > [snip] > The following is the package that I wrote. > > ,---- > | (define-module (my-simple) > | #:use-module (guix licenses) > | #:use-module (guix packages) > | #:use-module (guix gexp) > | #:use-module (guix build-system trivial) > | #:use-module (guix download)) > | > | (define-public my-simple-1 > | (package > | (name "my-simple-1") > | (version "2.10") > | (source (origin > | (method url-fetch) > | (uri " > https://www.gnu.org/graphics/heckert_gnu.transp.small.png") > | (sha256 (base32 > "1686w7x3qk85i5693nrj7lbdh64232fdsqd5rgxgijv1y39rldbr")))) > | (build-system trivial-build-system) > | (synopsis "My synopsis") > | (description "My description") > | (home-page "https://example.org/") > | (license gpl3+))) > `---- > [snip] > 3 What I'm looking for > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > 1. Why the package that I wrote failing? How could I fix it? Looking at `info "(guix) Build Systems"'[0], in the blurb about the trivial-build-system: --8<---------------cut here---------------start------------->8--- This build system requires a =E2=80=98#:builder=E2=80=99 argument. Th= is argument must be a Scheme expression that builds the package output(s)=E2=80=94= as with =E2=80=98build-expression->derivation=E2=80=99 (*note =E2=80=98build-expression->derivation=E2=80=99: Derivations.). --8<---------------cut here---------------end--------------->8--- The reason your package fails to build, is that it doesn't provide such a #:builder argument. This argument is also responsible for creating the actual output, which can be a file or directory. The simplest snippet I can think of for making your package "work": --8<---------------cut here---------------start------------->8--- (define-public my-simple-1 (package ; .. existing stuff (arguments (list #:builder #~(mkdir #$output))))) --8<---------------cut here---------------end--------------->8--- Note that this simply creates the output directory, and does nothing else. What may seem a bit misleading here is that "build expressions" have mostly been ported to this hip thing called G-Expressions (see `info "(guix) G-Expressions"' [1]). > 2. Do you know simpler package definitions (aka minimal working > examples) that I could use for experimenting? Simple does not always imply easy. If we're talking about an easy to use build system, I think the `copy-build-system' could work, as does the gnu-build-system as it allows you to play with the moving parts without having to supply all of these moving parts yourself :). A package that uses the trivial-build-system that does slightly more is `inxi-minimal', which you can find by issuing a `guix edit inxi-minimal'. HTH! - Jelle [0]: https://guix.gnu.org/manual/devel/en/html_node/Build-Systems.html#inde= x-trivial_002dbuild_002dsystem [1]: https://guix.gnu.org/manual/devel/en/html_node/G_002dExpressions.html