void-packages/srcpkgs/threejs-sage/template
Gonzalo Tornaría 162aebd320 threejs-sage: make it available as a jupyter nbextension
Adds a symlink in /usr/share/jupyter/nbextensions, so that the js is
available in a jupyter notebook.

Otherwise, using 3d plots in the jupyter notebook will hit jsdelivr.net.
2022-04-12 19:46:29 +02:00

20 lines
759 B
Bash

# Template file for 'threejs-sage'
pkgname=threejs-sage
version=r122
revision=2
short_desc="Custom build of three.js for sagemath"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="MIT"
homepage="https://github.com/sagemath/threejs-sage/"
distfiles="https://github.com/sagemath/threejs-sage/archive/refs/tags/${version}.tar.gz"
checksum=718767ab55876a3e957d1cfe89a322c6d9fa680fc737b9ca668aee6a3eac3bb8
do_install() {
vlicense LICENSE
vinstall version 644 usr/share/sagemath/threejs-sage
vinstall build/three.min.js 644 usr/share/sagemath/threejs-sage/$version
# make threejs available as a jupyter notebook extension
vmkdir usr/share/jupyter/nbextensions
ln -s /usr/share/sagemath/threejs-sage ${DESTDIR}/usr/share/jupyter/nbextensions
}