guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: graph: Install JavaScript files.


From: guix-commits
Subject: 04/04: graph: Install JavaScript files.
Date: Mon, 4 Jan 2021 17:55:29 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 10612d61540228d48c998ba5b56f50da22534157
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Jan 4 22:10:49 2021 +0100

    graph: Install JavaScript files.
    
    Until now, 'guix graph --backend=d3js' wouldn't work outside the build
    tree.
    
    * d3.v3.js: Move to...
    * guix/d3.v3.js: ... here.
    * graph.js: Move to...
    * guix/graph.js: ... here.
    * Makefile.am (nobase_dist_guilemodule_DATA): Add them.
    (EXTRA_DIST): Remove them.
    * guix/graph.scm (emit-d3js-prologue, emit-d3js-epilogue): Adjust
    'search-path' argument accordingly.
    * guix/self.scm (compiled-guix)[*extra-modules*]: Pass them via 
#:extra-files.
---
 Makefile.am               | 6 +++---
 d3.v3.js => guix/d3.v3.js | 0
 graph.js => guix/graph.js | 0
 guix/graph.scm            | 6 +++---
 guix/self.scm             | 7 ++++++-
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index aec2bb1..51ff9c9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic 
Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 
Ludovic Courtès <ludo@gnu.org>
 # Copyright © 2013 Andreas Enge <andreas@enge.fr>
 # Copyright © 2015, 2017 Alex Kost <alezost@gmail.com>
 # Copyright © 2016, 2018 Mathieu Lirzin <mthl@gnu.org>
@@ -397,6 +397,8 @@ EXAMPLES =                                  \
 GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
 
 nobase_dist_guilemodule_DATA =                                 \
+  guix/d3.v3.js                                                        \
+  guix/graph.js                                                        \
   guix/store/schema.sql                                                \
   $(MODULES) $(MODULES_NOT_COMPILED) $(AUX_FILES) $(EXAMPLES)  \
   $(MISC_DISTRO_FILES)
@@ -611,8 +613,6 @@ EXTRA_DIST +=                                               
\
   build-aux/test-driver.scm                            \
   build-aux/update-guix-package.scm                    \
   build-aux/update-NEWS.scm                            \
-  d3.v3.js                                             \
-  graph.js                                             \
   tests/test.drv                                       \
   tests/signing-key.pub                                        \
   tests/signing-key.sec                                        \
diff --git a/d3.v3.js b/guix/d3.v3.js
similarity index 100%
rename from d3.v3.js
rename to guix/d3.v3.js
diff --git a/graph.js b/guix/graph.js
similarity index 100%
rename from graph.js
rename to guix/graph.js
diff --git a/guix/graph.scm b/guix/graph.scm
index 93ff9ef..0d4cd83 100644
--- a/guix/graph.scm
+++ b/guix/graph.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -274,11 +274,11 @@ text {
 var nodes = {},
     nodeArray = [],
     links = [];
-" (search-path %load-path "d3.v3.js")))
+" (search-path %load-path "guix/d3.v3.js")))
 
 (define (emit-d3js-epilogue port)
   (format port "</script><script type=\"text/javascript\" 
src=\"~a\"></script></body></html>"
-          (search-path %load-path "graph.js")))
+          (search-path %load-path "guix/graph.js")))
 
 (define (emit-d3js-node id label port)
   (format port "\
diff --git a/guix/self.scm b/guix/self.scm
index 7cda665..e2e3198 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -880,6 +880,11 @@ itself."
                                (name name))
                              (scheme-modules* source "guix"))
                  (list *core-modules*)
+
+                 #:extra-files
+                 `(("guix/graph.js" ,(local-file "../guix/graph.js"))
+                   ("guix/d3.v3.js" ,(local-file "../guix/d3.v3.js")))
+
                  #:extensions dependencies
                  #:guile-for-build guile-for-build))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]