From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJFRC-0006Z0-0x for guix-patches@gnu.org; Thu, 17 May 2018 05:43:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJFR8-0005Gc-2m for guix-patches@gnu.org; Thu, 17 May 2018 05:43:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fJFR7-0005GX-Ux for guix-patches@gnu.org; Thu, 17 May 2018 05:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fJFR7-0008BA-Or for guix-patches@gnu.org; Thu, 17 May 2018 05:43:01 -0400 Subject: [bug#31449] [PATCH 2/3] gnu: Add jupyter-guile-kernel. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180515092401.22257-1-pierre-antoine.rouby@inria.fr> <20180515113315.24469-1-pierre-antoine.rouby@inria.fr> Date: Thu, 17 May 2018 11:42:35 +0200 In-Reply-To: <20180515113315.24469-1-pierre-antoine.rouby@inria.fr> (Rouby Pierre-Antoine's message of "Tue, 15 May 2018 13:33:15 +0200") Message-ID: <8736yq4nzo.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: Rouby Pierre-Antoine Cc: 31449@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Rouby Pierre-Antoine skribis: > * gnu/package/guile.scm (jupyter-guile-kernel): New variable. Applied with the changes below, to avoid propagated inputs. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index a4a0f87c0..84f46d1cc 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -61,6 +61,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages databases) #:use-module (gnu packages python) + #:use-module (gnu packages tls) #:use-module (gnu packages gl) #:use-module (gnu packages sdl) #:use-module (gnu packages maths) @@ -2253,8 +2254,6 @@ messaging library.") (kernel-file "kernel.json") (guild (string-append (assoc-ref %build-inputs "guile") "/bin/guild")) - (zmq (string-append (assoc-ref %build-inputs "zeromq") - "/lib")) (g-szmq (assoc-ref %build-inputs "guile-simple-zmq")) (json (assoc-ref %build-inputs "guile-json")) (deps (list g-szmq json)) @@ -2270,18 +2269,26 @@ messaging library.") "/site-ccache/") deps) ":"))) - + ;; Make installation directories. (mkdir-p module-dir) (mkdir-p kernel-dir) (mkdir-p go-dir) + ;; Make a writable copy of SOURCE. + (copy-recursively source ".") + + ;; Record the absolute file name of the 'openssl' command. + (substitute* "hmac.scm" + (("openssl") + (string-append (assoc-ref %build-inputs "openssl") + "/bin/openssl"))) + ;; Compile .scm files and install. - (chdir source) (setenv "GUILE_AUTO_COMPILE" "0") (setenv "GUILE_LOAD_PATH" path) (setenv "GUILE_LOAD_COMPILED_PATH" gopath) - + (for-each (lambda (file) (let* ((dest-file (string-append module-dir "/" file)) @@ -2291,7 +2298,7 @@ messaging library.") base ".go"))))) ;; Install source module. (copy-file file dest-file) - + ;; Install compiled module. (unless (zero? (system* guild "compile" "-L" source @@ -2300,7 +2307,7 @@ messaging library.") (error (format #f "Failed to compile ~s to ~s!" file go-file))))) scm-files) - + ;; Install kernel (copy-file kernel-file (string-append kernel-dir "/" kernel-file)) @@ -2308,19 +2315,20 @@ messaging library.") (substitute* (string-append kernel-dir "/" kernel-file) (("/home/jerry/.local/share/jupyter/kernels/guile/guile-jupyter-kernel.scm") - (string-append module-dir "/guile-jupyter-kernel.scm"))) - (substitute* (string-append kernel-dir "/" - kernel-file) + (string-append module-dir "/guile-jupyter-kernel.scm")) + (("\"guile\"") + (string-append "\"" (assoc-ref %build-inputs "guile") + "/bin/guile\"")) (("-s") (string-append "--no-auto-compile\", \"-s"))) + #t)))) (inputs - `(("zeromq" ,zeromq))) + `(("openssl" ,openssl) + ("guile" ,guile-2.2))) (propagated-inputs `(("guile-json" ,guile-json) - ("guile-simple-zmq" ,guile-simple-zmq) - ("guile" ,guile-2.2) - ("openssl" ,openssl))) + ("guile-simple-zmq" ,guile-simple-zmq))) (synopsis "Guile kernel for the Jupyter Notebook") (description "This package provides a Guile 2.x kernel for the Jupyter Notebook. It --=-=-=--