From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Help defining a trivial package. Date: Sun, 25 Aug 2019 08:17:37 -0400 Message-ID: <87sgppfnha.fsf@ngyro.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60816) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i1rSp-0001FE-DT for help-guix@gnu.org; Sun, 25 Aug 2019 08:17:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i1rSo-0005N5-5w for help-guix@gnu.org; Sun, 25 Aug 2019 08:17:43 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55187) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i1rSn-0005LK-Nf for help-guix@gnu.org; Sun, 25 Aug 2019 08:17:41 -0400 In-Reply-To: (Pierre-Henry F.'s message of "Fri, 23 Aug 2019 19:42:56 +0000") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: "Pierre-Henry F." Cc: "help-guix@gnu.org" Hi Pierre, "Pierre-Henry F." writes: > Would someone help defining a trivial package? Sure! > Here is an attempt at defining the package (incomplete, does not work) in= blog.scm: > > (define-module (blog) > #:use-module (guix packages) > #:use-module (guix download) > #:use-module (guix build-system trivial) > #:use-module (guix licenses) > #:use-module (gnu packages python)) > > (define-public blog > (package > (name "blog") > (version "3") > (source > (origin > (method url-fetch) > (uri (string-append "/home/phf/programs/blog/release_" versio= n ".tar.lz")) > (sha256 > (base32 > "1y819b53ksyas6asldysr0r8p73n5i8ipbpmbgjrfx8qz8cy2zsx")))) > (build-system trivial-build-system) > (arguments > '(#:builder #~(begin > (mkdir #$output) > (chdir #$output) > ... > ))) > (inputs `(("python" ,python))) > (synopsis "Guix 'hello world' to learn about Guix") > (license gpl3+))) > > Here is the line that I use to try to build and debug along the way: > > $ guix build --keep-failed --verbosity=3D2 --file=3D./blog.scm > As a note for the future, it would be helpful to include the error message that you saw when things went wrong. Here, I=E2=80=99m assuming th= at Guix said: guix build: error: #: not something we can build Running =E2=80=9Cguix build --file=3DX=E2=80=9D causes Guix to build the la= st expression evaluated in the file =E2=80=9CX=E2=80=9D. In your case, the last expressi= on that gets evaluated is the =E2=80=9Cdefine-public=E2=80=9D form, which returns an uns= pecified value. While testing, you can put =E2=80=9Cblog=E2=80=9D at the bottom of the file= , causing Guix to build your defined =E2=80=9Cblog=E2=80=9D package. Hope that helps! -- Tim