From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adonay Felipe Nogueira Subject: Re: various packaging issues Date: Thu, 20 Jul 2017 13:01:45 -0300 Message-ID: <87shhrxfkm.fsf@adfeno-pc1.i-did-not-set--mail-host-address--so-tickle-me> References: <87lgnlhhto.fsf@c-l07itc0gcrgz.its.manchester.ac.uk> <87r2xdpt81.fsf@gnu.org> <87a841gycq.fsf@c-l07itc0gcrgz.its.manchester.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYDtj-0001Ex-8A for help-guix@gnu.org; Thu, 20 Jul 2017 12:01:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYDtf-0008Ni-Ud for help-guix@gnu.org; Thu, 20 Jul 2017 12:01:55 -0400 Received: from lb1.openmailbox.org ([5.79.108.160]:33718 helo=mail.openmailbox.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYDtf-0008M2-ME for help-guix@gnu.org; Thu, 20 Jul 2017 12:01:51 -0400 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@gnu.org For the "package with multiple origins" scenario, provided *only one* package needs the same set of origins, one could do something *similar* to this: --8<---------------cut here---------------start------------->8--- (define-public major-package (let ((extra-origin (let ((extra-origin-release "1.1")) (origin ORIGIN-BODY)))) (package (name "major-package") (native-inputs `(("extra-origin" ,extra-origin) PACKAGE-NATIVE-INPUTS-REST)) PACKAGE-BODY-REST)))=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 --8<---------------cut here---------------end--------------->8--- This defines and exports the 'major-package symbol/variable as a public part of the current module. Inside 'major-package you have the local 'extra-origin variable/symbol that is only available to the BODY part of (let ((VARIABLE1 INIT1) ...) BODY). I have also inserted another (let ((VARIABLE1 INIT1) ...) BODY) inside 'extra-origin, but if you don't need local varaibles/symbols inside the 'extra-origin, you can simply extract the BODY part of this (let ((VARIABLE1 INIT1) ...) BODY) and discard the rest. Back to the BODY part of the topmost (let ((VARIABLE1 INIT1) ...) BODY), I made the 'package definition of 'major-package. And assigned the local 'extra-origin as one of its 'native-inputs (I could have placed it elsewhere, but I didn't test this example with 'inputs nor with 'propagated-inputs). About packaging and Scheming: Interesting, I'm not a developer, but I find the contrary. In fact, nowadays I try to study and code more in Scheme and Emacs Lisp than in other programing languages, also because most of the others have limitations. As you also said, it's a matter of learning and patience, :). --=20 - [[https://libreplanet.org/wiki/User:Adfeno]] - Palestrante e consultor sobre /software/ livre (n=C3=A3o confundir com gratis). - "WhatsApp"? Ele n=C3=A3o =C3=A9 livre, por isso n=C3=A3o uso. Iguais a el= e prefiro GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard que est=C3=A1 no endere=C3=A7o acima aos teus contatos. - Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu aceito, mas n=C3=A3o repasso. Entrego apenas em formatos favor=C3=A1veis = ao /software/ livre. Favor entrar em contato em caso de d=C3=BAvida.