From unknown Mon Jun 23 04:10:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#27049 <27049@debbugs.gnu.org> To: bug#27049 <27049@debbugs.gnu.org> Subject: Status: [PATCH] gnu: Add mathjax. Reply-To: bug#27049 <27049@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:10:41 +0000 retitle 27049 [PATCH] gnu: Add mathjax. reassign 27049 guix-patches submitter 27049 Arun Isaac severity 27049 normal tag 27049 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue May 23 17:43:58 2017 Received: (at submit) by debbugs.gnu.org; 23 May 2017 21:43:58 +0000 Received: from localhost ([127.0.0.1]:35191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDHav-00056P-Vl for submit@debbugs.gnu.org; Tue, 23 May 2017 17:43:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@bnc3.mailjet.com>) id 1dDHau-00056C-Br for submit@debbugs.gnu.org; Tue, 23 May 2017 17:43:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@bnc3.mailjet.com>) id 1dDHao-0008VF-9w for submit@debbugs.gnu.org; Tue, 23 May 2017 17:43:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50212) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@bnc3.mailjet.com>) id 1dDHao-0008VA-6L for submit@debbugs.gnu.org; Tue, 23 May 2017 17:43:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@bnc3.mailjet.com>) id 1dDHam-0005zx-Rr for guix-patches@gnu.org; Tue, 23 May 2017 17:43:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@bnc3.mailjet.com>) id 1dDHaj-0008Tx-PL for guix-patches@gnu.org; Tue, 23 May 2017 17:43:48 -0400 Received: from o132.p9.mailjet.com ([87.253.234.132]:50068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@bnc3.mailjet.com>) id 1dDHaj-0008Tg-FO for guix-patches@gnu.org; Tue, 23 May 2017 17:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:from:to:subject:date:list-unsubscribe:cc:x-csa-complaints: x-mj-mid:mime-version:content-transfer-encoding; bh=lG7E4f6uzRHF1sbSdTNX6St6SOA=; b=qcrMSKkxWOuRoOiuSdlRDFCIRHe7ce64PL6GPvhyNsuoaQZYQIswmvTSI tVkLb55p+S2311s9D6quTKHmABk2eRm+YHEhBT74GeNrBYJAsopQE74LSef2 nC+rHA/7GNwr1YoVrN9ieiGnNeO+Nmj7gVs4hPvayzQbQx9qZ3ttFQ= Message-Id: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> From: Arun Isaac To: guix-patches@gnu.org Subject: [PATCH] gnu: Add mathjax. Date: Wed, 24 May 2017 03:13:26 +0530 X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0ODhRTTN8fQoCWH6abNn0AiQAFgUc MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) * gnu/packages/web.scm (mathjax): New variable. --- gnu/packages/web.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index bcc20bfdd..84fa3c12f 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -4584,3 +4584,43 @@ allocations, it does not buffer data, it can be inte= rrupted at anytime. Depending on your architecture, it only requires about 40 bytes of data pe= r message stream (in a web server that is per connection).") (license l:expat))) + +(define-public mathjax + (package + (name "mathjax") + (version "2.7.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/mathjax/MathJax/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0sbib5lk0jrvbq6s72ag6ss3wjlz5wnk07ddxij1kp96yg3c1d1b")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + + (let ((install-dir (string-append %output "/share/webapps/mathjax= ")) + (tar (string-append (assoc-ref %build-inputs "tar") "/bin/t= ar")) + (path (string-append (assoc-ref %build-inputs "gzip") "/bin= "))) + (mkdir-p install-dir) + (chdir install-dir) + (setenv "PATH" path) + (system* tar "xvf" (assoc-ref %build-inputs "source") "--strip"= "1"))))) + (native-inputs + `(("gzip" ,gzip) + ("tar" ,tar))) + (home-page "https://www.mathjax.org/") + (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath"= ) + (description "MathJax is a JavaScript display engine for LaTeX, MathML= , +and AsciiMath notation that works in all modern browsers. It requires no +plugins or software to be installed on the browser. So the page author ca= n +write web documents that include mathematics and be confident that readers= will +be able to view it naturally and easily.") + (license l:asl2.0))) --=20 2.12.2 = From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 06:09:54 2017 Received: (at 27049) by debbugs.gnu.org; 24 May 2017 10:09:54 +0000 Received: from localhost ([127.0.0.1]:35526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDTEo-0002Iv-JD for submit@debbugs.gnu.org; Wed, 24 May 2017 06:09:54 -0400 Received: from o124.p8.mailjet.com ([87.253.233.124]:55747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDTEm-0002Il-Eq for 27049@debbugs.gnu.org; Wed, 24 May 2017 06:09:52 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=UDAYM3foo+zc0Kc+N3CVpRqGEx0=; b=L3sZakAnqqCM2Wh051Lo5tYvjDov/LboX7EIg8WORbcJWNTjaX845YiT/ 4J/EXPRbzW/XFxXrb+rPAj/DsS7WuR53vEKrWJ0jSnxS8KXIA5yOIHpWvu58 MRclCMlrKCVYA4tebQsnPBQG3qB64P0GyQCx2wEr9la6+nUXfPO6Bs= Message-Id: MIME-Version: 1.0 From: Arun Isaac To: 27049@debbugs.gnu.org Subject: Re: bug#27049: Acknowledgement ([PATCH] gnu: Add mathjax.) Date: Wed, 24 May 2017 15:39:44 +0530 In-reply-to: References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEEAK7RGvDsAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZJVvvI2YRa7D4Qs21ivDt9OeDHgAFgUc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27049 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > + (let ((install-dir (string-append %output "/share/webapps/mathj= ax")) I don't know if this is the correct path to install mathjax to. Do we have any conventions/standards for this? Should I just put it in /share/mathjax ? = From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 09:16:44 2017 Received: (at 27049) by debbugs.gnu.org; 24 May 2017 13:16:44 +0000 Received: from localhost ([127.0.0.1]:35664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDW9c-0008TQ-6B for submit@debbugs.gnu.org; Wed, 24 May 2017 09:16:44 -0400 Received: from lb1.openmailbox.org ([5.79.108.160]:60340 helo=mail.openmailbox.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDW9a-0008TI-OD for 27049@debbugs.gnu.org; Wed, 24 May 2017 09:16:43 -0400 Received: by mail.openmailbox.org (Postfix, from userid 20002) id 9237F5127C0; Wed, 24 May 2017 15:16:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1495631801; bh=oKqHAEWGXPkQJUijHT/bZGufSL/VQEjxLbdmP7VM/gc=; h=Subject:To:References:From:Date:In-Reply-To:From; b=c5CA3zXYGVPybmWSfhhQif4kzVKGmCTdZMjclCOtwK6lScTnawrCL0cM/x4cy/ctw ZitWFg8YqQ7U4OUf7biXL/JPUhAp0uqYqx5AxDuL1dVd7vUm5NDhoPqTzwHWhD8ei6 C2ZkRNLOmKwrZGiql8ufxRc6kQPkJ4HsjY9c453w= Subject: Re: bug#27049: Acknowledgement ([PATCH] gnu: Add mathjax.) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1495631801; bh=oKqHAEWGXPkQJUijHT/bZGufSL/VQEjxLbdmP7VM/gc=; h=Subject:To:References:From:Date:In-Reply-To:From; b=c5CA3zXYGVPybmWSfhhQif4kzVKGmCTdZMjclCOtwK6lScTnawrCL0cM/x4cy/ctw ZitWFg8YqQ7U4OUf7biXL/JPUhAp0uqYqx5AxDuL1dVd7vUm5NDhoPqTzwHWhD8ei6 C2ZkRNLOmKwrZGiql8ufxRc6kQPkJ4HsjY9c453w= To: 27049@debbugs.gnu.org References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> From: Brendan Tildesley Message-ID: Date: Wed, 24 May 2017 23:16:34 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=big5 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27049 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Arun Isaac ©ó 2017-05-24 20:09 ¼g¹D: > >> + (let ((install-dir (string-append %output "/share/webapps/mathjax")) > I don't know if this is the correct path to install mathjax to. Do we > have any conventions/standards for this? Should I just put it in > /share/mathjax ? > > > I was wondering about this myself. Debian uses /usr/share/javascript/mathjax, so I think we should use /share/javascript/mathjax. a webapps directory implies that we intend to categories "webapp" versus "non-webapp" packages, a functional distinction that seems unimportant to the system as a whole. Debian has a policy of naming JS packages like libjs-mathjax. On the other hand Arch just calls it mathjax. Perhaps these things start to become an issue once we have 20k+ packages, so I'm not sure there. Once this is finalised, I can unbundle mathjax from Calibre, but then the Calibre package will break if mathjax's path changes later on, so we should sort this out now. Perhaps a way to solve it is to consider future Javascript packages, and figure out what the most elegant way to file them would be. I believe there are on the order of 100,000 JS libraries out there in the wild, so I imagine we'll only be getting more and more of them in due time. Perhaps a new gnu/packages/javascript.scm file is ideal? After all, Mathjax is not just code for web browsers, but is also used for MathML support in programs like Calibre's ebook-viewer. Please take the time to think it through and set the convention for future Javascript packages. From debbugs-submit-bounces@debbugs.gnu.org Wed May 24 10:47:19 2017 Received: (at 27049) by debbugs.gnu.org; 24 May 2017 14:47:19 +0000 Received: from localhost ([127.0.0.1]:36346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDXZG-0002HT-HR for submit@debbugs.gnu.org; Wed, 24 May 2017 10:47:18 -0400 Received: from lb1.openmailbox.org ([5.79.108.160]:54301 helo=mail.openmailbox.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dDXZE-0002HK-Pj for 27049@debbugs.gnu.org; Wed, 24 May 2017 10:47:17 -0400 Received: by mail.openmailbox.org (Postfix, from userid 20002) id 680AF518114; Wed, 24 May 2017 16:47:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1495637235; bh=eyvD6DLVYtq5ZxEBKQT750cnSiyQSwHVdgVkZJAowjk=; h=Subject:To:References:From:Date:In-Reply-To:From; b=i5ZEzRip4kTM4LhyeIojNTWeGVs+rnnglZamvV6k0k5E4bPzXcDcyI3hW4DLU3Rr3 cJDjtq/AmPDe2C5o+rgbAd+T85KYBDatA7owyTKbFgwdHp6e9FG7CrGkCsbnFFLJNf W4ZudhNFycRn7x81k6VLR6EQkhXXjbEUUwA8etc0= Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1495637235; bh=eyvD6DLVYtq5ZxEBKQT750cnSiyQSwHVdgVkZJAowjk=; h=Subject:To:References:From:Date:In-Reply-To:From; b=i5ZEzRip4kTM4LhyeIojNTWeGVs+rnnglZamvV6k0k5E4bPzXcDcyI3hW4DLU3Rr3 cJDjtq/AmPDe2C5o+rgbAd+T85KYBDatA7owyTKbFgwdHp6e9FG7CrGkCsbnFFLJNf W4ZudhNFycRn7x81k6VLR6EQkhXXjbEUUwA8etc0= To: 27049@debbugs.gnu.org References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> From: Brendan Tildesley Message-ID: <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> Date: Thu, 25 May 2017 00:47:09 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.8.0 MIME-Version: 1.0 In-Reply-To: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 27049 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Arun Isaac æ–¼ 2017-05-24 07:43 寫é“: > * gnu/packages/web.scm (mathjax): New variable. > [...] > + > + (let ((install-dir (string-append %output "/share/webapps/mathjax")) > + (tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar")) > + (path (string-append (assoc-ref %build-inputs "gzip") "/bin"))) > + (mkdir-p install-dir) > + (chdir install-dir) > + (setenv "PATH" path) > + (system* tar "xvf" (assoc-ref %build-inputs "source") "--strip" "1"))))) This is installing many extraneous files like .gitignore, .npmignore, README.md, CONTRIBUTING, LICENSE, docs/, test/, latest.js. It may be best start with an 'unpack phase, and then install the needed files to the output directory. This package is around 178MiB like it is, and most of that due to the fonts. Would it be better to break this into two packages, mathjax, and font-mathjax? Additionally, programs like Icecat will not be able to find the fonts unless they are under share/font*, so we should also install mathjax/fonts/HTML-CSS/TeX/otf to share/fonts/opentype/mathjax. I think Guix should automatically take care of making that into a hardlink in the store so it isn't duplicated, symlink when installed (everything is already a symlink anyway in Guix) [*] http://docs.mathjax.org/en/latest/installation.html From debbugs-submit-bounces@debbugs.gnu.org Sun May 28 13:41:42 2017 Received: (at 27049) by debbugs.gnu.org; 28 May 2017 17:41:42 +0000 Received: from localhost ([127.0.0.1]:41940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF2CE-0003mC-51 for submit@debbugs.gnu.org; Sun, 28 May 2017 13:41:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF2CC-0003m0-Eq for 27049@debbugs.gnu.org; Sun, 28 May 2017 13:41:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dF2C3-0008DI-6t for 27049@debbugs.gnu.org; Sun, 28 May 2017 13:41:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dF2C3-0008DE-3I; Sun, 28 May 2017 13:41:31 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:49688 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dF2C2-0001JU-Fh; Sun, 28 May 2017 13:41:30 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Brendan Tildesley Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sun, 28 May 2017 19:41:28 +0200 In-Reply-To: <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> (Brendan Tildesley's message of "Thu, 25 May 2017 00:47:09 +1000") Message-ID: <87tw44ri9j.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello, Brendan Tildesley skribis: > Arun Isaac =E6=96=BC 2017-05-24 07:43 =E5=AF=AB=E9=81=93: >> * gnu/packages/web.scm (mathjax): New variable. >> [...] >> + >> + (let ((install-dir (string-append %output "/share/webapps/math= jax")) >> + (tar (string-append (assoc-ref %build-inputs "tar") "/bi= n/tar")) >> + (path (string-append (assoc-ref %build-inputs "gzip") "/= bin"))) >> + (mkdir-p install-dir) >> + (chdir install-dir) >> + (setenv "PATH" path) >> + (system* tar "xvf" (assoc-ref %build-inputs "source") "--str= ip" "1"))))) > This is installing many extraneous files like .gitignore, .npmignore, > README.md, CONTRIBUTING, LICENSE, docs/, test/, latest.js. It may be > best start with an 'unpack phase, and then install the needed files to > the output directory. > This package is around 178MiB like it is, and most of that due to the > fonts. Would it be better to break this into two packages, mathjax, and > font-mathjax? Also, Arun: is this package really source code? Or does it contain =E2=80=9Cminified=E2=80=9D code and also bundles all its dependencies (whic= h would not be okay)? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun May 28 14:44:49 2017 Received: (at 27049) by debbugs.gnu.org; 28 May 2017 18:44:49 +0000 Received: from localhost ([127.0.0.1]:42011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF3BJ-0005Fx-GE for submit@debbugs.gnu.org; Sun, 28 May 2017 14:44:49 -0400 Received: from o148.p9.mailjet.com ([87.253.234.148]:37353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <187f529c.AEUAKlldotoAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZKxqe@bnc3.mailjet.com>) id 1dF3BH-0005Fp-TH for 27049@debbugs.gnu.org; Sun, 28 May 2017 14:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=X+zFSaPJH+F61aFNvvi3p8vDFo4=; b=j9Fprp8txRMoVAmOqeDMCDnqEYB2ubFBdZn+I4lySKGm27YNXF74doWNH CahcqC0xpwjI/hgVw0z77whDfmBDmAJ4rHhols2tgo0jJTvh5FvTgvFsKyke yX24VpPP4hAFDiXhgeDOE6QBhJmBVw8o/7i3qBrPkfwmwmUnaBPS5s= Message-Id: <187f529c.AEUAKlldotoAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZKxqe@mailjet.com> MIME-Version: 1.0 From: Arun Isaac To: Ludovic =?iso-8859-1?q?Court=E8s?= Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. Date: Mon, 29 May 2017 00:14:28 +0530 In-reply-to: <87tw44ri9j.fsf@gnu.org> References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEUAKlldotoAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZKxqe7zghOs0lS0uSaONaXtWJOgAFgUc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27049 Cc: Brendan Tildesley , 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ludovic Courtès writes: > Also, Arun: is this package really source code? Or does it contain > “minified†code and also bundles all its dependencies (which would not > be okay)? Good question! I had assumed it was the full source code without checking carefully! I checked just now. The full source code is in the "unpacked" directory of the tarball. The code in the top level directory of the tarball is minified code. I think we should install only the minified code to share/javascript/mathjax/. And, like Brendan said, we should separate the fonts into a font-mathjax package. And, these fonts should be symlinked into the js-mathjax package. I'm working on both packages. I'll send patches once they are ready. From debbugs-submit-bounces@debbugs.gnu.org Sun May 28 15:42:12 2017 Received: (at 27049) by debbugs.gnu.org; 28 May 2017 19:42:12 +0000 Received: from localhost ([127.0.0.1]:42036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF44q-0006Yk-1G for submit@debbugs.gnu.org; Sun, 28 May 2017 15:42:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dF44o-0006YW-IQ for 27049@debbugs.gnu.org; Sun, 28 May 2017 15:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dF44d-0002U8-FJ for 27049@debbugs.gnu.org; Sun, 28 May 2017 15:42:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dF44d-0002U4-Bc; Sun, 28 May 2017 15:41:59 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:50918 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dF44b-0002TC-In; Sun, 28 May 2017 15:41:57 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arun Isaac Subject: Re: bug#27049: Acknowledgement ([PATCH] gnu: Add mathjax.) References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sun, 28 May 2017 21:41:55 +0200 In-Reply-To: (Arun Isaac's message of "Wed, 24 May 2017 15:39:44 +0530") Message-ID: <87efv8rcos.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Arun Isaac skribis: >> + (let ((install-dir (string-append %output "/share/webapps/math= jax")) > > I don't know if this is the correct path to install mathjax to. Do we > have any conventions/standards for this? Should I just put it in > /share/mathjax ? Maybe share/javascript? Does Node have an opinion on where JS should live? What does Debian do? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 03:48:08 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 07:48:08 +0000 Received: from localhost ([127.0.0.1]:42462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFFPL-0005ED-Sp for submit@debbugs.gnu.org; Mon, 29 May 2017 03:48:08 -0400 Received: from lb1.openmailbox.org ([5.79.108.160]:43536 helo=mail.openmailbox.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFFPJ-0005E4-Gz for 27049@debbugs.gnu.org; Mon, 29 May 2017 03:48:05 -0400 Received: by mail.openmailbox.org (Postfix, from userid 20002) id 7233150F08F; Mon, 29 May 2017 09:48:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1496044084; bh=hmO150bHhSCnJociF5ubMLDZh+lM9lMowKeVpLm6GQo=; h=Subject:References:Cc:From:Date:In-Reply-To:From; b=BGYr3ODrbuofzYLoBbEWJRgrrLPePz9s2MWBNxHJZyOLs8MFoXtZTRYBvf62v7WEL iNLoSdHXxRW3HAgWvu4eI1KL4RZD0N27j8DLlOzMUhjjeJUXQi/+KTgLltGEpupmeu mtKMLwDN+WakKAzB3/uTWrA+2KCZiclzkbuniiRU= Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1496044080; bh=hmO150bHhSCnJociF5ubMLDZh+lM9lMowKeVpLm6GQo=; h=Subject:References:Cc:From:Date:In-Reply-To:From; b=JXGh7ihfXfgAq9VPEFE4llqKRjTWzyI9I45jpt+EZcrmPXTD1hB2loVqkUvi9d1xQ 4cLhYZf3cCWgO3u5xF3czqrw7M/D4gs2OezTf5D4GvZmDQzHUdLXp/wU587ySmQ65h xmEJAt3ELdGrhfDr8KX4mGtUmHWAd8fqebxw9N6Q= References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> From: Brendan Tildesley Message-ID: <9ccc7395-4b97-dc7f-6a51-13923a4f2552@openmailbox.org> Date: Mon, 29 May 2017 17:47:54 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.8.0 MIME-Version: 1.0 In-Reply-To: <87tw44ri9j.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Ludovic Courtès æ–¼ 2017-05-29 03:41 寫é“: > Hello, > > Brendan Tildesley skribis: > >> Arun Isaac æ–¼ 2017-05-24 07:43 寫é“: >> [...] > Also, Arun: is this package really source code? Or does it contain > “minified†code and also bundles all its dependencies (which would not > be okay)? > > Thanks, > Ludo’. It contains both. The jax/ directory contains minified code, and the unpacked/ directory contains the human-readable source. I do not know what the procedure is for minifying javascript. Do you think we should delete the jax/ directory and reconstruct it for unpacked/ as apart of the builder? From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 05:34:32 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 09:34:32 +0000 Received: from localhost ([127.0.0.1]:42553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFH4K-0007lh-FG for submit@debbugs.gnu.org; Mon, 29 May 2017 05:34:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFH4J-0007lS-69 for 27049@debbugs.gnu.org; Mon, 29 May 2017 05:34:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFH4A-0007Y6-VM for 27049@debbugs.gnu.org; Mon, 29 May 2017 05:34:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFH4A-0007Y2-So; Mon, 29 May 2017 05:34:22 -0400 Received: from [193.50.110.67] (port=44328 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFH4A-0000MM-6g; Mon, 29 May 2017 05:34:22 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arun Isaac Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 29 May 2017 11:34:20 +0200 In-Reply-To: (Arun Isaac's message of "Mon, 29 May 2017 00:14:28 +0530") Message-ID: <87zidwatwj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: Brendan Tildesley , 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Arun Isaac skribis: > Ludovic Court=C3=A8s writes: > >> Also, Arun: is this package really source code? Or does it contain >> =E2=80=9Cminified=E2=80=9D code and also bundles all its dependencies (w= hich would not >> be okay)? > > Good question! I had assumed it was the full source code without > checking carefully! I checked just now. The full source code is in the > "unpacked" directory of the tarball. The code in the top level directory > of the tarball is minified code. I think we should install only the > minified code to share/javascript/mathjax/. Yes, but we should treat minified code as =E2=80=9Cobject code=E2=80=9D: we= =E2=80=99d remove it in a snippet and then minify from source. ISTR that the common minifiers depend on a lot of Node packages, so this may be a can of worms. Maybe Jelle or Chris or Dave know more? > And, like Brendan said, we should separate the fonts into a font-mathjax > package. And, these fonts should be symlinked into the js-mathjax > package. Agreed. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 07:13:35 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 11:13:35 +0000 Received: from localhost ([127.0.0.1]:42595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFIcB-0001iC-I7 for submit@debbugs.gnu.org; Mon, 29 May 2017 07:13:35 -0400 Received: from mail.fsfe.org ([217.69.89.162]:38033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFIcA-0001hz-1K for 27049@debbugs.gnu.org; Mon, 29 May 2017 07:13:34 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.fsfe.org (Postfix) with ESMTP id 6A8A663BE9F for <27049@debbugs.gnu.org>; Mon, 29 May 2017 13:13:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.fsfe.org Received: from mail.fsfe.org ([127.0.0.1]) by localhost (cavendish.fsfeurope.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5icc40cbi2BL for <27049@debbugs.gnu.org>; Mon, 29 May 2017 13:13:27 +0200 (CEST) Received: by mail-io0-f178.google.com with SMTP id p24so39526389ioi.0 for <27049@debbugs.gnu.org>; Mon, 29 May 2017 04:13:26 -0700 (PDT) X-Gm-Message-State: AODbwcCZdJbzuJr2ZwSTg2XRDwj+yIxfCToHuVZvRfmdQWtY1ChDrSE4 koPQdl122N8KRNVNanyArECjXTL0Rg== X-Received: by 10.107.164.29 with SMTP id n29mr11813408ioe.227.1496056403473; Mon, 29 May 2017 04:13:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.9.150 with HTTP; Mon, 29 May 2017 04:13:23 -0700 (PDT) In-Reply-To: <87zidwatwj.fsf@gnu.org> References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> <87zidwatwj.fsf@gnu.org> From: Jelle Licht Date: Mon, 29 May 2017 13:13:23 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: multipart/alternative; boundary="001a114644267e606f0550a7c652" X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org, Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --001a114644267e606f0550a7c652 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2017-05-29 11:34 GMT+02:00 Ludovic Court=C3=A8s : > Arun Isaac skribis: > > > Ludovic Court=C3=A8s writes: > > > >> Also, Arun: is this package really source code? Or does it contain > >> =E2=80=9Cminified=E2=80=9D code and also bundles all its dependencies = (which would not > >> be okay)? > > > > Good question! I had assumed it was the full source code without > > checking carefully! I checked just now. The full source code is in the > > "unpacked" directory of the tarball. The code in the top level director= y > > of the tarball is minified code. I think we should install only the > > minified code to share/javascript/mathjax/. > > Yes, but we should treat minified code as =E2=80=9Cobject code=E2=80=9D: = we=E2=80=99d remove it > in a snippet and then minify from source. > > ISTR that the common minifiers depend on a lot of Node packages, so this > may be a can of worms. Maybe Jelle or Chris or Dave know more? > The minifiers I use for work are usually designed as a plugin in a bigger node packages, so they suffer from the bootstrap problem lots of node packages have if you want to build them from source. Maybe we could look for a smaller, standalone minifier package that we could use for all minification needs in guix? I always used uglify-js from before my guix days, so I am not sure how workable it would be to package. > > And, like Brendan said, we should separate the fonts into a font-mathja= x > > package. And, these fonts should be symlinked into the js-mathjax > > package. > > Agreed. > > Thanks! > > Ludo=E2=80=99. > > - Jelle --001a114644267e606f0550a7c652 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-05-29 11:34 GMT+02:00 Ludovic Court=C3=A8s <<= a href=3D"mailto:ludo@gnu.org" target=3D"_blank">ludo@gnu.org>:
Arun Isaac <arunisaac@systemreboot.net> skribis:

> Ludovic Court=C3=A8s writes:
>
>> Also, Arun: is this package really source code?=C2=A0 Or does it c= ontain
>> =E2=80=9Cminified=E2=80=9D code and also bundles all its dependenc= ies (which would not
>> be okay)?
>
> Good question! I had assumed it was the full s= ource code without
> checking carefully! I checked just now. The full source code is in the=
> "unpacked" directory of the tarball. The code in the top lev= el directory
> of the tarball is minified code. I think we should install only the > minified code to share/javascript/mathjax/.

Yes, but we should treat minified code as =E2=80=9Cobject code=E2=80= =9D: we=E2=80=99d remove it
in a snippet and then minify from source.

ISTR that the common minifiers depend on a lot of Node packages, so this may be a can of worms.=C2=A0 Maybe Jelle or Chris or Dave know more?

The minifiers I use for work are usually desi= gned as a plugin in a bigger node packages, so they suffer from the bootstr= ap problem lots of node packages have if you want to build them from source= .
Maybe we could look for a smaller, standalone minifier package that w= e could use for all minification needs in guix? I always used uglify-js fro= m before my guix days, so I am not sure how workable it would be to package= .



> And, like Brendan said, we should separate the fonts into a font-mathj= ax
> package. And, these fonts should be symlinked into the js-mathjax
> package.

Agreed.

Thanks!

Ludo=E2=80=99.


- Jelle
--001a114644267e606f0550a7c652-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 08:05:52 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 12:05:52 +0000 Received: from localhost ([127.0.0.1]:42619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFJQl-0006VT-3L for submit@debbugs.gnu.org; Mon, 29 May 2017 08:05:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFJQj-0006VG-M3 for 27049@debbugs.gnu.org; Mon, 29 May 2017 08:05:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFJQZ-0008Ur-ML for 27049@debbugs.gnu.org; Mon, 29 May 2017 08:05:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFJQZ-0008Un-J3; Mon, 29 May 2017 08:05:39 -0400 Received: from [193.50.110.67] (port=45336 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFJQY-0007Ro-SC; Mon, 29 May 2017 08:05:39 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jelle Licht Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> <87zidwatwj.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 29 May 2017 14:05:36 +0200 In-Reply-To: (Jelle Licht's message of "Mon, 29 May 2017 13:13:23 +0200") Message-ID: <87wp8zamwf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org, Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jelle Licht skribis: > 2017-05-29 11:34 GMT+02:00 Ludovic Court=C3=A8s : > >> Arun Isaac skribis: >> >> > Ludovic Court=C3=A8s writes: >> > >> >> Also, Arun: is this package really source code? Or does it contain >> >> =E2=80=9Cminified=E2=80=9D code and also bundles all its dependencies= (which would not >> >> be okay)? >> > >> > Good question! I had assumed it was the full source code without >> > checking carefully! I checked just now. The full source code is in the >> > "unpacked" directory of the tarball. The code in the top level directo= ry >> > of the tarball is minified code. I think we should install only the >> > minified code to share/javascript/mathjax/. >> >> Yes, but we should treat minified code as =E2=80=9Cobject code=E2=80=9D:= we=E2=80=99d remove it >> in a snippet and then minify from source. >> >> ISTR that the common minifiers depend on a lot of Node packages, so this >> may be a can of worms. Maybe Jelle or Chris or Dave know more? >> > > The minifiers I use for work are usually designed as a plugin in a bigger > node packages, so they suffer from the bootstrap problem lots of node > packages have if you want to build them from source. > Maybe we could look for a smaller, standalone minifier package that we > could use for all minification needs in guix? I always used uglify-js from > before my guix days, so I am not sure how workable it would be to package. What smaller, standalone minifier would you suggest? :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 08:26:23 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 12:26:23 +0000 Received: from localhost ([127.0.0.1]:42627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFJkd-0006xf-BU for submit@debbugs.gnu.org; Mon, 29 May 2017 08:26:23 -0400 Received: from mail.fsfe.org ([217.69.89.162]:42551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFJkb-0006xR-Ig for 27049@debbugs.gnu.org; Mon, 29 May 2017 08:26:22 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.fsfe.org (Postfix) with ESMTP id 08E6E63BF32 for <27049@debbugs.gnu.org>; Mon, 29 May 2017 14:26:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.fsfe.org Received: from mail.fsfe.org ([127.0.0.1]) by localhost (cavendish.fsfeurope.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id runxRD78WO9h for <27049@debbugs.gnu.org>; Mon, 29 May 2017 14:26:14 +0200 (CEST) Received: by mail-it0-f47.google.com with SMTP id c15so26157204ith.0 for <27049@debbugs.gnu.org>; Mon, 29 May 2017 05:26:14 -0700 (PDT) X-Gm-Message-State: AODbwcDow4UbcKtrsD/2/maiNxyL1FHA/JNj7XuWd8YSmqiyoVEGkdgH S5oe3kIFILw7JpDpK8DUINo2Pr+EIA== X-Received: by 10.36.175.22 with SMTP id t22mr16670610ite.112.1496060772107; Mon, 29 May 2017 05:26:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.9.150 with HTTP; Mon, 29 May 2017 05:26:11 -0700 (PDT) In-Reply-To: <87wp8zamwf.fsf@gnu.org> References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> <87zidwatwj.fsf@gnu.org> <87wp8zamwf.fsf@gnu.org> From: Jelle Licht Date: Mon, 29 May 2017 14:26:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: multipart/alternative; boundary="f403045da95ce264180550a8ca49" X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org, Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --f403045da95ce264180550a8ca49 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2017-05-29 14:05 GMT+02:00 Ludovic Court=C3=A8s : > Jelle Licht skribis: > > > 2017-05-29 11:34 GMT+02:00 Ludovic Court=C3=A8s : > > > >> Arun Isaac skribis: > >> > >> > Ludovic Court=C3=A8s writes: > >> > > >> >> Also, Arun: is this package really source code? Or does it contain > >> >> =E2=80=9Cminified=E2=80=9D code and also bundles all its dependenci= es (which would > not > >> >> be okay)? > >> > > >> > Good question! I had assumed it was the full source code without > >> > checking carefully! I checked just now. The full source code is in t= he > >> > "unpacked" directory of the tarball. The code in the top level > directory > >> > of the tarball is minified code. I think we should install only the > >> > minified code to share/javascript/mathjax/. > >> > >> Yes, but we should treat minified code as =E2=80=9Cobject code=E2=80= =9D: we=E2=80=99d remove it > >> in a snippet and then minify from source. > >> > >> ISTR that the common minifiers depend on a lot of Node packages, so th= is > >> may be a can of worms. Maybe Jelle or Chris or Dave know more? > >> > > > > The minifiers I use for work are usually designed as a plugin in a bigg= er > > node packages, so they suffer from the bootstrap problem lots of node > > packages have if you want to build them from source. > > Maybe we could look for a smaller, standalone minifier package that we > > could use for all minification needs in guix? I always used uglify-js > from > > before my guix days, so I am not sure how workable it would be to > package. > > What smaller, standalone minifier would you suggest? :-) > That is an interesting question. A cursory glance at the uglify-js leads me to believe it could probably be packaged. The standard node-in-guix issues apply though: - We do not have a test framework packaged, so running tests to verify that packages actually work is going to be difficult. - We end up with a bare-bones package, as some features require problematic packages (in this case source-maps seems non-trivial to get packaged, due to a dependency on webpack). The package itself does not have knowledge of these issues though, so any attempt to use these unsupported features would lead to a crash. The second point is less of an issue if this minifier packages is only used internally as part of a build process. Another issue with minifiers in general is that is Very Hard to write a proper minifier. If we choose to not use the minifier as expected by the package author, we will at some point run into issues that will be very hard to report and get fixed upstream, as it will only be us experiencing these issues due to our ... unique .. build procedure. > > Ludo=E2=80=99. > Maybe some sustainable progress could be made by abusing pars of guile's JS frontend? The process could go like this: JavaScript source -> AST -> minify identifiers, tree shakers etc -> Serialize AST to minified .js file. - Jelle --f403045da95ce264180550a8ca49 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-05-29 14:05 GMT+02:00 Ludovic Court=C3=A8s <<= a href=3D"mailto:ludo@gnu.org" target=3D"_blank">ludo@gnu.org>:
Jelle Licht <jlicht@fsfe.org> skribis:

> 2017-05-29 11:34 GMT+02:00 Ludovic Court=C3=A8s <ludo@gnu.org>:
>
>> Arun Isaac <aruni= saac@systemreboot.net> skribis:
>>
>> > Ludovic Court=C3=A8s writes:
>> >
>> >> Also, Arun: is this package really source code?=C2=A0 Or = does it contain
>> >> =E2=80=9Cminified=E2=80=9D code and also bundles all its = dependencies (which would not
>> >> be okay)?
>> >
>> > Good question! I had assumed it was the full source code with= out
>> > checking carefully! I checked just now. The full source code = is in the
>> > "unpacked" directory of the tarball. The code in th= e top level directory
>> > of the tarball is minified code. I think we should install on= ly the
>> > minified code to share/javascript/mathjax/.
>>
>> Yes, but we should treat minified code as =E2=80=9Cobject code=E2= =80=9D: we=E2=80=99d remove it
>> in a snippet and then minify from source.
>>
>> ISTR that the common minifiers depend on a lot of Node packages, s= o this
>> may be a can of worms.=C2=A0 Maybe Jelle or Chris or Dave know mor= e?
>>
>
> The minifiers I use for work are usually designed as a plugin in a big= ger
> node packages, so they suffer from the bootstrap problem lots of node<= br> > packages have if you want to build them from source.
> Maybe we could look for a smaller, standalone minifier package that we=
> could use for all minification needs in guix? I always used uglify-js = from
> before my guix days, so I am not sure how workable it would be to pack= age.

What smaller, standalone minifier would you suggest?=C2=A0 :-)

That is an interesting question. A cursory g= lance at the uglify-js leads me to believe it could probably be packaged. T= he standard node-in-guix issues apply though:
- We do not hav= e a test framework packaged, so running tests to verify that packages actua= lly work is going to be difficult.
- We end up with a bare-bo= nes package, as some features require problematic packages (in this case so= urce-maps seems non-trivial to get packaged, due to a dependency on webpack= ). The package itself does not have knowledge of these issues though, so an= y attempt to use these unsupported features would lead to a crash.

=
The second point is less of an issue if this minifier packages i= s only used internally as part of a build process.

Anothe= r issue with minifiers in general is that is Very Hard to write a proper mi= nifier. If we choose to not use the minifier as expected by the package aut= hor, we will at some point run into issues that will be very hard to report= and get fixed upstream, as it will only be us experiencing these issues du= e to our ... unique .. build procedure.
=C2=A0

Ludo=E2=80=99.

May= be some sustainable progress could be made by abusing pars of guile's J= S frontend?
The process could go like this:
Jav= aScript source -> AST -> minify identifiers, tree shakers etc -> S= erialize AST to minified .js file.

- Jelle

<= br>
--f403045da95ce264180550a8ca49-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 12:04:38 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 16:04:38 +0000 Received: from localhost ([127.0.0.1]:43535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFN9l-0003g3-VK for submit@debbugs.gnu.org; Mon, 29 May 2017 12:04:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFN9k-0003fp-IE for 27049@debbugs.gnu.org; Mon, 29 May 2017 12:04:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFN9b-0006ep-AV for 27049@debbugs.gnu.org; Mon, 29 May 2017 12:04:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFN9b-0006el-71; Mon, 29 May 2017 12:04:23 -0400 Received: from [193.50.110.67] (port=46756 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFN9a-0007IE-G4; Mon, 29 May 2017 12:04:22 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jelle Licht Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> <87zidwatwj.fsf@gnu.org> <87wp8zamwf.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 29 May 2017 18:04:19 +0200 In-Reply-To: (Jelle Licht's message of "Mon, 29 May 2017 14:26:11 +0200") Message-ID: <878tlf8xa4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org, Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jelle Licht skribis: > That is an interesting question. A cursory glance at the uglify-js leads = me > to believe it could probably be packaged. The standard node-in-guix issues > apply though: > - We do not have a test framework packaged, so running tests to verify th= at > packages actually work is going to be difficult. > - We end up with a bare-bones package, as some features require problemat= ic > packages (in this case source-maps seems non-trivial to get packaged, due > to a dependency on webpack). The package itself does not have knowledge of > these issues though, so any attempt to use these unsupported features wou= ld > lead to a crash. > > The second point is less of an issue if this minifier packages is only us= ed > internally as part of a build process. OK. > Another issue with minifiers in general is that is Very Hard to write a > proper minifier. If we choose to not use the minifier as expected by the > package author, we will at some point run into issues that will be very > hard to report and get fixed upstream, as it will only be us experiencing > these issues due to our ... unique .. build procedure. Sure. My suggestion would be to use an existing, established minifier, only one that is relatively simple to package. It could be one written in a language other than JS (Ricardo mentioned =E2=80=98cl-uglify-js=E2=80= =99 on IRC), or it could be a simplistic minifier written in JS but with very few or not dependencies, if that exists. > Maybe some sustainable progress could be made by abusing pars of guile's = JS > frontend? > The process could go like this: > JavaScript source -> AST -> minify identifiers, tree shakers etc -> > Serialize AST to minified .js file. That would be an interesting exercise, but probably a more risky approach. :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 14:48:08 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 18:48:08 +0000 Received: from localhost ([127.0.0.1]:43703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFPi3-0002gz-Rh for submit@debbugs.gnu.org; Mon, 29 May 2017 14:48:08 -0400 Received: from o104.p9.mailjet.com ([87.253.234.104]:35356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <4e25e6a3.ADsAAkB0MYMAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZLGzj@bnc3.mailjet.com>) id 1dFPi1-0002go-MO for 27049@debbugs.gnu.org; Mon, 29 May 2017 14:48:06 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=JGVGe4kRlqO3H4uiFoCVMjR+C/Q=; b=pL8z1GPVVlSVYbziqaQBIdGV0ZlKJkxaACoj4SezWWfwTxHd/dA74gKs8 Z7P5K80gVeLci34eNil4he9Aj8HvDvl9kdu+yUTiqiw391trhN02QnTWCp+b tvRzIG6Vp+7aL9mpqu/yEdJSunkR6B2FJ1Wh4XMAtte0f2Z1MdpVMs= Message-Id: <4e25e6a3.ADsAAkB0MYMAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZLGzj@mailjet.com> MIME-Version: 1.0 From: Arun Isaac To: Ludovic =?iso-8859-1?q?Court=E8s?= Subject: Re: bug#27049: Acknowledgement ([PATCH] gnu: Add mathjax.) Date: Tue, 30 May 2017 00:17:54 +0530 In-reply-to: <87efv8rcos.fsf@gnu.org> References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <87efv8rcos.fsf@gnu.org> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: ADsAAkB0MYMAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZLGzjwk1CCqURROyMCasATXTm8AAFgUc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Ludovic Courtès writes: > Arun Isaac skribis: > >>> + (let ((install-dir (string-append %output "/share/webapps/mathjax")) >> >> I don't know if this is the correct path to install mathjax to. Do we >> have any conventions/standards for this? Should I just put it in >> /share/mathjax ? > > Maybe share/javascript? I think we should do /share/javascript/mathjax > Does Node have an opinion on where JS should live? I have never actually used Node, and don't know much about it. Looking at https://stackoverflow.com/questions/5926672/where-does-npm-install-packages it seems that npm, by default, installs to /usr/local/lib/node and /usr/local/lib/node_modules > What does Debian do? Debian puts it under /usr/share/javascript/mathjax/. Debian has both minified code and the full "unpacked" source code installed. From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 15:19:47 2017 Received: (at 27049) by debbugs.gnu.org; 29 May 2017 19:19:47 +0000 Received: from localhost ([127.0.0.1]:43754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFQCd-0003Sb-WF for submit@debbugs.gnu.org; Mon, 29 May 2017 15:19:47 -0400 Received: from o136.p8.mailjet.com ([87.253.233.136]:59026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <07b195fa.AEAAKtBZn0gAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZLHRN@bnc3.mailjet.com>) id 1dFQCc-0003ST-F8 for 27049@debbugs.gnu.org; Mon, 29 May 2017 15:19:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=qj9yuelDbXFirCbpASZGhfhzOrw=; b=iWmSs9mYS+DLDxBIc+rkig0LgHOT0EM1PV7pN0DP51mxY5/vmjC/GiIwL IaJf48r+PsbhNLByjmGCxCQLgdaOC3LjOFPUotUjyTvH7L0yazX/e4/ixVGg 4ih7v4DlMogJWAupnYC6F6i3xcVt73j64+VnANO7lGAFOmM2/oCCrU= Message-Id: <07b195fa.AEAAKtBZn0gAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZLHRN@mailjet.com> MIME-Version: 1.0 From: Arun Isaac To: Ludovic =?iso-8859-1?q?Court=E8s?= Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. Date: Tue, 30 May 2017 00:49:33 +0530 In-reply-to: <878tlf8xa4.fsf@gnu.org> References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> <87zidwatwj.fsf@gnu.org> <87wp8zamwf.fsf@gnu.org> <878tlf8xa4.fsf@gnu.org> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEAAKtBZn0gAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZLHRNIcdHXvs6TX-rQY8vi76cWQAFgUc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 27049 Cc: Brendan Tildesley , 27049@debbugs.gnu.org, Jelle Licht X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) > Sure. My suggestion would be to use an existing, established minifier, > only one that is relatively simple to package. It could be one written > in a language other than JS (Ricardo mentioned ‘cl-uglify-js’ on IRC), > or it could be a simplistic minifier written in JS but with very few or > not dependencies, if that exists. There are several js minifiers written in python. Here's one: https://github.com/tikitu/jsmin/ I've never used it. I only found it five minutes ago with an internet search. But, if appearances are anything, it looks relatively well maintained. From debbugs-submit-bounces@debbugs.gnu.org Mon May 29 20:55:49 2017 Received: (at 27049) by debbugs.gnu.org; 30 May 2017 00:55:49 +0000 Received: from localhost ([127.0.0.1]:43972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFVRs-0008C0-Rm for submit@debbugs.gnu.org; Mon, 29 May 2017 20:55:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44431) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFVRs-0008Bo-6o for 27049@debbugs.gnu.org; Mon, 29 May 2017 20:55:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFVRl-0006qM-Sv for 27049@debbugs.gnu.org; Mon, 29 May 2017 20:55:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFVRh-0006pY-AX; Mon, 29 May 2017 20:55:37 -0400 Received: from localhost ([::1]:41298 helo=mikegerwitz-pc.gerwitz.local) by fencepost.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1dFVRg-0008PE-LA; Mon, 29 May 2017 20:55:36 -0400 From: Mike Gerwitz To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#27049: [PATCH] gnu: Add mathjax. In-Reply-To: <878tlf8xa4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 29 May 2017 18:04:19 +0200") Date: Mon, 29 May 2017 20:55:14 -0400 Message-ID: <87a85vxix9.fsf@gnu.org> References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> <3dec65bd-ffb9-ad71-8c0c-c374fd342ab8@openmailbox.org> <87tw44ri9j.fsf@gnu.org> <87zidwatwj.fsf@gnu.org> <87wp8zamwf.fsf@gnu.org> <878tlf8xa4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org, Jelle Licht X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, May 29, 2017 at 18:04:19 +0200, Ludovic Court=C3=A8s wrote: > Jelle Licht skribis: >> Another issue with minifiers in general is that is Very Hard to write a >> proper minifier. If we choose to not use the minifier as expected by the >> package author, we will at some point run into issues that will be very >> hard to report and get fixed upstream, as it will only be us experiencing >> these issues due to our ... unique .. build procedure. > > Sure. My suggestion would be to use an existing, established minifier, > only one that is relatively simple to package. It could be one written > in a language other than JS (Ricardo mentioned =E2=80=98cl-uglify-js=E2= =80=99 on IRC), > or it could be a simplistic minifier written in JS but with very few or > not dependencies, if that exists. Further, minifiers have various options and some methods are more aggressive than others. Last I checked a couple years ago, for example, Closure Compiler broke GNU ease.js on its more aggressive setting. The break was obvious from running my test suite, but some breaks were subtle and would have caused nightmares in production. Perhaps things have since improved. My point is, though, that Jelle's concerns are shared. Closure Compiler is written by Google, and they tend to know what they're doing in this area. ;) I'm not saying I'm opposed; it sounds fine to me. Just be careful! =2D-=20 Mike Gerwitz Free Software Hacker+Activist | GNU Maintainer & Volunteer GPG: D6E9 B930 028A 6C38 F43B 2388 FEF6 3574 5E6F 6D05 https://mikegerwitz.com --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJZLMLzAAoJEIyRe39dxRuiwZ0QAK0mioudoIwSJIyfhsBq6SI/ chsZG8MFqs0QNCmjK7hPPQbqGlpnkqaB4s/CgmkpkEUSpd+Wna9davG7AvmBcD7m Vli1W5rjR2L2wcgixpNOPYhGr6XF7JOrx9dWUmIXnB12N+zcrMVsLj+oV8QHhwye JlKL4xymCsZCQG9eQMhWbnZ+YtX0Wn5Fomxxv3iJG3dnNR96yRwQQUo3okqtrpKH Wl9kT92MoQytIWO0GZgEaXM7Dv3ts6sZDs7Q4Dakn9ZuTAtBinz6db0L/Bq+vvTD KGTYn/Rkisuu9XyB1BhuB/Ru5dpwq9RWVbz7P+1sRT+QetduJ3e8HSrbeXKdxp7G CNxHnxEbYOVWQEm2d6pGA8uCa9sVM/cVnExIFHh3R36HALSHNxCT2eZBswwEqVjW HokRhtjPRySkLZcFDg4HBhoDmbP+rjP5PuYuz/HyEcV0ahQ9RIzUwd6xfmZVeqVV B6ExZ0TQMWww8ugFigMe/+16CJ5K61QeaO45GA4+T7kCqd8bWgE4vi9IHBirRVch DJ3YyHTOH8+iS7Abu1rdpaoosVphZehEhPkpA+8jwiGami27cF2hP8ucskEojNeN KafdCG9ko4BfC5RrfQ59gc2BDXwwmtIw2SIvkCs1BXtAhAFzrxBZ3NpOAJEjiFLH yUe6UG0GPc2/lNLqH1QJ =ulS1 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 02 16:33:34 2017 Received: (at 27049) by debbugs.gnu.org; 2 Jun 2017 20:33:34 +0000 Received: from localhost ([127.0.0.1]:51933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGtGE-00089D-3P for submit@debbugs.gnu.org; Fri, 02 Jun 2017 16:33:34 -0400 Received: from o115.p9.mailjet.com ([87.253.234.115]:55025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGtGD-000896-1y for 27049@debbugs.gnu.org; Fri, 02 Jun 2017 16:33:29 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:x-csa-complaints: x-mj-mid:content-type:content-transfer-encoding; bh=CIuU4VHoV3Gf/tcZn16uMhm3FEM=; b=AgcAXGFcu24rteqEv7LwSQETgnWv0NKBRz3KKvEWWX0f28XqN0t87jVof KURZOCgpASHA4rfWtinNC3RbHBLFt1svt3mNyKhjUloMgPfJ7skptfWeOfs3 Kpc0s6rMHJBrCxO4OTPIEhCkwwgntma9Dn/l8smLzvESeENa+eP+rc= Message-Id: MIME-Version: 1.0 From: Arun Isaac To: 27049@debbugs.gnu.org Subject: [PATCH 1/2] gnu: Add font-mathjax. Date: Sat, 3 Jun 2017 02:03:07 +0530 X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEQALGA6JBUAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuYqnxPk-qUTb-oF4cgJ1wnyAAFgUc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27049 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) * gnu/packages/fonts.scm (font-mathjax): New variable. --- gnu/packages/fonts.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 73d76a461..15f70dddd 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2017 Alex Griffin ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2017 Brendan Tildesley +;;; Copyright © 2017 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -1227,3 +1228,46 @@ Ensuring readability and clarity at both large and small sizes, these icons have been optimized for beautiful display on all common platforms and display resolutions.") (license license:asl2.0))) + +(define-public font-mathjax + (package + (name "font-mathjax") + (version "2.7.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/mathjax/MathJax/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0sbib5lk0jrvbq6s72ag6ss3wjlz5wnk07ddxij1kp96yg3c1d1b")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 match)) + (setenv "PATH" (string-join (map (match-lambda + ((_ . input-path) + (string-append input-path "/bin"))) + %build-inputs) + ":")) + (let ((install-directory (string-append %output "/share/fonts/mathjax"))) + (mkdir-p install-directory) + (zero? (system* "tar" "-C" install-directory "-xvf" + (assoc-ref %build-inputs "source") + "MathJax-2.7.1/fonts" "--strip" "2")))))) + (native-inputs + `(("gzip" ,gzip) + ("tar" ,tar))) + (home-page "https://www.mathjax.org/") + (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath") + (description "MathJax is a JavaScript display engine for LaTeX, MathML, +and AsciiMath notation that works in all modern browsers. It requires no +plugins or software to be installed on the browser. So the page author can +write web documents that include mathematics and be confident that readers will +be able to view it naturally and easily.") + (license license:asl2.0))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 02 16:33:34 2017 Received: (at 27049) by debbugs.gnu.org; 2 Jun 2017 20:33:35 +0000 Received: from localhost ([127.0.0.1]:51935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGtGI-00089Q-JP for submit@debbugs.gnu.org; Fri, 02 Jun 2017 16:33:34 -0400 Received: from o145.p8.mailjet.com ([87.253.233.145]:49335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <846e49f4.AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuW@bnc3.mailjet.com>) id 1dGtGB-000893-UW for 27049@debbugs.gnu.org; Fri, 02 Jun 2017 16:33:31 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=cpwWkumiRN24SBYTtCFpyxZfKJc=; b=KPruMOWmgNhguK6hC8FPoFtd8gabi4fIrgE1T01J4KvM2CkGXlqwrZ22t FGi2ZwHU+nTiwbYBZ7kKfYYIaeugR80BauPdwcfiCIF33efotKeYO9lNR2wr kZ4d7F2vlbp7cRX42gUDeQMxwOTLqKieoLOyOXMBeuMRKirfs2m7oc= Message-Id: <846e49f4.AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuW@mailjet.com> MIME-Version: 1.0 From: Arun Isaac To: 27049@debbugs.gnu.org Subject: [PATCH 2/2] gnu: Add js-mathjax. Date: Sat, 3 Jun 2017 02:03:08 +0530 In-Reply-To: <20170602203308.7606-1-arunisaac@systemreboot.net> References: <20170602203308.7606-1-arunisaac@systemreboot.net> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuWc5dZed5yQeO0MHy9WkgKygAFgUc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27049 Cc: Arun Isaac X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/javascript.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/javascript.scm (js-mathjax): New variable. --- gnu/local.mk | 1 + gnu/packages/javascript.scm | 90 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 gnu/packages/javascript.scm diff --git a/gnu/local.mk b/gnu/local.mk index e7d5ee2f4..efeb57ab9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -208,6 +208,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/irc.scm \ %D%/packages/iso-codes.scm \ %D%/packages/java.scm \ + %D%/packages/javascript.scm \ %D%/packages/jemalloc.scm \ %D%/packages/jrnl.scm \ %D%/packages/julia.scm \ diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm new file mode 100644 index 000000000..de8567dc4 --- /dev/null +++ b/gnu/packages/javascript.scm @@ -0,0 +1,90 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Arun Isaac +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages javascript) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages fonts) + #:use-module (gnu packages lisp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system trivial)) + +(define-public js-mathjax + (package + (name "js-mathjax") + (version "2.7.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/mathjax/MathJax/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0sbib5lk0jrvbq6s72ag6ss3wjlz5wnk07ddxij1kp96yg3c1d1b")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 match) + (ice-9 regex)) + (setenv "PATH" (string-join (map (match-lambda + ((_ . input-path) + (string-append input-path "/bin"))) + %build-inputs) + ":")) + (let ((install-directory (string-append %output "/share/javascript/mathjax"))) + (system* "tar" "xvf" (assoc-ref %build-inputs "source") + "MathJax-2.7.1/unpacked" "--strip" "2") + (mkdir-p install-directory) + (symlink (string-append (assoc-ref %build-inputs "font-mathjax") + "/share/fonts/mathjax") + (string-append install-directory "/fonts")) + + (for-each + (lambda (file) + (let ((install-path (string-append install-directory + ;; remove prefix "." + (string-drop file 1)))) + (format #t "~a -> ~a~%" file install-path) + (cond + ((string-match "\\.js$" file) + (mkdir-p (dirname install-path)) + (system (format #f "uglify-js ~a > ~a" file install-path))) + (else + (install-file file (dirname install-path)))))) + (find-files ".")))))) + (native-inputs + `(("font-mathjax" ,font-mathjax) + ("gzip" ,gzip) + ("tar" ,tar) + ("uglify-js" ,uglify-js))) + (home-page "https://www.mathjax.org/") + (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath") + (description "MathJax is a JavaScript display engine for LaTeX, MathML, +and AsciiMath notation that works in all modern browsers. It requires no +plugins or software to be installed on the browser. So the page author can +write web documents that include mathematics and be confident that readers will +be able to view it naturally and easily.") + (license license:asl2.0))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 02 16:38:09 2017 Received: (at 27049) by debbugs.gnu.org; 2 Jun 2017 20:38:09 +0000 Received: from localhost ([127.0.0.1]:51944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGtKj-0008Ft-BG for submit@debbugs.gnu.org; Fri, 02 Jun 2017 16:38:09 -0400 Received: from o169.p9.mailjet.com ([87.253.234.169]:45866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGtKi-0008Fl-2y for 27049@debbugs.gnu.org; Fri, 02 Jun 2017 16:38:08 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=tVrDOK9sSdIKME5i0jKPinEIdHE=; b=SzWCXvb05jW2FBiskCbKbTa5wqT6FG6JEA7CjufShHuFTp/WpnM/BWqCg 1SZQbnCaeYgfrJJ8SPw6JqqHRS+W7ozYoAKoD+esbymgCwJVBeCrV09FCq1w V23fpMG4+DUtTOmjq0SjIoitk86EhfynIuy0Jm1n8o5ozpiwQvu5W4= Message-Id: MIME-Version: 1.0 From: Arun Isaac To: 27049@debbugs.gnu.org Subject: Re: [PATCH 2/2] gnu: Add js-mathjax. Date: Sat, 03 Jun 2017 02:07:58 +0530 In-reply-to: <20170602203308.7606-2-arunisaac@systemreboot.net> References: <20170602203308.7606-1-arunisaac@systemreboot.net> <20170602203308.7606-2-arunisaac@systemreboot.net> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEAAK4p8Z1cAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcyvVWKUwgtDRsavw_E-HJ791AAFgUc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27049 Cc: Brendan Tildesley , Ludovic =?iso-8859-1?q?Court=E8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) These are WIP patches. Please provide feedback. > + (setenv "PATH" (string-join (map (match-lambda > + ((_ . input-path) > + (string-append input-path "= /bin"))) > + %build-inputs) > + ":")) It would be nice if this was handled by the trivial-build-system itself. Almost all trivial-build-system packages I can think of need some variant of this. > + (cond > + ((string-match "\\.js$" file) > + (mkdir-p (dirname install-path)) > + (system (format #f "uglify-js ~a > ~a" file install-pa= th))) I have to use `system' instead of `system*' here, because I need to make use of ">" to redirect output to a file. While minifying some files, an ascii decoding error is reported. I'm yet to sort that out. = From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 09:30:40 2017 Received: (at 27049) by debbugs.gnu.org; 3 Jun 2017 13:30:40 +0000 Received: from localhost ([127.0.0.1]:52474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH98Z-0005O7-R4 for submit@debbugs.gnu.org; Sat, 03 Jun 2017 09:30:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH98X-0005Nq-Ky for 27049@debbugs.gnu.org; Sat, 03 Jun 2017 09:30:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dH98R-0007gi-IM for 27049@debbugs.gnu.org; Sat, 03 Jun 2017 09:30:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dH98L-0007ad-Oh; Sat, 03 Jun 2017 09:30:25 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:44742 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dH98K-0008Iv-Ts; Sat, 03 Jun 2017 09:30:25 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arun Isaac Subject: Re: [PATCH 2/2] gnu: Add js-mathjax. References: <20170602203308.7606-1-arunisaac@systemreboot.net> <20170602203308.7606-2-arunisaac@systemreboot.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sat, 03 Jun 2017 15:30:22 +0200 In-Reply-To: (Arun Isaac's message of "Sat, 03 Jun 2017 02:07:58 +0530") Message-ID: <87tw3xmc5t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: Brendan Tildesley , 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, Arun Isaac skribis: > These are WIP patches. Please provide feedback. > >> + (setenv "PATH" (string-join (map (match-lambda >> + ((_ . input-path) >> + (string-append input-path = "/bin"))) >> + %build-inputs) >> + ":")) > > It would be nice if this was handled by the trivial-build-system > itself. Almost all trivial-build-system packages I can think of need > some variant of this. You could use =E2=80=98set-path-environment-variable=E2=80=99 from (guix bu= ild utils) to slightly simplify this. >> + (cond >> + ((string-match "\\.js$" file) >> + (mkdir-p (dirname install-path)) >> + (system (format #f "uglify-js ~a > ~a" file install-p= ath))) > > I have to use `system' instead of `system*' here, because I need to make > use of ">" to redirect output to a file. That=E2=80=99s OK, though you could also use =E2=80=98open-input-pipe=E2=80= =99 from (ice-9 popen): (let ((minified (open-pipe* OPEN_READ "uglify-js" file))) (call-with-output-file installed (lambda (port) (dump-port minified port)))) > While minifying some files, an ascii decoding error is reported. I'm yet > to sort that out. You might need to run that in a UTF-8 locale, which requires adding glibc-utf8-locales as an input etc. HTH! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 09:51:57 2017 Received: (at 27049) by debbugs.gnu.org; 3 Jun 2017 13:51:57 +0000 Received: from localhost ([127.0.0.1]:52482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH9TB-0005wB-0M for submit@debbugs.gnu.org; Sat, 03 Jun 2017 09:51:57 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43135) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH9T9-0005vw-BV for 27049@debbugs.gnu.org; Sat, 03 Jun 2017 09:51:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dH9T1-0005er-6L for 27049@debbugs.gnu.org; Sat, 03 Jun 2017 09:51:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dH9T1-0005eg-3H; Sat, 03 Jun 2017 09:51:47 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:44944 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dH9T0-0000vy-Ea; Sat, 03 Jun 2017 09:51:46 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arun Isaac Subject: Re: bug#27049: [PATCH 1/2] gnu: Add font-mathjax. References: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sat, 03 Jun 2017 15:51:44 +0200 In-Reply-To: (Arun Isaac's message of "Sat, 3 Jun 2017 02:03:07 +0530") Message-ID: <877f0tmb67.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi Arun, Arun Isaac skribis: > * gnu/packages/fonts.scm (font-mathjax): New variable. [...] > +(define-public font-mathjax > + (package > + (name "font-mathjax") > + (version "2.7.1") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + "https://github.com/mathjax/MathJax/archive/" > + version ".tar.gz")) > + (file-name (string-append name "-" version ".tar.gz")) > + (sha256 > + (base32 > + "0sbib5lk0jrvbq6s72ag6ss3wjlz5wnk07ddxij1kp96yg3c1d1b")))) Should it be: (source (package-source mathjax)) to make sure the two packages are kept in sync? > + (home-page "https://www.mathjax.org/") > + (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMat= h") > + (description "MathJax is a JavaScript display engine for LaTeX, Math= ML, > +and AsciiMath notation that works in all modern browsers. It requires no > +plugins or software to be installed on the browser. So the page author = can > +write web documents that include mathematics and be confident that reade= rs will > +be able to view it naturally and easily.") > + (license license:asl2.0))) I think the synopsis/description should be updated to mention that this package simply provides the font used by MathJax, no? Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 03 09:53:59 2017 Received: (at 27049) by debbugs.gnu.org; 3 Jun 2017 13:54:00 +0000 Received: from localhost ([127.0.0.1]:52487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH9V9-0005zW-Cr for submit@debbugs.gnu.org; Sat, 03 Jun 2017 09:53:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dH9V4-0005zF-QX for 27049@debbugs.gnu.org; Sat, 03 Jun 2017 09:53:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dH9Uv-0007LJ-Pp for 27049@debbugs.gnu.org; Sat, 03 Jun 2017 09:53:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dH9Uv-0007L9-MJ; Sat, 03 Jun 2017 09:53:45 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:44946 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dH9Uv-00019I-1F; Sat, 03 Jun 2017 09:53:45 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arun Isaac Subject: Re: bug#27049: [PATCH 2/2] gnu: Add js-mathjax. References: <20170602203308.7606-1-arunisaac@systemreboot.net> <846e49f4.AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuW@mailjet.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sat, 03 Jun 2017 15:53:42 +0200 In-Reply-To: <846e49f4.AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuW@mailjet.com> (Arun Isaac's message of "Sat, 3 Jun 2017 02:03:08 +0530") Message-ID: <87zidpkwih.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Arun Isaac skribis: > * gnu/packages/javascript.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * gnu/packages/javascript.scm (js-mathjax): New variable. [...] > + (for-each > + (lambda (file) > + (let ((install-path (string-append install-directory > + ;; remove prefix "." > + (string-drop file 1)))) > + (format #t "~a -> ~a~%" file install-path) > + (cond > + ((string-match "\\.js$" file) > + (mkdir-p (dirname install-path)) > + (system (format #f "uglify-js ~a > ~a" file install-pa= th))) > + (else > + (install-file file (dirname install-path)))))) > + (find-files ".")))))) Nitpick: in GNU =E2=80=9Cpath=E2=80=9D is used to denote search paths; we u= se =E2=80=9Cfile names=E2=80=9D for files. So s/install-path/installed-file/ or something l= ike that. (I already wrote about =E2=80=98system=E2=80=99 in another message.) Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 14:58:04 2017 Received: (at 27049) by debbugs.gnu.org; 4 Jun 2017 18:58:04 +0000 Received: from localhost ([127.0.0.1]:56113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHais-0006IO-CA for submit@debbugs.gnu.org; Sun, 04 Jun 2017 14:58:04 -0400 Received: from o140.p9.mailjet.com ([87.253.234.140]:56009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <88a929ca.AEQALLKfIdIAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZNFgw@bnc3.mailjet.com>) id 1dHain-0006IE-NO for 27049@debbugs.gnu.org; Sun, 04 Jun 2017 14:57:57 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type; bh=V0pfDjztepgmWB077Kgb6y81diY=; b=U0dI4VD0eLDvOCdaQGcNzcOr0jYauhdzIzllvJ1v+zIFwN/QCVXTr+pdB kvEJViihCzLz8UHrVV3gJeeq1wyNvywcH3ljXx1w7hdLwsMcuUIR7kRExIA5 yvQLmXjvBM6xkoKnfCxWiGd14THmy8mAYydUMQWVFK8jjZH/lCNqbo= Message-Id: <88a929ca.AEQALLKfIdIAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZNFgw@mailjet.com> MIME-Version: 1.0 From: Arun Isaac To: Ludovic =?iso-8859-1?q?Court=E8s?= Subject: Re: bug#27049: [PATCH 2/2] gnu: Add js-mathjax. Date: Mon, 05 Jun 2017 00:27:39 +0530 In-reply-to: <87zidpkwih.fsf@gnu.org> References: <20170602203308.7606-1-arunisaac@systemreboot.net> <846e49f4.AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuW@mailjet.com> <87zidpkwih.fsf@gnu.org> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEQALLKfIdIAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZNFgwO0zQnOtlQECu-m8LoEPUUgAFgUc Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I've made all suggested changes. Please find attached a new patchset. = --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=mathjax-series.patch Content-Transfer-Encoding: 8bit >From 7d843968b04960c93b7238cb4557064d03ef4f84 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 3 Jun 2017 01:42:15 +0530 Subject: [PATCH 1/2] gnu: Add font-mathjax. * gnu/packages/fonts.scm (font-mathjax): New variable. --- gnu/packages/fonts.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 73d76a461..59e60dc29 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2017 Alex Griffin ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2017 Brendan Tildesley +;;; Copyright © 2017 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -1227,3 +1228,42 @@ Ensuring readability and clarity at both large and small sizes, these icons have been optimized for beautiful display on all common platforms and display resolutions.") (license license:asl2.0))) + +(define-public font-mathjax + (package + (name "font-mathjax") + (version "2.7.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/mathjax/MathJax/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0sbib5lk0jrvbq6s72ag6ss3wjlz5wnk07ddxij1kp96yg3c1d1b")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 match)) + (set-path-environment-variable + "PATH" '("bin") (map (match-lambda + ((_ . input) + input)) + %build-inputs)) + (let ((install-directory (string-append %output "/share/fonts/mathjax"))) + (mkdir-p install-directory) + (zero? (system* "tar" "-C" install-directory "-xvf" + (assoc-ref %build-inputs "source") + "MathJax-2.7.1/fonts" "--strip" "2")))))) + (native-inputs + `(("gzip" ,gzip) + ("tar" ,tar))) + (home-page "https://www.mathjax.org/") + (synopsis "Fonts for MathJax") + (description "This package contains the fonts required for MathJax.") + (license license:asl2.0))) -- 2.12.2 >From 01850ce06c0a55677266bae865a3c16e4f710094 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 3 Jun 2017 01:57:51 +0530 Subject: [PATCH 2/2] gnu: Add js-mathjax. * gnu/packages/javascript.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/javascript.scm (js-mathjax): New variable. --- gnu/local.mk | 1 + gnu/packages/javascript.scm | 85 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 gnu/packages/javascript.scm diff --git a/gnu/local.mk b/gnu/local.mk index 0449e8adc..0ab215971 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -208,6 +208,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/irc.scm \ %D%/packages/iso-codes.scm \ %D%/packages/java.scm \ + %D%/packages/javascript.scm \ %D%/packages/jemalloc.scm \ %D%/packages/jrnl.scm \ %D%/packages/julia.scm \ diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm new file mode 100644 index 000000000..6746ad1d2 --- /dev/null +++ b/gnu/packages/javascript.scm @@ -0,0 +1,85 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Arun Isaac +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages javascript) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages fonts) + #:use-module (gnu packages lisp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system trivial)) + +(define-public js-mathjax + (package + (inherit font-mathjax) + (name "js-mathjax") + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils) + (ice-9 match) + (ice-9 popen) + (ice-9 regex)) + (set-path-environment-variable + "PATH" '("bin") (map (match-lambda + ((_ . input) + input)) + %build-inputs)) + (set-path-environment-variable + "GUIX_LOCPATH" '("lib/locale") + (list (assoc-ref %build-inputs "glibc-utf8-locales"))) + (setenv "LANG" "en_US.UTF-8") + (let ((install-directory (string-append %output "/share/javascript/mathjax"))) + (system* "tar" "xvf" (assoc-ref %build-inputs "source") + "MathJax-2.7.1/unpacked" "--strip" "2") + (mkdir-p install-directory) + (symlink (string-append (assoc-ref %build-inputs "font-mathjax") + "/share/fonts/mathjax") + (string-append install-directory "/fonts")) + + (for-each + (lambda (file) + (let ((installed (string-append install-directory + ;; remove prefix "." + (string-drop file 1)))) + (format #t "~a -> ~a~%" file installed) + (cond + ((string-match "\\.js$" file) + (mkdir-p (dirname installed)) + (let ((minified (open-pipe* OPEN_READ "uglify-js" file))) + (call-with-output-file installed + (lambda (port) + (dump-port minified port))))) + (else + (install-file file (dirname installed)))))) + (find-files ".")))))) + (native-inputs + `(("font-mathjax" ,font-mathjax) + ("glibc-utf8-locales" ,glibc-utf8-locales) + ("uglify-js" ,uglify-js) + ,@(package-native-inputs font-mathjax))) + (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath") + (description "MathJax is a JavaScript display engine for LaTeX, MathML, +and AsciiMath notation that works in all modern browsers. It requires no +plugins or software to be installed on the browser. So the page author can +write web documents that include mathematics and be confident that readers will +be able to view it naturally and easily."))) -- 2.12.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 05 06:10:28 2017 Received: (at 27049) by debbugs.gnu.org; 5 Jun 2017 10:10:28 +0000 Received: from localhost ([127.0.0.1]:56500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHoxw-0005mZ-De for submit@debbugs.gnu.org; Mon, 05 Jun 2017 06:10:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHoxt-0005mL-4Q for 27049@debbugs.gnu.org; Mon, 05 Jun 2017 06:10:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHoxj-0001F5-Rd for 27049@debbugs.gnu.org; Mon, 05 Jun 2017 06:10:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHoxj-0001Eu-Ny; Mon, 05 Jun 2017 06:10:15 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:58826 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dHoxj-0001h8-0J; Mon, 05 Jun 2017 06:10:15 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Arun Isaac Subject: Re: bug#27049: [PATCH 2/2] gnu: Add js-mathjax. References: <20170602203308.7606-1-arunisaac@systemreboot.net> <846e49f4.AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuW@mailjet.com> <87zidpkwih.fsf@gnu.org> <5f4eeea0.AEQALLKfIdMAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZNFgw@mailjet.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 05 Jun 2017 12:10:12 +0200 In-Reply-To: <5f4eeea0.AEQALLKfIdMAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZNFgw@mailjet.com> (Arun Isaac's message of "Mon, 05 Jun 2017 00:27:39 +0530") Message-ID: <871sqyg2yj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27049 Cc: 27049@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Arun Isaac skribis: > I've made all suggested changes. Please find attached a new patchset. > > From 7d843968b04960c93b7238cb4557064d03ef4f84 Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Sat, 3 Jun 2017 01:42:15 +0530 > Subject: [PATCH 1/2] gnu: Add font-mathjax. > > * gnu/packages/fonts.scm (font-mathjax): New variable. [...] > From 01850ce06c0a55677266bae865a3c16e4f710094 Mon Sep 17 00:00:00 2001 > From: Arun Isaac > Date: Sat, 3 Jun 2017 01:57:51 +0530 > Subject: [PATCH 2/2] gnu: Add js-mathjax. > > * gnu/packages/javascript.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * gnu/packages/javascript.scm (js-mathjax): New variable. Both LGTM, thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 05 09:48:30 2017 Received: (at 27049-done) by debbugs.gnu.org; 5 Jun 2017 13:48:30 +0000 Received: from localhost ([127.0.0.1]:56647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHsMw-0007n2-L2 for submit@debbugs.gnu.org; Mon, 05 Jun 2017 09:48:30 -0400 Received: from o137.p9.mailjet.com ([87.253.234.137]:40253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <4624319a.AEEALa0qtSwAAAAAAAAAAAPHXLgAAAACwQwAAAAAAAW9WABZNWEg@bnc3.mailjet.com>) id 1dHsMv-0007ms-5I for 27049-done@debbugs.gnu.org; Mon, 05 Jun 2017 09:48:29 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc3.mailjet.com; i=arunisaac=3Dsystemreboot.net@bnc3.mailjet.com; s=mailjet; h=message-id:mime-version:from:to:subject:date:list-unsubscribe:cc:in-reply-to: references:x-csa-complaints:x-mj-mid:content-type:content-transfer-encoding; bh=SeCEuW4umqaR6PlCo/hcsNEEd8A=; b=pYUujlgCOSzQqkx8IC+eQCfpJulu+/1Kd0rFfdG4XU5IzWQ4dY9UxiweH OowCvGzW4Oq1Vbr18f0n0Jgx8dGdaMxl6aQ8/sIietOXJ8eOkzQftUl2nyRZ zZBBIjSWY6TiBZyp8An5/0eW8EMqAHeZA1fLZNGqVmec/QohUBk8+4= Message-Id: <4624319a.AEEALa0qtSwAAAAAAAAAAAPHXLgAAAACwQwAAAAAAAW9WABZNWEg@mailjet.com> MIME-Version: 1.0 From: Arun Isaac To: Ludovic =?iso-8859-1?q?Court=E8s?= Subject: Re: bug#27049: [PATCH 2/2] gnu: Add js-mathjax. Date: Mon, 05 Jun 2017 19:18:04 +0530 In-reply-to: <871sqyg2yj.fsf@gnu.org> References: <20170602203308.7606-1-arunisaac@systemreboot.net> <846e49f4.AEUAKzpfUbYAAAAAAAAAAAPEb_oAAAACwQwAAAAAAAW9WABZMcuW@mailjet.com> <87zidpkwih.fsf@gnu.org> <5f4eeea0.AEQALLKfIdMAAAAAAAAAAAOzWv8AAAACwQwAAAAAAAW9WABZNFgw@mailjet.com> <871sqyg2yj.fsf@gnu.org> X-CSA-Complaints: whitelist-complaints@eco.de X-MJ-Mid: AEEALa0qtSwAAAAAAAAAAAPHXLgAAAACwQwAAAAAAAW9WABZNWEgmgAIFNRsTCm-s7-rAaP2ogAFgUc Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 27049-done Cc: 27049-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) Pushed! = From unknown Mon Jun 23 04:10:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Jul 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator