From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Gesthuizen Subject: bug#33359: On emacs-clang-format Date: Mon, 12 Nov 2018 22:40:13 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DMKl5Fe8PuJRYUr8Mcz1E3bR1vMhgT1aj" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJxC-0004HK-E5 for bug-guix@gnu.org; Mon, 12 Nov 2018 16:41:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMJx8-0001WI-DW for bug-guix@gnu.org; Mon, 12 Nov 2018 16:41:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:44136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMJx8-0001W9-82 for bug-guix@gnu.org; Mon, 12 Nov 2018 16:41:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gMJx8-00032Z-4h for bug-guix@gnu.org; Mon, 12 Nov 2018 16:41:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMJwX-0004Eo-Qn for bug-guix@gnu.org; Mon, 12 Nov 2018 16:40:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMJwT-00013f-Qt for bug-guix@gnu.org; Mon, 12 Nov 2018 16:40:25 -0500 Received: from sonic306-21.consmr.mail.ir2.yahoo.com ([77.238.176.207]:33877) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMJwS-00012X-8u for bug-guix@gnu.org; Mon, 12 Nov 2018 16:40:20 -0500 Received: from p5B2219E8.dip0.t-ipconnect.de (EHLO [192.168.178.27]) ([91.34.25.232]) by smtp407.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 01455b9114f6674cc4d30959bca3b0f0 for ; Mon, 12 Nov 2018 21:40:15 +0000 (UTC) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 33359@debbugs.gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DMKl5Fe8PuJRYUr8Mcz1E3bR1vMhgT1aj Content-Type: multipart/mixed; boundary="QROjRNdi0uhyxpfSrUz5NsNhxbsAXPml1"; protected-headers="v1" From: Tim Gesthuizen To: bug-guix@gnu.org Message-ID: Subject: On emacs-clang-format --QROjRNdi0uhyxpfSrUz5NsNhxbsAXPml1 Content-Type: multipart/mixed; boundary="------------AF27A513401B2E5447EF1859" Content-Language: en-US This is a multi-part message in MIME format. --------------AF27A513401B2E5447EF1859 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I noticed that someone packaged emacs-clang-format. There are some problems with the current package definition: - clang already distributes the same functionality (Maybe I am missing a feature that clangs version does not have though). - The package also includes integration for clang-rename. - The package should probably have a more generic name and function as a package for all emacs integration clang offers. - The clang package is installing the same files under share/clang. Maybe those should be removed. - The license is incorrect. The version that is cloned from github also seems to have some licensing issues (Missing full license...) You'll find an example package definition attached. This can probably be optimized a little bit more so that the full clang tarball does not need to be extracted twice. Tim. --------------AF27A513401B2E5447EF1859 Content-Type: text/x-patch; name="0001-gnu-Add-emacs-clang-tooling.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-Add-emacs-clang-tooling.patch" =46rom bc5d4139c28c10fc5a52466fd2b4182560fed8c6 Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Mon, 12 Nov 2018 22:27:41 +0100 Subject: [PATCH] * gnu: Add emacs-clang-tooling. --- gnu/packages/emacs.scm | 73 +++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 3e32998a9..e1e751d4b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -12490,42 +12490,43 @@ correctly.") @end itemize\n") (license license:gpl3+)))) =20 -(define-public emacs-clang-format - (let ((commit "5556c31528af2661bed3011bd63ffc0ed44e18a0")) - (package - (name "emacs-clang-format") - (version (git-version "0.0.0" "1" commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/emacsorphanage/clang-form= at") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0ynvnp3vrcpngmwakb23xv4xn7jbkg43s196q7pg9nkl13x4n2nq"= )))) - (build-system emacs-build-system) - (inputs - `(("clang" ,clang))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'configure - (lambda* (#:key inputs #:allow-other-keys) - (let ((clang (assoc-ref inputs "clang"))) - ;; Repo is read-only. - (chmod "clang-format.el" #o644) - (emacs-substitute-variables "clang-format.el" - ("clang-format-executable" - (string-append clang "/bin/clang-format")))) - #t))))) - (home-page "https://github.com/emacsorphanage/clang-format") - (synopsis "Format code using clang-format") - (description "This package allows to filter code through clang-for= mat to -fix its formatting. @command{clang-format} is a tool that formats C/C++= /Obj-C -code according to a set of style options, see -@url{http://clang.llvm.org/docs/ClangFormatStyleOptions.html}.") - (license license:gpl3+)))) +(define-public emacs-clang-tooling + (package + (inherit clang) + (name "emacs-clang-tooling") + (version (package-version clang)) + (source + (origin + (method url-fetch) + (uri (string-append "http://llvm.org/releases/" + version "/cfe-" version ".src.tar.xz")) + (sha256 (base32 "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3= y93w")) + (snippet + '(begin + (copy-file "tools/clang-rename/clang-rename.el" "clang-rename.el") + (copy-file "tools/clang-format/clang-format.el" "clang-format.el")))= )) + (build-system emacs-build-system) + (inputs + `(("clang" ,clang))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'configure + (lambda* (#:key inputs #:allow-other-keys) + (let ((clang (assoc-ref inputs "clang"))) + ;; Repo is read-only. + (chmod "clang-format.el" #o644) + (emacs-substitute-variables "clang-format.el" + ("clang-format-executable" + (string-append clang "/bin/clang-format"))) + (chmod "clang-rename.el" #o644) + (emacs-substitute-variables "clang-rename.el" + ("clang-rename-binary" + (string-append clang "/bin/clang-rename")))) + #t))))) + (synopsis "Integration of clang-tooling into emacs") + (description "This package provides integration of clang tooling int= o emacs. +It can be used with C/C++/Obj-C code."))) =20 (define-public emacs-gtk-look (package --=20 2.19.1 --------------AF27A513401B2E5447EF1859-- --QROjRNdi0uhyxpfSrUz5NsNhxbsAXPml1-- --DMKl5Fe8PuJRYUr8Mcz1E3bR1vMhgT1aj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEKUiC5+8BRKEri5fa0uWPaa77GdUFAlvp8z4ACgkQ0uWPaa77 GdWlwgf+Mp/SrsJvNVyKQbt+TgHiL1tSDWW2e2DgwtEIIIMrC05vYor0PoeO+cF2 OkAOT8JSj1Ga9nhh8PhchHh2UQB/rkx7Y4JmhokiZFpkp0tBfuasAB/Xmvz6D+v7 mCZF/s+36MwySCon9/tSuASe1Ix7ifYcBiRpiV7bF3KWJX8YAx/z2wQhHxg3udHX FXlVFgz0w4bwUg9IoC2bDH05fZOBP9ByXJTVzc7zu2N9McwKZv0AucjIINd3cMY1 8MvYBkpBuh47mki/KAmahraqq77pBtsy7l2JA1n56P+efR/029GULoviE9cpMwik 4QicDLRtkQz4gJvl8phrXgcwN3gslg== =DYGO -----END PGP SIGNATURE----- --DMKl5Fe8PuJRYUr8Mcz1E3bR1vMhgT1aj--