From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDXa1-0003ox-UR for guix-patches@gnu.org; Wed, 24 May 2017 10:48:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDXZy-0007x8-Rs for guix-patches@gnu.org; Wed, 24 May 2017 10:48:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dDXZy-0007wy-NW for guix-patches@gnu.org; Wed, 24 May 2017 10:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dDXZy-0002IO-Bc for guix-patches@gnu.org; Wed, 24 May 2017 10:48:02 -0400 Subject: bug#27049: [PATCH] gnu: Add mathjax. Resent-Message-ID: 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 MIME-Version: 1.0 In-Reply-To: <15cc163d.ADsAAWz_hBsAAAAAAAAAAAOtUOAAAAACwQwAAAAAAAW9WABZJK0O@mailjet.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27049@debbugs.gnu.org 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