From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH] gnu: Add kakoune Date: Fri, 30 Dec 2016 14:25:56 -0500 Message-ID: <20161230192556.GA2668@jasmine> References: <87zijekrns.fsf@zancanaro.id.au> <87y3yykov6.fsf@zancanaro.id.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN2oW-00084w-Fr for guix-devel@gnu.org; Fri, 30 Dec 2016 14:26:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cN2oT-00080s-9t for guix-devel@gnu.org; Fri, 30 Dec 2016 14:26:04 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43310) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cN2oT-0007yv-3M for guix-devel@gnu.org; Fri, 30 Dec 2016 14:26:01 -0500 Content-Disposition: inline In-Reply-To: <87y3yykov6.fsf@zancanaro.id.au> 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: Carlo Zancanaro Cc: guix-devel --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 30, 2016 at 03:44:13PM +1100, Carlo Zancanaro wrote: > From 57b2f9e6af20606e302fc4040515d7a92bde73fc Mon Sep 17 00:00:00 2001 > From: Carlo Zancanaro > Date: Fri, 30 Dec 2016 02:15:59 +1100 > Subject: [PATCH] gnu: Add kakoune > To: guix-devel@gnu.org >=20 > * gnu/packages/patches/kakoune-fix-bash-path.patch: New file. > * gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch: New fil= e. > * gnu/local.mk (dist_patch_DATA): Register patches. > * gnu/packages/text-editors.scm (kakoune): New variable. Thank you! > diff --git a/gnu/packages/patches/kakoune-fix-bash-path.patch b/gnu/packa= ges/patches/kakoune-fix-bash-path.patch > diff --git a/gnu/packages/patches/kakoune-leave-manpages-uncompressed.pat= ch b/gnu/packages/patches/kakoune-leave-manpages-uncompressed.patch Patches require some commentary explaining what problem they are solving and, if the approach they take is unclear, how they do it. If they are copied from somewhere else, they need attribution. In this case, we need to explain why upstream's approach of finding a POSIX shell doesn't work. > diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm > +(define-public kakoune > + (let ((commit "4f986776423f5cd5fd80a16735f873ae23c10da2")) Can you say why you chose this commit? Is it simply the most recent commit when you made the package? > + (package > + (name "kakoune") > + (version (string-append "0.0.1-" (string-take commit 7))) Please add a revision counter, as described in the manual, section 7.6.3 Version Numbers. The resulting version will look like this: > + (version (string-append "0.0.0-" revision "." (string-take commit = 7))) > + (file-name (string-append "kakoune-" version)) Please append '-checkout' to the end of the file-name. > + (add-before 'configure 'patch-bash-path > + (lambda* (#:key inputs #:allow-other-keys) > + (substitute* "src/shell_manager.cc" > + (("__BASH_PATH__") > + (assoc-ref inputs "bash"))))) I wonder if we can do this change all in the same place. It's sort of complicated to use a patch and a substitution. Also, using a patch to get half-way there will cause the source code given by `guix build --source` to be unbuildable, right? So, I think we should find another way to fix whatever is wrong with the shell-finding logic. Perhaps it will require cooperation with the upstream maintainers, I don't know. > + ;; Kakoune doesn't have a configure script, but it still > + ;; requires us to do some setup/configuration. > + (replace 'configure > + (lambda* (#:key outputs #:allow-other-keys) > + ;; Make has to be run in the src/ directory, so let's > + ;; move there now. > + (chdir "src") > + ;; Boost is compiled with the older ABI, so we can't use > + ;; the new ABI if we want to link againt it. > + (setenv "CPPFLAGS" "-D_GLIBCXX_USE_CXX11_ABI=3D0") > + (setenv "PREFIX" (assoc-ref outputs "out")))) I think that CPPFLAGS and PREFIX should be set in #:make-flags. This phase would then be renamed to 'chdir' and we'd delete the 'configure' phase. > + (add-before 'check 'fix-test-permissions > + (lambda* _ > + ;; The tests fail if they can't write over files in the > + ;; test directory, so make sure we can write everywhere > + ;; we might possibly need to. > + (system* "chmod" "-R" "u+w" "../test")))))) This seems like a bug. Can you report it upstream? --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlhmtMEACgkQJkb6MLrK fwguDQ//fPz/bIko+n12bplPGn2ML2sVdff3xVYFpgSFhMZ231rJQZEdNnX2k6Yf co4Vgb5Iwqy7r7SRrYick9Kz296PzDPQ5oMxrTZ5LmBJvxdcMzFPrb6fpqyP8Mtg 1wZ6EdzwoRQIK2qe9mM5s7sJ2yCX38PxuQBGnmNQ4/5g7x2ichpkwk3JHEDcGSC5 Gmzy26YscFgRP4/zf0Po/vikA/kvfwjB0AFLPXn2w+600RTctE5OeIS4T9lgYsAP w8Yw0tKUDgfksJYxp5ZIYI5rlzW352lBgtPZecRiBBFHCiN6+9Kscn3BVXQYLrs5 SOLC4TXPcX49RDSAIiuXPcPvsWxnAfsqCGniCjCpByThyVLkOVumwzVVuFFc1/DD szQS4HoNwGZ36BjXavUUTWUaoZHIbZHbVeTQm6DFaG7TGch6IyH6NiCHVZv8Gq32 mQl5vdrOe7O41B3ToPBmvET2A6hUymuf+x5JshbEpBVzHCvgXK8ViaFtZqmExy+J k73BMMphBuuUJrowlPx35jredIYS+q4Zr7TuuWFBlIbQxr55x8c7ww/m5MOMYd3p wXJM0s0yvN5fC9u8w4paOG0iTdzJYaLriVCOcVfdE6bNRvriIZPcNNGaUkjIEPtG jZisVAE5bUMh1FcdcTEogbyYEhiPZzk7vosEdSKJnvbksYfzO/0= =AA/w -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--