2018-04-24 22:53:36 +01:00
|
|
|
{ stdenv
|
|
|
|
, python
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mathjax
|
|
|
|
, twisted
|
|
|
|
, flask
|
|
|
|
, flask-oldsessions
|
|
|
|
, flask-openid
|
|
|
|
, flask-autoindex
|
|
|
|
, flask-babel
|
|
|
|
}:
|
|
|
|
|
2018-11-12 22:28:29 +00:00
|
|
|
# Has a cyclic dependency with sage (not expressed here) and is not useful outside of sage.
|
|
|
|
# Deprecated, hopefully soon to be removed. See
|
|
|
|
# https://trac.sagemath.org/ticket/25837
|
|
|
|
|
2018-04-24 22:53:36 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sagenb";
|
2019-02-11 12:18:16 +00:00
|
|
|
version = "1.1.2";
|
2018-04-24 22:53:36 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sagemath";
|
|
|
|
repo = "sagenb";
|
2019-02-11 12:18:16 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "0bxvhr03qh2nsjdfc4pyfiqrn9jhp3vf7irsc9gqx0185jlblbxs";
|
2018-04-24 22:53:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
twisted
|
|
|
|
flask
|
|
|
|
flask-oldsessions
|
|
|
|
flask-openid
|
|
|
|
flask-autoindex
|
|
|
|
flask-babel
|
|
|
|
];
|
|
|
|
|
|
|
|
# tests depend on sage
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Sage Notebook";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ timokau ];
|
|
|
|
};
|
|
|
|
|
|
|
|
# let sagenb use mathjax
|
|
|
|
postInstall = ''
|
2018-12-01 19:41:07 +00:00
|
|
|
mkdir -p "$out/${python.sitePackages}/sagenb/data"
|
|
|
|
ln -s ${mathjax}/lib/node_modules/mathjax "$out/${python.sitePackages}/sagenb/data/mathjax"
|
2018-04-24 22:53:36 +01:00
|
|
|
'';
|
|
|
|
}
|