From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?J=E9r=E9my_Korwin-Zmijowski?= Subject: Re: Guix can't build my dummy package definition Date: Sun, 01 Mar 2020 16:49:19 +0100 Message-ID: <3D6A8611-4CE8-4371-9C8F-00B7BB71479A@korwin-zmijowski.fr> References: <4D65396D-D8DA-42CC-9118-D470F9D5941D@korwin-zmijowski.fr> 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]:49015) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8QqM-0003L9-V8 for help-guix@gnu.org; Sun, 01 Mar 2020 10:49:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8QqL-0006xj-JN for help-guix@gnu.org; Sun, 01 Mar 2020 10:49:26 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:55349) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8QqL-0006wr-9t for help-guix@gnu.org; Sun, 01 Mar 2020 10:49:25 -0500 In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Julien Lepiller , help-guix@gnu.org Of course !!! I did know about it, I just forget it=2E=2E=2E Damn brain! Thank you for your quick answers ! So cool=2E I appreciate the three options you gave Julien=2E Helpful! I can realize now how much my lack of curioisity cost=2E Haha awesome feed= back for me=2E Thank you again=2E J=C3=A9r=C3=A9my Le 1 mars 2020 15:50:28 GMT+01:00, Julien Lepiller = a =C3=A9crit : >Le 1 mars 2020 07:58:27 GMT-05:00, "J=C3=A9r=C3=A9my Korwin-Zmijowski" > a =C3=A9crit : >>Hey Guixters ! >> >>I am experimenting one way to learn how to use Guix for packaging=2E=20 >> >>I've a package dummy definition in /tmp/def=2Escm: >> >>(use-modules=20 >> (guix packages) >> (guix build-system emacs) >> (guix licenses) >> (guix git-download))=20 >> >>(define-public ac-geiser=20 >> (package=20 >> (name "") >> (version "")=20 >> (source >> (origin >> (uri >> (git-reference (url "")=20 >> (commit "")))=20 >> (method git-fetch)=20 >> (sha256 (base32 "")))) >> (build-system emacs-build-system) >> (synopsis "") >> (description "")=20 >> (license bsd-3) >> (home-page ""))) >> >>Then when I do : >> >>=2E/pre-inst-env guix build -f /tmp/def=2Escm >> >>I get : >> >>guix build: error: #: not something we can build >> >>What is Guix trying to tell yo me ? I have no clue=2E=2E=2E=20 >> >>Does anybody have one ? >> >>Cheers > >I knew it was going to happen :) > >That message is indeed not very helpful=2E Internally, guix evaluates the >file and uses its return value (the value the last expression evaluates >to)=2E Here, your last expression is a define-public which does not >return any value (in other languages, it's called unit or void, in >guile it's #)=2E The solution is to make sure your last >expression evaluates to a package object=2E Three solutions: > >1=2E Add a new line on which you put the name of the variable you define, >so it evaluates to its content, the package object=2E > >2=2E Do not wrap the package definition in a define-public, but use >package directly, so that it evaluates to a package expression >directly=2E > >3=2E Define your file as a module, and use -L to add it to load path=2E >Then guix will be able to necognise all your packages in that file by >their name, instead of only the last one (ex: guix build -L =2E >ac-geiser), although your package has no name yet, so it can't be found >by guix that way currently=2E --=20 Envoy=C3=A9 de mon appareil Android avec Courriel K-9 Mail=2E Veuillez exc= user ma bri=C3=A8vet=C3=A9=2E