From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Subject: Re: Trying to contribute packages: ./pre-inst-env doesn't work Date: Wed, 15 May 2019 10:46:29 +0200 Message-ID: References: <20190515080654.6g7gf7b2g5kx677v@NUC.doronbehar.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:42937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQpYi-0001jY-AE for help-guix@gnu.org; Wed, 15 May 2019 04:46:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQpYg-0007Jz-Nw for help-guix@gnu.org; Wed, 15 May 2019 04:46:44 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:42339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQpYg-0007JR-El for help-guix@gnu.org; Wed, 15 May 2019 04:46:42 -0400 Received: by mail-ed1-x529.google.com with SMTP id l25so2987394eda.9 for ; Wed, 15 May 2019 01:46:41 -0700 (PDT) In-Reply-To: <20190515080654.6g7gf7b2g5kx677v@NUC.doronbehar.com> 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: help-guix Hello Doron! Doron Behar ezt =C3=ADrta (id=C5=91pont: 2019. m=C3= =A1j. 15., Sze, 10:09): > Hey all, > > Coming from Arch Linux, I'm trying to add new packages and contribute > them to the Guix project. However, I have a few doubts as for dictating > a workflow and most importantly I can't seem to be able to actually test > my new packages' definitions with `./pre-inst-env`. > > First of all, I'm not sure whether I should define custom channels or > not. After reading the section Channels in the manual, it seemed > reasonable for me that in order to test my fork of Guix, I should create > a branch with my new packages and then test it with `guix pull` and > `guix build`. But `guix search` and `guix build` don't seem to be able > to find the new packages I defined and I couldn't find a way to debug > this. > > To be more specific, I've tried this idea by writing the following in > `~/.config/guix/channels.scm`: > > (list (channel > (name 'guix) > (url "file:///var/code/doron/guix"))) > > I ran `guix pull` and it seems it checked out my version of Guix but it > make those new packages available. > > It might be easier to first set up a channel with your packages only. You can find several examples out there. Here is one of my channels: https://gitlab.com/g_bor/nominatim-channel > ----- > > Failing to achieve my target with custom channels, I've disabled the > custom channels I configured above and I tried following the > Contributing section in the manual. I jumped straight to the Packaging > Guidelines section and I've done the following: > > - I ran ./configure inside /var/code/doron/guix > Did you specify your localstatedir to configure? Did you also run make? Are your packages in a separate file? If yes, did you add it to local.mk? - I killed the systemd service of guix-daemon and I ran this command: > `sudo -E ./pre-inst-env guix-daemon --build-users-group=3Dguixbuild` > - In another shell, I tried running: > `./pre-inst-env guix build my-new-package` > > But it reports that the package `my-new-package` is unknown. > > ----- > > Failing to do that and after looking for alternative ways to create new > packages, I read about the `--load-path` option of `guix build`. Is it > possible to use it for new packages testings? I tried to run the > following but I got all kinds of warnings and errors: > > guix build -L/var/code/doron/guix my-new-package > > I would not do that, the channel mechanism superseded this. Here is all of the output: > https://gist.github.com/doronbehar/38d31142522fd01a67e7da412b0cf5ed > > Since there were all of these "source file newer than compiled" > These are actually harmless, they indicate that your .go files should be regenerated, as they are older than the .scm files. You can run make to get rid of these. (Have not looked at the error, tough) > messages, I tried putting back my channels configuration from above and > run `guix pull` again but I got pretty much the same errors and > warnings. > > ----- > > Any way, I'm very frustrated. Although I'm very excited as for the > genius design of Guix and it's flexibility and extensibility, I'm very > disappointed by it's UX for a simple thing as package contribution. but > this should be addressed in a separate discussion . > I am very sorry to hear that. I hope you can point us to the right directions to make this easier. Suggestions about documentation are also very welcome. > > I hope someone could help me. > > Thanks, Doron. > > Best regards, g_bor