2017-06-02 16:27:51 -04:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
|
|
|
|
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
2022-02-22 17:19:36 -05:00
|
|
|
|
;;; Copyright © 2017, 2019, 2020, 2022 Ricardo Wurmus <rekado@elephly.net>
|
2021-04-14 17:07:02 -04:00
|
|
|
|
;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
2023-02-12 09:52:58 -05:00
|
|
|
|
;;; Copyright © 2017-2020, 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
|
2018-05-09 17:14:58 -04:00
|
|
|
|
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
2021-01-07 06:31:41 -05:00
|
|
|
|
;;; Copyright © 2021 Pierre Neidhardt <mail@ambrevar.xyz>
|
2021-10-29 01:56:24 -04:00
|
|
|
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
2022-02-15 17:07:28 -05:00
|
|
|
|
;;; Copyright © 2022 Frank Pursel <frank.pursel@gmail.com>
|
2017-06-02 16:27:51 -04:00
|
|
|
|
;;;
|
|
|
|
|
;;; 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
(define-module (gnu packages javascript)
|
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
|
#:use-module (gnu packages)
|
|
|
|
|
#:use-module (gnu packages base)
|
2022-02-15 17:07:28 -05:00
|
|
|
|
#:use-module (gnu packages bash)
|
2017-06-02 16:27:51 -04:00
|
|
|
|
#:use-module (gnu packages compression)
|
2022-02-15 17:07:28 -05:00
|
|
|
|
#:use-module (gnu packages java)
|
2021-12-02 05:32:54 -05:00
|
|
|
|
#:use-module (gnu packages node)
|
2018-08-28 16:04:16 -04:00
|
|
|
|
#:use-module (gnu packages readline)
|
2021-09-18 01:05:55 -04:00
|
|
|
|
#:use-module (gnu packages uglifyjs)
|
2020-12-29 08:21:58 -05:00
|
|
|
|
#:use-module (gnu packages web)
|
2022-05-09 16:10:02 -04:00
|
|
|
|
#:use-module (guix gexp)
|
2017-06-02 16:27:51 -04:00
|
|
|
|
#:use-module (guix packages)
|
|
|
|
|
#:use-module (guix download)
|
2017-08-03 09:54:16 -04:00
|
|
|
|
#:use-module (guix git-download)
|
2022-02-15 17:07:28 -05:00
|
|
|
|
#:use-module (guix build-system ant)
|
2020-11-30 23:10:32 -05:00
|
|
|
|
#:use-module (guix build-system cmake)
|
2022-02-15 17:07:28 -05:00
|
|
|
|
#:use-module (guix build-system gnu)
|
2020-11-23 16:08:20 -05:00
|
|
|
|
#:use-module (guix build-system minify)
|
2022-02-15 17:07:28 -05:00
|
|
|
|
#:use-module (guix build-system trivial)
|
2020-11-23 16:08:20 -05:00
|
|
|
|
#:use-module (guix utils))
|
2017-06-02 16:27:51 -04:00
|
|
|
|
|
2020-11-30 23:10:32 -05:00
|
|
|
|
(define-public cjson
|
|
|
|
|
(package
|
|
|
|
|
(name "cjson")
|
2021-09-03 14:08:33 -04:00
|
|
|
|
(version "1.7.15")
|
2020-11-30 23:10:32 -05:00
|
|
|
|
(source (origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/DaveGamble/cJSON")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
2021-09-03 14:08:33 -04:00
|
|
|
|
(base32 "0lmq7sx09rmsirimbyvaaia44i134ppkp10cw1d2rygr76k9qwq2"))))
|
2020-11-30 23:10:32 -05:00
|
|
|
|
(build-system cmake-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:configure-flags '("-DENABLE_CJSON_UTILS=On")))
|
|
|
|
|
(home-page "https://github.com/DaveGamble/cJSON")
|
|
|
|
|
(synopsis "JSON parser written in ANSI C")
|
|
|
|
|
(description "This library provides a portable embeddable JSON parser.")
|
|
|
|
|
(license license:expat)))
|
|
|
|
|
|
2020-12-29 08:21:58 -05:00
|
|
|
|
(define-public js-context-menu
|
|
|
|
|
(package
|
|
|
|
|
(name "js-context-menu")
|
|
|
|
|
(version "0.6.1")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/zorkow/context-menu")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1q063l6477z285j6h5wvccp6iswvlp0jmb96sgk32sh0lf7nhknh"))))
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
(chdir (assoc-ref %build-inputs "source"))
|
|
|
|
|
(let ((target (string-append %output "/share/javascript/context-menu")))
|
2021-10-23 16:53:12 -04:00
|
|
|
|
(apply invoke (search-input-file %build-inputs "/bin/esbuild")
|
2020-12-29 08:21:58 -05:00
|
|
|
|
"--bundle"
|
|
|
|
|
"--tsconfig=tsconfig.json"
|
|
|
|
|
(string-append "--outdir=" target)
|
|
|
|
|
(find-files "ts" "\\.ts$"))))))
|
|
|
|
|
(native-inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list esbuild))
|
2020-12-29 08:21:58 -05:00
|
|
|
|
(home-page "https://github.com/zorkow/context-menu")
|
|
|
|
|
(synopsis "Generic context menu")
|
|
|
|
|
(description "This package provides a reimplementation of the MathJax
|
|
|
|
|
context menu in TypeScript.")
|
|
|
|
|
(license license:asl2.0)))
|
|
|
|
|
|
2017-08-24 06:15:08 -04:00
|
|
|
|
(define-public font-mathjax
|
|
|
|
|
(package
|
|
|
|
|
(name "font-mathjax")
|
2017-08-29 15:23:51 -04:00
|
|
|
|
(version "2.7.2")
|
2017-08-24 06:15:08 -04:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
2020-01-26 04:39:23 -05:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/mathjax/MathJax")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
2017-08-24 06:15:08 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2020-01-26 04:39:23 -05:00
|
|
|
|
"127j12g7v2hx6k7r00b8cp49s7nkrwhxy6l8p03pw34xpxbgbimm"))))
|
2017-08-24 06:15:08 -04:00
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils)
|
|
|
|
|
(ice-9 match))
|
|
|
|
|
(let ((install-directory (string-append %output "/share/fonts/mathjax")))
|
|
|
|
|
(mkdir-p install-directory)
|
2020-01-26 04:39:23 -05:00
|
|
|
|
(copy-recursively (string-append (assoc-ref %build-inputs "source")
|
|
|
|
|
"/fonts")
|
|
|
|
|
install-directory)))))
|
2017-08-24 06:15:08 -04:00
|
|
|
|
(home-page "https://www.mathjax.org/")
|
|
|
|
|
(synopsis "Fonts for MathJax")
|
|
|
|
|
(description "This package contains the fonts required for MathJax.")
|
|
|
|
|
(license license:asl2.0)))
|
|
|
|
|
|
2017-06-02 16:27:51 -04:00
|
|
|
|
(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")))
|
2020-01-26 04:39:23 -05:00
|
|
|
|
(copy-recursively (string-append (assoc-ref %build-inputs "source") "/unpacked")
|
|
|
|
|
"MathJax-unpacked")
|
2017-06-02 16:27:51 -04:00
|
|
|
|
(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
|
2020-01-26 04:39:23 -05:00
|
|
|
|
;; remove prefix "./MathJax-unpacked"
|
|
|
|
|
(string-drop file 18))))
|
2017-06-02 16:27:51 -04:00
|
|
|
|
(format #t "~a -> ~a~%" file installed)
|
|
|
|
|
(cond
|
|
|
|
|
((string-match "\\.js$" file)
|
|
|
|
|
(mkdir-p (dirname installed))
|
2021-09-18 01:05:55 -04:00
|
|
|
|
(let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
|
2017-06-02 16:27:51 -04:00
|
|
|
|
(call-with-output-file installed
|
|
|
|
|
(lambda (port)
|
2019-05-16 11:06:18 -04:00
|
|
|
|
(dump-port minified port)))
|
|
|
|
|
|
|
|
|
|
(let ((exit (close-pipe minified)))
|
|
|
|
|
(unless (zero? exit)
|
2021-09-18 01:05:55 -04:00
|
|
|
|
(error "dear, uglifyjs failed" exit)))))
|
2017-06-02 16:27:51 -04:00
|
|
|
|
(else
|
|
|
|
|
(install-file file (dirname installed))))))
|
gnu: Use invoke and return #t from all builders.
* gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/audio.scm,
gnu/packages/avr.scm, gnu/packages/base.scm, gnu/packages/bioinformatics.scm,
gnu/packages/certs.scm, gnu/packages/check.scm, gnu/packages/code.scm,
gnu/packages/commencement.scm, gnu/packages/dictionaries.scm,
gnu/packages/docbook.scm, gnu/packages/emacs.scm, gnu/packages/embedded.scm,
gnu/packages/fonts.scm, gnu/packages/games.scm, gnu/packages/gnome.scm,
gnu/packages/gnu-doc.scm, gnu/packages/guile.scm, gnu/packages/hurd.scm,
gnu/packages/javascript.scm, gnu/packages/libreoffice.scm,
gnu/packages/linux.scm, gnu/packages/lisp.scm, gnu/packages/lxde.scm,
gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/mate.scm,
gnu/packages/pkg-config.scm, gnu/packages/qt.scm, gnu/packages/rust.scm,
gnu/packages/scheme.scm, gnu/packages/sdl.scm, gnu/packages/statistics.scm,
gnu/packages/syncthing.scm, gnu/packages/tex.scm, gnu/packages/web.scm,
gnu/packages/wine.scm, gnu/packages/xfce.scm: In the builders of packages
using 'trivial-build-system', use invoke where appropriate, raise exceptions
on errors, and otherwise return #t.
2018-03-27 20:14:05 -04:00
|
|
|
|
(find-files "."))
|
|
|
|
|
|
|
|
|
|
#t))))
|
2017-06-02 16:27:51 -04:00
|
|
|
|
(native-inputs
|
|
|
|
|
`(("font-mathjax" ,font-mathjax)
|
|
|
|
|
("glibc-utf8-locales" ,glibc-utf8-locales)
|
2021-09-18 01:05:55 -04:00
|
|
|
|
("uglifyjs" ,node-uglify-js)
|
2017-06-02 16:27:51 -04:00
|
|
|
|
,@(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.")))
|
2017-06-22 11:19:39 -04:00
|
|
|
|
|
2021-12-02 05:32:54 -05:00
|
|
|
|
(define-public js-mathjax-3
|
|
|
|
|
(package
|
|
|
|
|
(name "js-mathjax")
|
|
|
|
|
(version "3.2.0")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/mathjax/MathJax-src")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"05lm6nw7rzpcc5yz7xsjxi4id9369vvnrksx82nglxrqrpws97wx"))
|
|
|
|
|
(patches (search-patches "mathjax-disable-webpack.patch"
|
|
|
|
|
"mathjax-no-a11y.patch"))))
|
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'prepare-sources
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
;; All a11y components depend on speech-rule-engine, which cannot be
|
|
|
|
|
;; built from source. Since this only affects accessibility, remove them.
|
|
|
|
|
(delete-file-recursively "ts/a11y")
|
|
|
|
|
(delete-file-recursively "components/src/a11y")
|
|
|
|
|
(delete-file-recursively "components/src/sre")
|
|
|
|
|
(delete-file-recursively "components/src/node-main")
|
|
|
|
|
|
|
|
|
|
;; Copy sources of dependencies, so we can create symlinks.
|
|
|
|
|
(mkdir-p "node_modules")
|
|
|
|
|
(with-directory-excursion "node_modules"
|
|
|
|
|
(for-each
|
|
|
|
|
(lambda (p)
|
|
|
|
|
(copy-recursively (assoc-ref inputs (string-append "node-" p)) p))
|
|
|
|
|
'("mj-context-menu" "mhchemparser")))
|
|
|
|
|
|
|
|
|
|
;; Make sure esbuild can find imports. This way we don’t have to rewrite files.
|
|
|
|
|
(symlink "ts" "js")
|
|
|
|
|
(symlink "ts" "node_modules/mj-context-menu/js")))
|
|
|
|
|
(delete 'configure)
|
|
|
|
|
(replace 'build
|
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
|
(let ((esbuild (string-append (assoc-ref inputs "esbuild")
|
|
|
|
|
"/bin/esbuild"))
|
|
|
|
|
(node (string-append (assoc-ref inputs "node")
|
|
|
|
|
"/bin/node"))
|
|
|
|
|
(target (string-append (assoc-ref outputs "out")
|
|
|
|
|
"/share/javascript/mathjax/es5")))
|
|
|
|
|
;; Preprocess files and generate lib/ subdirs.
|
|
|
|
|
(invoke node "components/bin/makeAll")
|
|
|
|
|
;; Build components.
|
|
|
|
|
(apply
|
|
|
|
|
invoke
|
|
|
|
|
esbuild
|
|
|
|
|
"--bundle"
|
|
|
|
|
"--minify"
|
|
|
|
|
;; esbuild cannot transpile some features to ES5, so use ES6 instead.
|
|
|
|
|
"--target=es6"
|
|
|
|
|
(string-append "--outdir=" target)
|
|
|
|
|
"--sourcemap"
|
|
|
|
|
"--outbase=components/src"
|
|
|
|
|
"--define:__dirname=\"/\""
|
|
|
|
|
;; In the browser the global object is window, see
|
|
|
|
|
;; https://developer.mozilla.org/en-US/docs/Glossary/Global_object
|
|
|
|
|
"--define:global=window"
|
|
|
|
|
;; Find all component entry points, which have the same name as their
|
|
|
|
|
;; parent directory.
|
|
|
|
|
(filter
|
|
|
|
|
(lambda (f)
|
|
|
|
|
(string=?
|
|
|
|
|
(basename (dirname f))
|
|
|
|
|
(string-drop-right (basename f) 3)))
|
|
|
|
|
(find-files "components/src" "\\.js$")))
|
|
|
|
|
;; Move all .js files into their parent directory, where MathJax
|
|
|
|
|
;; expects them.
|
|
|
|
|
(for-each
|
|
|
|
|
(lambda (f)
|
|
|
|
|
(rename-file f (string-append (dirname (dirname f)) "/" (basename f))))
|
|
|
|
|
(find-files target "\\.js(\\.map)?$"))
|
|
|
|
|
;; Copy font files.
|
|
|
|
|
(copy-recursively
|
|
|
|
|
"ts/output/chtml/fonts/tex-woff-v2"
|
|
|
|
|
(string-append target "/output/chtml/fonts/woff-v2")))))
|
|
|
|
|
(delete 'check)
|
|
|
|
|
(delete 'install))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("esbuild" ,esbuild)
|
|
|
|
|
("node" ,node-lts)
|
|
|
|
|
("node-mj-context-menu"
|
|
|
|
|
,(let ((name "context-menu")
|
|
|
|
|
(version "0.6.1"))
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/zorkow/context-menu.git")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1q063l6477z285j6h5wvccp6iswvlp0jmb96sgk32sh0lf7nhknh")))))
|
|
|
|
|
("node-mhchemparser"
|
|
|
|
|
,(let ((name "mhchemparser")
|
|
|
|
|
;; Version 4.1.1. There are no tags.
|
|
|
|
|
(version "b1bd0670df7e9bbd5a724ac642aa2664d6e500b3"))
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/mhchem/mhchemParser.git")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1g72kbxzf9f2igidpma3jwk28ln4bp3qhwspmhnm79baf3701dgv")))))))
|
|
|
|
|
(home-page "https://www.mathjax.org/")
|
|
|
|
|
(synopsis (package-synopsis js-mathjax))
|
|
|
|
|
(description (package-description js-mathjax))
|
|
|
|
|
(license license:asl2.0)))
|
|
|
|
|
|
2022-06-13 06:41:33 -04:00
|
|
|
|
(define-public js-mathjax-for-r-mathjaxr
|
|
|
|
|
(package
|
|
|
|
|
(inherit js-mathjax-3)
|
|
|
|
|
(name "js-mathjax")
|
|
|
|
|
(version "3.1.2")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/mathjax/MathJax-src")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0kqcb6pl0zfs4hf8zqb4l50kkfq7isv35vpy05m0lg0yr9w0w4ai"))
|
|
|
|
|
(patches (search-patches "mathjax-disable-webpack.patch"
|
|
|
|
|
"mathjax-3.1.2-no-a11y.patch"))))
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments js-mathjax-3)
|
|
|
|
|
((#:phases phases '%standard-phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(replace 'prepare-sources
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
;; All a11y components depend on speech-rule-engine, which cannot be
|
|
|
|
|
;; built from source. Since this only affects accessibility, remove them.
|
|
|
|
|
(delete-file-recursively "ts/a11y")
|
|
|
|
|
(delete-file-recursively "components/src/a11y")
|
|
|
|
|
(delete-file-recursively "components/src/sre")
|
|
|
|
|
(delete-file-recursively "components/src/node-main")
|
|
|
|
|
|
|
|
|
|
;; Copy sources of dependencies, so we can create symlinks.
|
|
|
|
|
(mkdir-p "node_modules")
|
|
|
|
|
(with-directory-excursion "node_modules"
|
|
|
|
|
(for-each
|
|
|
|
|
(lambda (p)
|
|
|
|
|
(copy-recursively (assoc-ref inputs (string-append "node-" p)) p))
|
|
|
|
|
'("mj-context-menu")))
|
|
|
|
|
|
|
|
|
|
;; Make sure esbuild can find imports. This way we don’t have to rewrite files.
|
|
|
|
|
(symlink "ts" "js")
|
|
|
|
|
(symlink "ts" "node_modules/mj-context-menu/js")))))))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("esbuild" ,esbuild)
|
|
|
|
|
("node" ,node-lts)
|
|
|
|
|
("node-mj-context-menu"
|
|
|
|
|
,(let ((name "context-menu")
|
|
|
|
|
(version "0.6.1"))
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/zorkow/context-menu.git")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1q063l6477z285j6h5wvccp6iswvlp0jmb96sgk32sh0lf7nhknh")))))))))
|
|
|
|
|
|
2020-12-30 08:53:03 -05:00
|
|
|
|
(define-public js-commander
|
|
|
|
|
(package
|
|
|
|
|
(name "js-commander")
|
|
|
|
|
(version "6.2.1")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/tj/commander.js")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"126m25s6mxpxmdj4aw5awz06b47r8r798lcf1c5bnmmh39cik5i1"))))
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
(chdir (assoc-ref %build-inputs "source"))
|
2021-10-23 16:53:12 -04:00
|
|
|
|
(let ((esbuild (search-input-file %build-inputs "/bin/esbuild"))
|
2020-12-30 08:53:03 -05:00
|
|
|
|
(target (string-append %output "/share/javascript/commander")))
|
|
|
|
|
(invoke esbuild
|
|
|
|
|
"--bundle"
|
|
|
|
|
"--minify"
|
|
|
|
|
"--tsconfig=tsconfig.json"
|
|
|
|
|
"--platform=node"
|
|
|
|
|
(string-append "--outfile=" target "/index.min.js")
|
|
|
|
|
"index.js")))))
|
|
|
|
|
(native-inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list esbuild))
|
2020-12-30 08:53:03 -05:00
|
|
|
|
(home-page "https://github.com/tj/commander.js")
|
|
|
|
|
(synopsis "Library for node.js command-line interfaces")
|
|
|
|
|
(description "Commander.js aims to be the complete solution for node.js
|
2021-12-30 03:35:22 -05:00
|
|
|
|
command-line interfaces.")
|
2020-12-30 08:53:03 -05:00
|
|
|
|
(license license:expat)))
|
|
|
|
|
|
2020-12-30 09:05:29 -05:00
|
|
|
|
(define-public js-xmldom-sre
|
|
|
|
|
;; This commit corresponds to the untagged release 0.1.32
|
|
|
|
|
(let ((commit "3c79325bc2c9e5d27e3ba44b680fa8c5dd6a381d")
|
|
|
|
|
(revision "1"))
|
|
|
|
|
(package
|
|
|
|
|
(name "js-xmldom-sre")
|
|
|
|
|
(version "0.1.32")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/zorkow/xmldom/")
|
|
|
|
|
(commit commit)))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0a88v0id3mjflpvjqhv8a28br0xvaaszxbf7alg6pxfbnkb69yyq"))))
|
|
|
|
|
(build-system trivial-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:modules ((guix build utils))
|
|
|
|
|
#:builder
|
|
|
|
|
(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
(chdir (assoc-ref %build-inputs "source"))
|
2021-10-23 16:53:12 -04:00
|
|
|
|
(let ((esbuild (search-input-file %build-inputs "/bin/esbuild"))
|
2020-12-30 09:05:29 -05:00
|
|
|
|
(target (string-append %output "/share/javascript/xmldom-sre")))
|
|
|
|
|
(invoke esbuild
|
|
|
|
|
"--bundle"
|
|
|
|
|
"--minify"
|
|
|
|
|
"--platform=node"
|
|
|
|
|
(string-append "--outfile=" target "/dom-parser.min.js")
|
|
|
|
|
"dom-parser.js")))))
|
|
|
|
|
(native-inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list esbuild))
|
2020-12-30 09:05:29 -05:00
|
|
|
|
(home-page "https://github.com/zorkow/xmldom/")
|
|
|
|
|
(synopsis "DOM parser and XML serializer")
|
|
|
|
|
(description "This is a fork of the xmldom library. It allows the use
|
|
|
|
|
of wicked-good-xpath together with xmldom.")
|
|
|
|
|
;; One of these licenses may be selected.
|
|
|
|
|
(license (list license:expat
|
|
|
|
|
license:lgpl2.0)))))
|
|
|
|
|
|
2017-06-22 11:19:39 -04:00
|
|
|
|
(define-public js-respond
|
|
|
|
|
(package
|
|
|
|
|
(name "js-respond")
|
|
|
|
|
(version "1.4.2")
|
|
|
|
|
(source (origin
|
2019-09-08 09:12:50 -04:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/scottjehl/Respond")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
2017-06-22 11:19:39 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-08 09:12:50 -04:00
|
|
|
|
"00xid731rirc7sdy1gc8qal3v9g0agr2qx15hm4x97l1lcbylyn2"))))
|
2019-09-08 09:14:41 -04:00
|
|
|
|
(build-system minify-build-system)
|
2017-06-22 11:19:39 -04:00
|
|
|
|
(arguments
|
2019-09-08 09:14:41 -04:00
|
|
|
|
`(#:javascript-files '("src/matchmedia.addListener.js"
|
|
|
|
|
"src/matchmedia.polyfill.js"
|
|
|
|
|
"src/respond.js")))
|
2017-06-22 11:19:39 -04:00
|
|
|
|
(home-page "https://github.com/scottjehl/Respond")
|
|
|
|
|
(synopsis "Polyfill for min/max-width CSS3 Media Queries")
|
|
|
|
|
(description "The goal of this script is to provide a fast and lightweight
|
|
|
|
|
script to enable responsive web designs in browsers that don't support CSS3
|
|
|
|
|
Media Queries.")
|
|
|
|
|
(license license:expat)))
|
2017-08-03 09:53:54 -04:00
|
|
|
|
|
|
|
|
|
(define-public js-html5shiv
|
|
|
|
|
(package
|
|
|
|
|
(name "js-html5shiv")
|
|
|
|
|
(version "3.7.3")
|
|
|
|
|
(source (origin
|
2019-09-08 08:44:05 -04:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/aFarkas/html5shiv")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
2017-08-03 09:53:54 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-08 08:44:05 -04:00
|
|
|
|
"0y1c5nyq0brl9fjdihhax33vks4s1ij9iv113879sg3zflmgqpd0"))))
|
2017-08-03 09:53:54 -04:00
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(home-page "https://github.com/aFarkas/html5shiv")
|
|
|
|
|
(synopsis "Enable HTML5 sectioning elements in legacy browsers")
|
|
|
|
|
(description "The HTML5 Shiv enables use of HTML5 sectioning elements in
|
|
|
|
|
legacy Internet Explorer and provides basic HTML5 styling for Internet
|
|
|
|
|
Explorer 6-9, Safari 4.x (and iPhone 3.x), and Firefox 3.x.")
|
|
|
|
|
;; From the file "MIT and GPL2 licenses.md":
|
|
|
|
|
;;
|
|
|
|
|
;; This software is licensed under a dual license system (MIT or GPL
|
|
|
|
|
;; version 2). This means you are free to choose with which of both
|
|
|
|
|
;; licenses (MIT or GPL version 2) you want to use this library.
|
|
|
|
|
(license (list license:expat license:gpl2))))
|
2017-08-03 09:54:16 -04:00
|
|
|
|
|
|
|
|
|
(define-public js-json2
|
|
|
|
|
(let ((commit "031b1d9e6971bd4c433ca85e216cc853f5a867bd")
|
|
|
|
|
(revision "1"))
|
|
|
|
|
(package
|
|
|
|
|
(name "js-json2")
|
|
|
|
|
(version (string-append "2016-10-28." revision "-" (string-take commit 7)))
|
|
|
|
|
(source (origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
gnu: Remove ".git" from "https://github/…/….git".
Until now, 'lookup-origin' and thus 'lookup-origin-revision' in (guix
swh) would sometimes return #f for these because the ".git" URLs are
redirects to the non-".git" URLs. Consequently, 'guix lint -c archival'
would keep saying "scheduled Software Heritage archival"; likewise, the
fallback download code would fail.
* gnu/packages/ada.scm,
gnu/packages/admin.scm,
gnu/packages/aidc.scm,
gnu/packages/algebra.scm,
gnu/packages/android.scm,
gnu/packages/animation.scm,
gnu/packages/arcan.scm,
gnu/packages/assembly.scm,
gnu/packages/audio.scm,
gnu/packages/authentication.scm,
gnu/packages/avr.scm,
gnu/packages/axoloti.scm,
gnu/packages/backup.scm,
gnu/packages/bash.scm,
gnu/packages/benchmark.scm,
gnu/packages/bioconductor.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/bittorrent.scm,
gnu/packages/boost.scm,
gnu/packages/build-tools.scm,
gnu/packages/c.scm,
gnu/packages/calendar.scm,
gnu/packages/cdrom.scm,
gnu/packages/check.scm,
gnu/packages/chemistry.scm,
gnu/packages/chez.scm,
gnu/packages/clojure.scm,
gnu/packages/code.scm,
gnu/packages/compression.scm,
gnu/packages/compton.scm,
gnu/packages/coq.scm,
gnu/packages/cpp.scm,
gnu/packages/cran.scm,
gnu/packages/crypto.scm,
gnu/packages/curl.scm,
gnu/packages/databases.scm,
gnu/packages/datastructures.scm,
gnu/packages/debug.scm,
gnu/packages/disk.scm,
gnu/packages/distributed.scm,
gnu/packages/django.scm,
gnu/packages/dlang.scm,
gnu/packages/dns.scm,
gnu/packages/docker.scm,
gnu/packages/education.scm,
gnu/packages/efi.scm,
gnu/packages/elixir.scm,
gnu/packages/emacs-xyz.scm,
gnu/packages/embedded.scm,
gnu/packages/emulators.scm,
gnu/packages/engineering.scm,
gnu/packages/erlang.scm,
gnu/packages/fabric-management.scm,
gnu/packages/file-systems.scm,
gnu/packages/finance.scm,
gnu/packages/firmware.scm,
gnu/packages/flashing-tools.scm,
gnu/packages/fonts.scm,
gnu/packages/fontutils.scm,
gnu/packages/fpga.scm,
gnu/packages/game-development.scm,
gnu/packages/games.scm,
gnu/packages/genealogy.scm,
gnu/packages/genimage.scm,
gnu/packages/geo.scm,
gnu/packages/gimp.scm,
gnu/packages/gl.scm,
gnu/packages/gnome-xyz.scm,
gnu/packages/gnome.scm,
gnu/packages/gnuzilla.scm,
gnu/packages/golang.scm,
gnu/packages/gpodder.scm,
gnu/packages/graph.scm,
gnu/packages/graphics.scm,
gnu/packages/graphviz.scm,
gnu/packages/groff.scm,
gnu/packages/groovy.scm,
gnu/packages/gtk.scm,
gnu/packages/guile-xyz.scm,
gnu/packages/guile.scm,
gnu/packages/hardware.scm,
gnu/packages/haskell-apps.scm,
gnu/packages/haskell-xyz.scm,
gnu/packages/hexedit.scm,
gnu/packages/i2p.scm,
gnu/packages/ibus.scm,
gnu/packages/image-processing.scm,
gnu/packages/image-viewers.scm,
gnu/packages/image.scm,
gnu/packages/ipfs.scm,
gnu/packages/java-graphics.scm,
gnu/packages/java-maths.scm,
gnu/packages/java.scm,
gnu/packages/javascript.scm,
gnu/packages/jrnl.scm,
gnu/packages/julia.scm,
gnu/packages/jupyter.scm,
gnu/packages/kodi.scm,
gnu/packages/language.scm,
gnu/packages/lego.scm,
gnu/packages/less.scm,
gnu/packages/libusb.scm,
gnu/packages/linux.scm,
gnu/packages/lirc.scm,
gnu/packages/lisp-xyz.scm,
gnu/packages/llvm.scm,
gnu/packages/logging.scm,
gnu/packages/lolcode.scm,
gnu/packages/lua.scm,
gnu/packages/lxde.scm,
gnu/packages/lxqt.scm,
gnu/packages/machine-learning.scm,
gnu/packages/mail.scm,
gnu/packages/markup.scm,
gnu/packages/maths.scm,
gnu/packages/maven.scm,
gnu/packages/mes.scm,
gnu/packages/messaging.scm,
gnu/packages/monitoring.scm,
gnu/packages/mpd.scm,
gnu/packages/music.scm,
gnu/packages/networking.scm,
gnu/packages/node-xyz.scm,
gnu/packages/ocaml.scm,
gnu/packages/ocr.scm,
gnu/packages/onc-rpc.scm,
gnu/packages/opencl.scm,
gnu/packages/opencog.scm,
gnu/packages/pantheon.scm,
gnu/packages/password-utils.scm,
gnu/packages/patchutils.scm,
gnu/packages/pdf.scm,
gnu/packages/perl6.scm,
gnu/packages/phabricator.scm,
gnu/packages/popt.scm,
gnu/packages/printers.scm,
gnu/packages/prolog.scm,
gnu/packages/protobuf.scm,
gnu/packages/pulseaudio.scm,
gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm,
gnu/packages/python-xyz.scm,
gnu/packages/qt.scm,
gnu/packages/radio.scm,
gnu/packages/rails.scm,
gnu/packages/rdf.scm,
gnu/packages/rednotebook.scm,
gnu/packages/rpc.scm,
gnu/packages/rsync.scm,
gnu/packages/ruby.scm,
gnu/packages/rust.scm,
gnu/packages/scheme.scm,
gnu/packages/screen.scm,
gnu/packages/security-token.scm,
gnu/packages/selinux.scm,
gnu/packages/serialization.scm,
gnu/packages/shells.scm,
gnu/packages/shellutils.scm,
gnu/packages/simh.scm,
gnu/packages/sml.scm,
gnu/packages/ssh.scm,
gnu/packages/statistics.scm,
gnu/packages/stenography.scm,
gnu/packages/sync.scm,
gnu/packages/syncthing.scm,
gnu/packages/synergy.scm,
gnu/packages/telephony.scm,
gnu/packages/terminals.scm,
gnu/packages/tex.scm,
gnu/packages/texinfo.scm,
gnu/packages/text-editors.scm,
gnu/packages/textutils.scm,
gnu/packages/time.scm,
gnu/packages/tmux.scm,
gnu/packages/tor.scm,
gnu/packages/toys.scm,
gnu/packages/version-control.scm,
gnu/packages/video.scm,
gnu/packages/vim.scm,
gnu/packages/virtualization.scm,
gnu/packages/vlang.scm,
gnu/packages/vnc.scm,
gnu/packages/vpn.scm,
gnu/packages/web-browsers.scm,
gnu/packages/web.scm,
gnu/packages/wireservice.scm,
gnu/packages/wm.scm,
gnu/packages/wxwidgets.scm,
gnu/packages/xdisorg.scm,
gnu/packages/xml.scm,
gnu/packages/xorg.scm,
tests/lint.scm: Remove trailing ".git" from 'git-reference' URL.
2020-07-12 16:53:28 -04:00
|
|
|
|
(url "https://github.com/douglascrockford/JSON-js")
|
2017-08-03 09:54:16 -04:00
|
|
|
|
(commit commit)))
|
|
|
|
|
(file-name (string-append name "-" version "-checkout"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1fvb6b2y5sd3sqdgcj683sdxcbxdii34q0ysc9wg0dq1sy81l11v"))))
|
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:javascript-files '("json2.js"
|
|
|
|
|
"json_parse.js"
|
|
|
|
|
"json_parse_state.js"
|
|
|
|
|
"cycle.js")))
|
|
|
|
|
(home-page "https://github.com/douglascrockford/JSON-js")
|
|
|
|
|
(synopsis "JSON encoders and decoders")
|
|
|
|
|
(description "The files in this collection implement JSON
|
|
|
|
|
encoders/decoders in JavaScript.
|
|
|
|
|
|
|
|
|
|
@code{json2.js}: This file creates a JSON property in the global object, if
|
|
|
|
|
there isn't already one, setting its value to an object containing a stringify
|
|
|
|
|
method and a parse method. The @code{parse} method uses the @code{eval}
|
|
|
|
|
method to do the parsing, guarding it with several regular expressions to
|
|
|
|
|
defend against accidental code execution hazards. On current browsers, this
|
|
|
|
|
file does nothing, preferring the built-in JSON object.
|
|
|
|
|
|
|
|
|
|
@code{json_parse.js}: This file contains an alternative JSON @code{parse}
|
|
|
|
|
function that uses recursive descent instead of @code{eval}.
|
|
|
|
|
|
|
|
|
|
@code{json_parse_state.js}: This files contains an alternative JSON
|
|
|
|
|
@code{parse} function that uses a state machine instead of @code{eval}.
|
|
|
|
|
|
|
|
|
|
@code{cycle.js}: This file contains two functions, @code{JSON.decycle} and
|
|
|
|
|
@code{JSON.retrocycle}, which make it possible to encode cyclical structures
|
|
|
|
|
and DAGs in JSON, and to then recover them. This is a capability that is not
|
|
|
|
|
provided by ES5. @code{JSONPath} is used to represent the links.")
|
|
|
|
|
(license license:public-domain))))
|
2017-08-03 09:54:33 -04:00
|
|
|
|
|
|
|
|
|
(define-public js-strftime
|
|
|
|
|
(package
|
|
|
|
|
(name "js-strftime")
|
|
|
|
|
(version "0.10.0")
|
|
|
|
|
(source (origin
|
2019-09-08 08:57:50 -04:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url"https://github.com/samsonjs/strftime")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
2017-08-03 09:54:33 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-08 08:57:50 -04:00
|
|
|
|
"131nmlivazwxyba25kh9lda99749fq4xsyin6lzfalaaydviby4p"))))
|
2017-08-03 09:54:33 -04:00
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:javascript-files '("strftime.js")))
|
|
|
|
|
(home-page "https://github.com/samsonjs/strftime")
|
|
|
|
|
(synopsis "Implementation of strftime to JavaScript")
|
|
|
|
|
(description "This is an implementation of the @code{strftime} procedure
|
|
|
|
|
for JavaScript. It works in (at least) node.js and browsers. It supports
|
|
|
|
|
localization and timezones. Most standard specifiers from C are supported as
|
|
|
|
|
well as some other extensions from Ruby.")
|
|
|
|
|
(license license:expat)))
|
2017-08-03 09:54:51 -04:00
|
|
|
|
|
|
|
|
|
(define-public js-highlight
|
|
|
|
|
(package
|
|
|
|
|
(name "js-highlight")
|
|
|
|
|
(version "9.12.0")
|
|
|
|
|
(source (origin
|
2019-09-08 09:00:24 -04:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/isagalaev/highlight.js")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
2017-08-03 09:54:51 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-08 09:00:24 -04:00
|
|
|
|
"12qz22qjpd6svj58pwgcwg2x2rzhihfdrxg6lgj39nfpaln6dris"))))
|
2017-08-03 09:54:51 -04:00
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:javascript-files '("src/highlight.js")))
|
|
|
|
|
(home-page "https://github.com/isagalaev/highlight.js")
|
|
|
|
|
(synopsis "Syntax highlighting for JavaScript")
|
|
|
|
|
(description "Highlight.js is a syntax highlighter written in JavaScript.
|
|
|
|
|
It works in the browser as well as on the server. It works with pretty much
|
|
|
|
|
any markup, doesn’t depend on any framework and has automatic language
|
|
|
|
|
detection.")
|
|
|
|
|
(license license:bsd-3)))
|
2017-08-03 09:55:05 -04:00
|
|
|
|
|
|
|
|
|
(define-public js-datatables
|
|
|
|
|
(package
|
|
|
|
|
(name "js-datatables")
|
2019-09-22 05:07:35 -04:00
|
|
|
|
(version "1.10.19")
|
2017-08-03 09:55:05 -04:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://datatables.net/releases/DataTables-"
|
|
|
|
|
version ".zip"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-22 05:07:35 -04:00
|
|
|
|
"0cff8a1g7pjwbjdqq0yzqd963ar7pfi4splmm6rwdzganr77rkhb"))))
|
2017-08-03 09:55:05 -04:00
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:javascript-files '("media/js/dataTables.bootstrap.js"
|
|
|
|
|
"media/js/jquery.dataTables.js")))
|
|
|
|
|
(native-inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list unzip))
|
2017-08-03 09:55:05 -04:00
|
|
|
|
(home-page "https://datatables.net")
|
|
|
|
|
(synopsis "DataTables plug-in for jQuery")
|
|
|
|
|
(description "DataTables is a table enhancing plug-in for the jQuery
|
|
|
|
|
Javascript library, adding sorting, paging and filtering abilities to plain
|
|
|
|
|
HTML tables with minimal effort.")
|
|
|
|
|
(license license:expat)))
|
2017-08-03 09:55:22 -04:00
|
|
|
|
|
2019-09-15 15:19:53 -04:00
|
|
|
|
(define-public js-requirejs
|
|
|
|
|
(package
|
|
|
|
|
(name "js-requirejs")
|
|
|
|
|
(version "2.3.6")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
gnu: Remove ".git" from "https://github/…/….git".
Until now, 'lookup-origin' and thus 'lookup-origin-revision' in (guix
swh) would sometimes return #f for these because the ".git" URLs are
redirects to the non-".git" URLs. Consequently, 'guix lint -c archival'
would keep saying "scheduled Software Heritage archival"; likewise, the
fallback download code would fail.
* gnu/packages/ada.scm,
gnu/packages/admin.scm,
gnu/packages/aidc.scm,
gnu/packages/algebra.scm,
gnu/packages/android.scm,
gnu/packages/animation.scm,
gnu/packages/arcan.scm,
gnu/packages/assembly.scm,
gnu/packages/audio.scm,
gnu/packages/authentication.scm,
gnu/packages/avr.scm,
gnu/packages/axoloti.scm,
gnu/packages/backup.scm,
gnu/packages/bash.scm,
gnu/packages/benchmark.scm,
gnu/packages/bioconductor.scm,
gnu/packages/bioinformatics.scm,
gnu/packages/bittorrent.scm,
gnu/packages/boost.scm,
gnu/packages/build-tools.scm,
gnu/packages/c.scm,
gnu/packages/calendar.scm,
gnu/packages/cdrom.scm,
gnu/packages/check.scm,
gnu/packages/chemistry.scm,
gnu/packages/chez.scm,
gnu/packages/clojure.scm,
gnu/packages/code.scm,
gnu/packages/compression.scm,
gnu/packages/compton.scm,
gnu/packages/coq.scm,
gnu/packages/cpp.scm,
gnu/packages/cran.scm,
gnu/packages/crypto.scm,
gnu/packages/curl.scm,
gnu/packages/databases.scm,
gnu/packages/datastructures.scm,
gnu/packages/debug.scm,
gnu/packages/disk.scm,
gnu/packages/distributed.scm,
gnu/packages/django.scm,
gnu/packages/dlang.scm,
gnu/packages/dns.scm,
gnu/packages/docker.scm,
gnu/packages/education.scm,
gnu/packages/efi.scm,
gnu/packages/elixir.scm,
gnu/packages/emacs-xyz.scm,
gnu/packages/embedded.scm,
gnu/packages/emulators.scm,
gnu/packages/engineering.scm,
gnu/packages/erlang.scm,
gnu/packages/fabric-management.scm,
gnu/packages/file-systems.scm,
gnu/packages/finance.scm,
gnu/packages/firmware.scm,
gnu/packages/flashing-tools.scm,
gnu/packages/fonts.scm,
gnu/packages/fontutils.scm,
gnu/packages/fpga.scm,
gnu/packages/game-development.scm,
gnu/packages/games.scm,
gnu/packages/genealogy.scm,
gnu/packages/genimage.scm,
gnu/packages/geo.scm,
gnu/packages/gimp.scm,
gnu/packages/gl.scm,
gnu/packages/gnome-xyz.scm,
gnu/packages/gnome.scm,
gnu/packages/gnuzilla.scm,
gnu/packages/golang.scm,
gnu/packages/gpodder.scm,
gnu/packages/graph.scm,
gnu/packages/graphics.scm,
gnu/packages/graphviz.scm,
gnu/packages/groff.scm,
gnu/packages/groovy.scm,
gnu/packages/gtk.scm,
gnu/packages/guile-xyz.scm,
gnu/packages/guile.scm,
gnu/packages/hardware.scm,
gnu/packages/haskell-apps.scm,
gnu/packages/haskell-xyz.scm,
gnu/packages/hexedit.scm,
gnu/packages/i2p.scm,
gnu/packages/ibus.scm,
gnu/packages/image-processing.scm,
gnu/packages/image-viewers.scm,
gnu/packages/image.scm,
gnu/packages/ipfs.scm,
gnu/packages/java-graphics.scm,
gnu/packages/java-maths.scm,
gnu/packages/java.scm,
gnu/packages/javascript.scm,
gnu/packages/jrnl.scm,
gnu/packages/julia.scm,
gnu/packages/jupyter.scm,
gnu/packages/kodi.scm,
gnu/packages/language.scm,
gnu/packages/lego.scm,
gnu/packages/less.scm,
gnu/packages/libusb.scm,
gnu/packages/linux.scm,
gnu/packages/lirc.scm,
gnu/packages/lisp-xyz.scm,
gnu/packages/llvm.scm,
gnu/packages/logging.scm,
gnu/packages/lolcode.scm,
gnu/packages/lua.scm,
gnu/packages/lxde.scm,
gnu/packages/lxqt.scm,
gnu/packages/machine-learning.scm,
gnu/packages/mail.scm,
gnu/packages/markup.scm,
gnu/packages/maths.scm,
gnu/packages/maven.scm,
gnu/packages/mes.scm,
gnu/packages/messaging.scm,
gnu/packages/monitoring.scm,
gnu/packages/mpd.scm,
gnu/packages/music.scm,
gnu/packages/networking.scm,
gnu/packages/node-xyz.scm,
gnu/packages/ocaml.scm,
gnu/packages/ocr.scm,
gnu/packages/onc-rpc.scm,
gnu/packages/opencl.scm,
gnu/packages/opencog.scm,
gnu/packages/pantheon.scm,
gnu/packages/password-utils.scm,
gnu/packages/patchutils.scm,
gnu/packages/pdf.scm,
gnu/packages/perl6.scm,
gnu/packages/phabricator.scm,
gnu/packages/popt.scm,
gnu/packages/printers.scm,
gnu/packages/prolog.scm,
gnu/packages/protobuf.scm,
gnu/packages/pulseaudio.scm,
gnu/packages/python-crypto.scm,
gnu/packages/python-web.scm,
gnu/packages/python-xyz.scm,
gnu/packages/qt.scm,
gnu/packages/radio.scm,
gnu/packages/rails.scm,
gnu/packages/rdf.scm,
gnu/packages/rednotebook.scm,
gnu/packages/rpc.scm,
gnu/packages/rsync.scm,
gnu/packages/ruby.scm,
gnu/packages/rust.scm,
gnu/packages/scheme.scm,
gnu/packages/screen.scm,
gnu/packages/security-token.scm,
gnu/packages/selinux.scm,
gnu/packages/serialization.scm,
gnu/packages/shells.scm,
gnu/packages/shellutils.scm,
gnu/packages/simh.scm,
gnu/packages/sml.scm,
gnu/packages/ssh.scm,
gnu/packages/statistics.scm,
gnu/packages/stenography.scm,
gnu/packages/sync.scm,
gnu/packages/syncthing.scm,
gnu/packages/synergy.scm,
gnu/packages/telephony.scm,
gnu/packages/terminals.scm,
gnu/packages/tex.scm,
gnu/packages/texinfo.scm,
gnu/packages/text-editors.scm,
gnu/packages/textutils.scm,
gnu/packages/time.scm,
gnu/packages/tmux.scm,
gnu/packages/tor.scm,
gnu/packages/toys.scm,
gnu/packages/version-control.scm,
gnu/packages/video.scm,
gnu/packages/vim.scm,
gnu/packages/virtualization.scm,
gnu/packages/vlang.scm,
gnu/packages/vnc.scm,
gnu/packages/vpn.scm,
gnu/packages/web-browsers.scm,
gnu/packages/web.scm,
gnu/packages/wireservice.scm,
gnu/packages/wm.scm,
gnu/packages/wxwidgets.scm,
gnu/packages/xdisorg.scm,
gnu/packages/xml.scm,
gnu/packages/xorg.scm,
tests/lint.scm: Remove trailing ".git" from 'git-reference' URL.
2020-07-12 16:53:28 -04:00
|
|
|
|
(url "https://github.com/requirejs/requirejs")
|
2019-09-15 15:19:53 -04:00
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0cvd5y2mb3h6yil3niqn3gjqrzixdsxcz4rvc2f0hg4kzp5y0w86"))))
|
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments `(#:javascript-files '("require.js")))
|
|
|
|
|
(home-page "https://github.com/requirejs/requirejs/")
|
|
|
|
|
(synopsis "File and module loader for JavaScript")
|
|
|
|
|
(description "RequireJS loads plain JavaScript files as well as more
|
|
|
|
|
defined modules. It is optimized for in-browser use, including in a Web
|
|
|
|
|
Worker, but it can be used in other JavaScript environments.")
|
|
|
|
|
(license license:expat)))
|
|
|
|
|
|
2017-08-03 09:55:22 -04:00
|
|
|
|
(define-public js-selectize
|
|
|
|
|
(package
|
|
|
|
|
(name "js-selectize")
|
2019-09-08 09:03:41 -04:00
|
|
|
|
(version "0.12.6")
|
2017-08-03 09:55:22 -04:00
|
|
|
|
(source (origin
|
2019-09-08 09:02:40 -04:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/selectize/selectize.js")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
2017-08-03 09:55:22 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-08 09:03:41 -04:00
|
|
|
|
"15gichl8wi6yxag2ps723nxrgyan15976dzsnvw9h9py8sbyyzjn"))))
|
2017-08-03 09:55:22 -04:00
|
|
|
|
(build-system minify-build-system)
|
2022-02-22 17:19:36 -05:00
|
|
|
|
;; We use the standalone file instead of src/selectize.js because the
|
|
|
|
|
;; former includes the source code for MicroEvent and other modules that
|
|
|
|
|
;; Selectize refers to.
|
|
|
|
|
(arguments `(#:javascript-files '("dist/js/standalone/selectize.js")))
|
2020-01-18 14:11:11 -05:00
|
|
|
|
(home-page "https://selectize.github.io/selectize.js/")
|
2017-08-03 09:55:22 -04:00
|
|
|
|
(synopsis "Hybrid widget between a textbox and <select> box")
|
|
|
|
|
(description "Selectize is the hybrid of a textbox and @code{<select>}
|
|
|
|
|
box. It's jQuery based and it has autocomplete and native-feeling keyboard
|
|
|
|
|
navigation; it is useful for tagging, contact lists, etc.")
|
|
|
|
|
(license license:asl2.0)))
|
2017-08-03 09:55:39 -04:00
|
|
|
|
|
|
|
|
|
(define-public js-es5-shim
|
|
|
|
|
(package
|
|
|
|
|
(name "js-es5-shim")
|
2019-09-08 09:06:31 -04:00
|
|
|
|
(version "4.5.13")
|
2017-08-03 09:55:39 -04:00
|
|
|
|
(source (origin
|
2019-09-08 09:05:28 -04:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/es-shims/es5-shim")
|
|
|
|
|
(commit (string-append "v" version))))
|
|
|
|
|
(file-name (git-file-name name version))
|
2017-08-03 09:55:39 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-08 09:06:31 -04:00
|
|
|
|
"142w384fbyllq4yggv173g82lw3wix4jqcg6hkhx1ymq89vvnpmh"))))
|
2017-08-03 09:55:39 -04:00
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments `(#:javascript-files
|
|
|
|
|
'("es5-sham.js"
|
|
|
|
|
"es5-shim.js")))
|
|
|
|
|
(home-page "https://github.com/es-shims/es5-shim")
|
|
|
|
|
(synopsis "ECMAScript 5 compatibility shims for legacy JavaScript engines")
|
|
|
|
|
(description "@code{es5-shim.js} patches a JavaScript context to contain
|
|
|
|
|
all ECMAScript 5 methods that can be faithfully emulated with a legacy
|
|
|
|
|
JavaScript engine. @code{es5-sham.js} patches other ES5 methods as closely as
|
|
|
|
|
possible. Many of these shams are intended only to allow code to be written
|
|
|
|
|
to ES5 without causing run-time errors in older engines. In many cases, this
|
|
|
|
|
means that these shams cause many ES5 methods to silently fail.")
|
|
|
|
|
(license license:expat)))
|
2017-11-12 11:43:20 -05:00
|
|
|
|
|
2018-05-09 17:14:58 -04:00
|
|
|
|
(define-public js-filesaver
|
|
|
|
|
(package
|
|
|
|
|
(name "js-filesaver")
|
|
|
|
|
(version "1.3.8")
|
|
|
|
|
(source (origin
|
2019-09-08 09:08:18 -04:00
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/eligrey/FileSaver.js")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
2018-05-09 17:14:58 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-09-08 09:08:18 -04:00
|
|
|
|
"0gvqk0hnr8fig0n4da7vj7q6z31bcyv52916xz3rbmdj3pgpiv1d"))))
|
2018-05-09 17:14:58 -04:00
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'fix-uglification
|
2021-09-18 01:05:55 -04:00
|
|
|
|
;; Remove "export" keyword. That keyword is not present in
|
2018-05-09 17:14:58 -04:00
|
|
|
|
;; the minified version of the library some projects are using,
|
|
|
|
|
;; e.g.,
|
|
|
|
|
;; <https://github.com/jmoenig/Snap--Build-Your-Own-Blocks/blob/master/FileSaver.min.js>
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "src/FileSaver.js"
|
|
|
|
|
(("export ") ""))
|
2020-09-02 04:54:00 -04:00
|
|
|
|
#t))
|
|
|
|
|
(add-after 'install 'install-unminified-version
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(install-file "src/FileSaver.js"
|
|
|
|
|
(string-append (assoc-ref outputs "out")
|
|
|
|
|
"/share/javascript"))
|
2018-05-09 17:14:58 -04:00
|
|
|
|
#t)))))
|
|
|
|
|
(home-page
|
|
|
|
|
"https://eligrey.com/blog/saving-generated-files-on-the-client-side/")
|
|
|
|
|
(synopsis "HTML5 saveAs() FileSaver implementation")
|
|
|
|
|
(description "@file{FileSaver.js} implements the @code{saveAs()}
|
|
|
|
|
FileSaver interface in browsers that do not natively support it.
|
|
|
|
|
|
|
|
|
|
@file{FileSaver.js} is the solution to saving files on the
|
|
|
|
|
client-side, and is perfect for webapps that need to generate files,
|
|
|
|
|
or for saving sensitive information that shouldn't be sent to an
|
|
|
|
|
external server.")
|
|
|
|
|
(license license:expat)))
|
|
|
|
|
|
2022-09-28 15:55:45 -04:00
|
|
|
|
(define-public js-scianimator
|
|
|
|
|
(package
|
|
|
|
|
(name "js-scianimator")
|
|
|
|
|
(version "1.4")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/brentertz/scianimator.git")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"0b4r6z85gnsjagdchvf1pvrhylfiaidh701hna8jrm0l4kbb735x"))))
|
|
|
|
|
(build-system minify-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
'(#:javascript-files
|
|
|
|
|
(list "assets/js/jquery.scianimator.js")))
|
|
|
|
|
(home-page "https://github.com/brentertz/scianimator")
|
|
|
|
|
(synopsis "Scientific image animator plugin for jQuery")
|
|
|
|
|
(description "SciAnimator provides a simple yet powerful interface for
|
|
|
|
|
animating a series of images.")
|
|
|
|
|
(license license:expat)))
|
|
|
|
|
|
2017-11-12 11:43:20 -05:00
|
|
|
|
(define-public mujs
|
|
|
|
|
(package
|
|
|
|
|
(name "mujs")
|
2023-02-12 09:52:58 -05:00
|
|
|
|
(version "1.3.2")
|
2020-11-23 16:03:27 -05:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/ccxvii/mujs")
|
|
|
|
|
(commit version)))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
2023-02-12 09:52:58 -05:00
|
|
|
|
(base32 "1kfp2246pzmrb65c0gfcy130zd7sbniclpjx2jv6jbkmpkjs8kb1"))
|
2022-05-09 16:10:02 -04:00
|
|
|
|
(snippet
|
|
|
|
|
#~(begin
|
|
|
|
|
(use-modules (guix build utils))
|
|
|
|
|
(for-each delete-file
|
|
|
|
|
(list "astnames.h"
|
|
|
|
|
"opnames.h"
|
|
|
|
|
"one.c"))))))
|
2017-11-12 11:43:20 -05:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
2022-05-09 16:13:27 -04:00
|
|
|
|
(list
|
|
|
|
|
#:phases
|
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(delete 'configure) ; no configure script
|
|
|
|
|
(replace 'install
|
|
|
|
|
(lambda* (#:key (make-flags '()) #:allow-other-keys)
|
|
|
|
|
(apply invoke "make" "install-shared" make-flags))))
|
2020-11-23 16:03:27 -05:00
|
|
|
|
#:make-flags
|
2022-05-09 16:13:27 -04:00
|
|
|
|
#~(list (string-append "VERSION=" #$version)
|
|
|
|
|
(string-append "CC=" #$(cc-for-target))
|
|
|
|
|
(string-append "prefix=" #$output))
|
2018-08-28 16:04:16 -04:00
|
|
|
|
#:tests? #f)) ; no tests
|
|
|
|
|
(inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list readline))
|
2019-07-10 05:16:03 -04:00
|
|
|
|
(home-page "https://mujs.com/")
|
2017-11-12 11:43:20 -05:00
|
|
|
|
(synopsis "JavaScript interpreter written in C")
|
|
|
|
|
(description "MuJS is a lightweight Javascript interpreter designed for
|
|
|
|
|
embedding in other software to extend them with scripting capabilities. MuJS
|
|
|
|
|
was designed with a focus on small size, correctness, and simplicity. It is
|
|
|
|
|
written in portable C and implements ECMAScript as specified by ECMA-262. The
|
|
|
|
|
interface for binding with native code is designed to be as simple as possible
|
|
|
|
|
to use, and is very similar to Lua. There is no need to interact with byzantine
|
|
|
|
|
C++ template mechanisms, or worry about marking and unmarking garbage collection
|
|
|
|
|
roots, or wrestle with obscure build systems.")
|
|
|
|
|
(license license:isc)))
|
2020-09-13 21:13:31 -04:00
|
|
|
|
|
|
|
|
|
(define-public quickjs
|
|
|
|
|
(package
|
|
|
|
|
(name "quickjs")
|
2021-03-30 17:05:45 -04:00
|
|
|
|
(version "2021-03-27")
|
2020-09-13 21:13:31 -04:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://bellard.org/quickjs/quickjs-"
|
|
|
|
|
version ".tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2021-03-30 17:05:45 -04:00
|
|
|
|
"06pywwpmfwjz225h59wf90q96a2fd66qfcw5xa6m6y9k9k7glnx4"))))
|
2020-09-13 21:13:31 -04:00
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:make-flags
|
|
|
|
|
(list "prefix="
|
|
|
|
|
(string-append "DESTDIR=" %output))
|
|
|
|
|
#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(delete 'configure)
|
|
|
|
|
(replace 'check
|
|
|
|
|
(lambda _
|
|
|
|
|
(invoke "make" "microbench"))))))
|
|
|
|
|
(home-page "https://bellard.org/quickjs/")
|
|
|
|
|
(synopsis "Small embeddable Javascript engine")
|
|
|
|
|
(description "QuickJS supports the ES2020 specification including modules,
|
|
|
|
|
asynchronous generators, proxies, BigInt and BigDecimal. It can compile
|
|
|
|
|
Javascript sources to executables with no external dependency. It includes a
|
|
|
|
|
command line interpreter with contextual colorization implemented in
|
|
|
|
|
Javascript and a small built-in standard library with C library wrappers.")
|
|
|
|
|
(license license:expat)))
|
2021-01-07 06:31:41 -05:00
|
|
|
|
|
|
|
|
|
(define-public duktape
|
|
|
|
|
(package
|
|
|
|
|
(name "duktape")
|
|
|
|
|
(version "2.6.0")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://duktape.org/duktape-"
|
|
|
|
|
version ".tar.xz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n"))))
|
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(arguments
|
2022-06-11 20:00:01 -04:00
|
|
|
|
(list #:tests? #f ; No tests.
|
|
|
|
|
#:make-flags
|
|
|
|
|
#~(list "-f" "Makefile.sharedlibrary"
|
|
|
|
|
(string-append "INSTALL_PREFIX="
|
|
|
|
|
;; XXX Replace with #$output on core-updates.
|
|
|
|
|
#$(if (%current-target-system)
|
|
|
|
|
#~#$output
|
2022-06-11 20:00:01 -04:00
|
|
|
|
#~%output))
|
|
|
|
|
;; XXX Unconditionally set to CC-FOR-TARGET on core-updates.
|
|
|
|
|
#$@(if (%current-target-system)
|
|
|
|
|
#~((string-append "CC=" #$(cc-for-target)))
|
|
|
|
|
#~()))
|
2022-06-11 20:00:01 -04:00
|
|
|
|
#:phases
|
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
|
(delete 'configure)
|
|
|
|
|
;; At least another major GNU/Linux distribution carries their own
|
|
|
|
|
;; .pc file with this package.
|
|
|
|
|
(add-after 'install 'install-pkg-config
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(pkg-config-dir (string-append out "/lib/pkgconfig")))
|
|
|
|
|
(mkdir-p pkg-config-dir)
|
|
|
|
|
(with-output-to-file (string-append pkg-config-dir "/duktape.pc")
|
|
|
|
|
(lambda _
|
|
|
|
|
(format #t "prefix=~@*~a~@
|
2021-10-29 01:56:24 -04:00
|
|
|
|
libdir=${prefix}/lib~@
|
|
|
|
|
includedir=${prefix}/include~@
|
|
|
|
|
|
|
|
|
|
Name: duktape~@
|
|
|
|
|
Description: Embeddable Javascript engine~@
|
|
|
|
|
Version: ~a~@
|
|
|
|
|
Libs: -L${libdir} -lduktape~@
|
|
|
|
|
Cflags: -I${includedir}~%"
|
2022-06-11 20:00:01 -04:00
|
|
|
|
out #$version)))))))))
|
2021-01-07 06:31:41 -05:00
|
|
|
|
(home-page "https://duktape.org/")
|
|
|
|
|
(synopsis "Small embeddable Javascript engine")
|
|
|
|
|
(description "Duktape is an embeddable Javascript engine, with a focus on
|
|
|
|
|
portability and compact footprint. Duktape is easy to integrate into a C/C++
|
|
|
|
|
project: add @file{duktape.c}, @file{duktape.h}, and @file{duk_config.h} to
|
|
|
|
|
your build, and use the Duktape API to call ECMAScript functions from C code
|
|
|
|
|
and vice versa.")
|
|
|
|
|
(license license:expat)))
|
2022-02-15 17:07:28 -05:00
|
|
|
|
|
|
|
|
|
(define-public rhino
|
|
|
|
|
(package
|
|
|
|
|
(name "rhino")
|
|
|
|
|
(version "1.7.7.2")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method git-fetch)
|
|
|
|
|
(uri (git-reference
|
|
|
|
|
(url "https://github.com/mozilla/rhino.git")
|
|
|
|
|
(commit "935942527ff434b205e797df4185518e5369466e")))
|
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"09i4yr98hs6855fs7fhgmrpiwpr90lhxdv2bvfj97nn4rv1d7wl8"))
|
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
|
(snippet '(begin
|
|
|
|
|
;; Remove benchmark testing
|
|
|
|
|
(delete-file-recursively "testsrc/benchmarks")
|
|
|
|
|
(delete-file-recursively
|
|
|
|
|
"testsrc/org/mozilla/javascript/benchmarks")
|
|
|
|
|
;; Identify bundled jars
|
|
|
|
|
(format #t "~%~a~%" "Sourced jars")
|
|
|
|
|
(for-each (lambda (f)
|
|
|
|
|
(format #t "~/Deleting: ~a~%" f)
|
|
|
|
|
(delete-file f))
|
|
|
|
|
(find-files "." "\\.jar$"))))))
|
|
|
|
|
(build-system ant-build-system)
|
|
|
|
|
(inputs (list bash-minimal))
|
|
|
|
|
(native-inputs (list java-junit java-hamcrest-core java-snakeyaml))
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:phases
|
|
|
|
|
(modify-phases
|
|
|
|
|
%standard-phases
|
2022-06-05 14:03:22 -04:00
|
|
|
|
(add-after 'unpack 'remove-build-dates
|
|
|
|
|
;; Avoid embedding build date for reproducible builds
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute*
|
|
|
|
|
"build.properties"
|
|
|
|
|
(("..implementation.date.") ""))))
|
2022-02-15 17:07:28 -05:00
|
|
|
|
(replace 'check
|
|
|
|
|
(lambda* (#:key tests? inputs native-inputs
|
|
|
|
|
#:allow-other-keys)
|
|
|
|
|
(when tests?
|
|
|
|
|
(setenv "ANT_OPTS" "-Doffline=true")
|
|
|
|
|
(let ((junit-lib
|
|
|
|
|
(assoc-ref inputs "java-junit"))
|
|
|
|
|
(hamcrest-lib
|
|
|
|
|
(assoc-ref inputs "java-hamcrest-core"))
|
|
|
|
|
(snakeyaml-lib
|
|
|
|
|
(assoc-ref inputs "java-snakeyaml")))
|
|
|
|
|
(with-directory-excursion "testsrc"
|
|
|
|
|
(substitute* "build.xml"
|
|
|
|
|
(("<pathelement location=\"\\$\\{xbean.jar\\}\" */>" all)
|
|
|
|
|
(string-append "<!-- " all " -->"))
|
|
|
|
|
(("<pathelement location=\"\\$\\{jsr173.jar\\}\" */>" all)
|
|
|
|
|
(string-append "<!-- " all " -->"))
|
|
|
|
|
(("<pathelement path=\"\\$\\{coverage.classes.dir\\}\" */>"
|
|
|
|
|
all)
|
|
|
|
|
(string-append "<!-- " all " -->"))
|
|
|
|
|
(("<pathelement path=\"lib/emma.jar\"/>" all)
|
|
|
|
|
(string-append "<!-- " all " -->"))
|
|
|
|
|
(("<pathelement path=\"lib/junit.jar\" ?/>")
|
|
|
|
|
(string-append
|
|
|
|
|
"<fileset dir=\"" junit-lib "\" includes=\"**/*.jar\"/>"))
|
|
|
|
|
(("<pathelement path=\"lib/hamcrest.jar\" ?/>")
|
|
|
|
|
(string-append "<fileset dir=\"" hamcrest-lib
|
|
|
|
|
"\" includes=\"**/*.jar\"/>"))
|
|
|
|
|
(("<pathelement path=\"lib/snakeyaml.jar\" ?/>")
|
|
|
|
|
(string-append "<fileset dir=\"" snakeyaml-lib
|
|
|
|
|
"\" includes=\"**/*.jar\"/>"))
|
|
|
|
|
;; Disabling instrumentation.
|
|
|
|
|
(("(<target name=\"junit\" depends=\"junit-compile),.*"
|
|
|
|
|
all pre)
|
|
|
|
|
(string-append pre "\">"))))
|
|
|
|
|
(invoke "ant" "junit")))))
|
|
|
|
|
(replace 'install
|
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(pkg+ver (string-append ,name ,version))
|
|
|
|
|
(bin (string-append out "/bin"))
|
|
|
|
|
(rhino (string-append bin "/rhino"))
|
|
|
|
|
(man (string-append out "/share/man/man1")))
|
|
|
|
|
(mkdir-p bin)
|
|
|
|
|
(install-file "man/rhino.1" man)
|
|
|
|
|
(install-file (string-append "build/" pkg+ver
|
|
|
|
|
"/js.jar")
|
|
|
|
|
(string-append out "/share/java"))
|
|
|
|
|
(with-output-to-file rhino
|
|
|
|
|
(lambda _
|
|
|
|
|
(format #t "#!~a~%~a -jar ~a $@~%"
|
|
|
|
|
(search-input-file inputs "/bin/bash")
|
|
|
|
|
(search-input-file inputs "/bin/java")
|
|
|
|
|
(string-append out "/share/java/js.jar"))))
|
|
|
|
|
(chmod rhino #o755)))))))
|
|
|
|
|
(home-page "https://mozilla.github.io/rhino")
|
|
|
|
|
(synopsis "Javascript implemented in Java")
|
|
|
|
|
(description
|
|
|
|
|
"Rhino implements ECMAScript, also known as JavaScript, in Java as
|
|
|
|
|
specified in the fifth edition of ECMA-262.")
|
|
|
|
|
(license license:mpl2.0)))
|
|
|
|
|
|