diff options
author | Alexander_Kabui | 2025-08-22 16:07:54 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-08-22 09:11:45 -0500 |
commit | 856d520c703f7132294df3114bf3c3fafd896b39 (patch) | |
tree | e191369224bf9726d30d097123b5208d55b0e038 /gn/packages/javascript.scm | |
parent | c4d6e5a54bdacde0b2f694e91cc73b40b3a151da (diff) | |
download | guix-bioinformatics-856d520c703f7132294df3114bf3c3fafd896b39.tar.gz |
gn: javascript-marked-highlight: Install marked-highlight.js. * gn/packages/javascript.scm (javascript-marked-highlight): Rename built file to marked-highlight.js and install it under share/genenetwork2/javascript/marked.
Diffstat (limited to 'gn/packages/javascript.scm')
-rw-r--r-- | gn/packages/javascript.scm | 64 |
1 files changed, 45 insertions, 19 deletions
diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm index a3f6dd4..059999b 100644 --- a/gn/packages/javascript.scm +++ b/gn/packages/javascript.scm @@ -2243,27 +2243,53 @@ vector graphics.") "A low-level markdown compiler for parsing markdown without caching or blocking for long periods of time.") (license license:expat))) + (define-public javascript-marked-highlight (package - (name "javascript-marked-highlight") - (version "2.0.6") - (source - (origin - (method url-fetch) - (uri - (string-append "https://github.com/markedjs/marked-highlight/archive/refs/tags/v" - version - ".tar.gz")) - (sha256 - (base32 - "14pvaknic0pwh1ll7i0z66mi2gviww35palmk03xidyywlbvwklr")))) - (build-system minify-build-system) - (native-inputs `(("source" ,source))) - (home-page "https://github.com/markedjs/marked-highlight") - (synopsis "Highlight code blocks.") - (description - "Add code highlighting to marked.") - (license license:expat))) + (name "javascript-marked-highlight") + (version "2.0.6") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/markedjs/marked-highlight/archive/refs/tags/v" + version ".tar.gz")) + (sha256 + (base32 "14pvaknic0pwh1ll7i0z66mi2gviww35palmk03xidyywlbvwklr")))) + (build-system minify-build-system) + (arguments + `(#:javascript-files (list "src/index.js") + #:phases (modify-phases %standard-phases + (add-before 'install 'rename-minified-js + (lambda* _ + (for-each (lambda (file) + ;; rename to "marked-highlight.js" + (copy-recursively file + (string-append (dirname + file) + "/marked-highlight.js"))) + (find-files (string-append (getcwd) + "/guix/build") + "\\.min\\.js$")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (use-modules (guix build utils)) + (let* ((out (assoc-ref outputs "out")) + (targetdir (string-append out + "/share/genenetwork2/javascript/marked"))) + (mkdir-p targetdir) + (for-each (lambda (file) + (install-file file targetdir)) + (find-files (string-append (getcwd) + "/guix/build") + "marked-highlight\\.js$")))))))) + (home-page "https://github.com/markedjs/marked-highlight") + (synopsis "Code highlighting extension for Marked") + (description + "This package provides a plugin for the Marked Markdown parser that adds +syntax highlighting support for fenced code blocks.") + (license license:expat))) + (define-public javascript-ace (package |