summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage/threejs-sage.nix
blob: bc7230f333ab158961281b6edc470ba9dc1d1f2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
  pname = "threejs-sage";
  version = "r122";

  src = fetchFromGitHub {
    owner = "sagemath";
    repo = "threejs-sage";
    rev = version;
    sha256 = "sha256-xPAPt36Fon3hYQq6SOmGkIyUzAII2LMl10nqYG4UPI0=";
  };

  installPhase = ''
    mkdir -p "$out/lib/node_modules/three/"
    cp version "$out/lib/node_modules/three"
    cp -r build "$out/lib/node_modules/three/$(cat version)"
  '';
}