From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Packaging Jami progress Date: Wed, 04 Dec 2019 17:06:16 +0100 Message-ID: <87fti0t6rr.fsf@ambrevar.xyz> References: <20191104214754.793ec2ff@interia.pl> <20191114214010.7b61005f@kompiuter> <87lfsikttk.fsf@ambrevar.xyz> <20191114231605.0ecec870@kompiuter> <87a797o6hb.fsf@ambrevar.xyz> <20191125221517.1140d0c9@kompiuter> <874kyrlzmn.fsf@ambrevar.xyz> <20191126203259.0f4141ea@kompiuter> <20191130192121.11e0c968@kompiuter> <87fti52or5.fsf@ambrevar.xyz> <20191201173411.042e68f2@kompiuter> <878snw2bpn.fsf@ambrevar.xyz> <20191203164402.77a8c728@interia.pl> <87tv6hieeg.fsf@ambrevar.xyz> <20191203190235.53765cba@kompiuter> <87fti1mf1u.fsf@ambrevar.xyz> <87d0d5mez0.fsf@ambrevar.xyz> <20191204153631.509b9afb@interia.pl> <87immwt8kh.fsf@ambrevar.xyz> <20191204165038.7a5403f2@interia.pl> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59285) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icXAb-00025K-N2 for guix-devel@gnu.org; Wed, 04 Dec 2019 11:06:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icXAW-0008UK-CX for guix-devel@gnu.org; Wed, 04 Dec 2019 11:06:28 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:60599) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1icXAW-0008SI-5u for guix-devel@gnu.org; Wed, 04 Dec 2019 11:06:24 -0500 In-Reply-To: <20191204165038.7a5403f2@interia.pl> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Jan Wielkiewicz Cc: Guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jan Wielkiewicz writes: > Dnia 2019-12-04, o godz. 16:27:26 > Pierre Neidhardt napisa=C5=82(a): > >> You need to export the symbol. >> To do so, you can either specify the symbol in the #:export part of >> the module at the top of the file, or simply use `define-public` when >> defining the variable. > Okay, thanks. > >> Can you give an example? I don't understand what you mean. > I would like to have something like this: > > (define-public jami-apply-dependency-patches > (lambda* (#:key inputs patches dependency-name #:allow-other-keys) > (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patch= es")) > (mkdir-p savoir-faire-linux-patches-directory) > (invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches") > "-C" savoir-faire-linux-patches-directory > "--strip-components=3D5" > (string-append "ring-project/daemon/contrib/src/" > dependency-name)) > (for-each > (lambda (file) > (invoke "patch" "--force" "-p1" "-i" > (string-append savoir-faire-linux-patches-directory "/" > file ".patch"))) > patches)) > #t)) > > And then invoke it like this > (add-after 'unpack 'apply-patches (jami-apply-dependency-patches > #:dependency-name "pjproject" #:patches '(*the list*) #:inputs inputs) You need a lambda here: =2D-8<---------------cut here---------------start------------->8--- (add-after 'unpack 'apply-patches (lambda* (#:key inputs #:allow-other-keys) (let ((my-input (assoc-ref inputs "my-input"))) (jami-apply-dependency-patches #:inputs my-input)))) =2D-8<---------------cut here---------------end--------------->8--- =20 See the other packages for many more examples. Does that make sense? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl3n2XgACgkQm9z0l6S7 zH/mdAf+NOic0XulxZm6cAwv4PCqmIQfXw0+LOE/3qpGSAqv2yq1Y4ua33NZ44gc IJI94obXvBmGUrBgkwm/9dUhBmMUo89z4y48Szjo8XG0vXVYkrsjA5W6StGLqoQP 7YnE+xhWSlWeMIJYqwHEoOdV41OsBnNKBRR1gnAunUwbzk/RDIUuVo4XAR0KuflX KvjHXNdkOaszW9wc3Q4KfESxR3ITeDExOkGbtelMQMyNCw92mGM2Dq98H8K2PDtW CtICQnRJY7b7g0Q93ETLGJVUX1/6Xaft33+aetQ7iKzneCOED6Aa8PjBm69AOLEA WrLQEyTnpSTg1kaTnqkNZsENrsyS1w== =74+y -----END PGP SIGNATURE----- --=-=-=--