2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, python
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mathjax
|
|
|
|
, twisted
|
|
|
|
, flask
|
|
|
|
, flask-oldsessions
|
|
|
|
, flask-openid
|
|
|
|
, flask-autoindex
|
|
|
|
, flask-babel
|
|
|
|
}:
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sagenb";
|
|
|
|
version = "1.1.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sagemath";
|
|
|
|
repo = "sagenb";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0bxvhr03qh2nsjdfc4pyfiqrn9jhp3vf7irsc9gqx0185jlblbxs";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# cmp deprecation in attrs needs to be handled in twisted
|
|
|
|
./patches/sagenb-cmp-deprecation.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
2020-11-21 19:51:51 +00:00
|
|
|
maintainers = teams.sage.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# let sagenb use mathjax
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/${python.sitePackages}/sagenb/data"
|
|
|
|
ln -s ${mathjax}/lib/node_modules/mathjax "$out/${python.sitePackages}/sagenb/data/mathjax"
|
|
|
|
'';
|
|
|
|
}
|