nixpkgs/pkgs/applications/science/math/sage/env-locations.nix

50 lines
1.8 KiB
Nix
Raw Normal View History

{ writeTextFile
2018-04-24 23:53:36 +02:00
, pari_data
, pari
, singular
, maxima-ecl
, conway_polynomials
, graphs
, elliptic_curves
, polytopes_db
2019-01-17 00:28:37 +01:00
, gap
2018-04-24 23:53:36 +02:00
, ecl
, combinatorial_designs
, jmol
, mathjax
, three
, cysignals
}:
2018-11-12 23:28:29 +01:00
# A bash script setting various environment variables to tell sage where
# the files its looking fore are located. Also see `sage-env`.
2018-04-24 23:53:36 +02:00
writeTextFile rec {
name = "sage-env-locations";
destination = "/${name}";
text = ''
export GP_DATA_DIR="${pari_data}/share/pari"
export PARI_DATA_DIR="${pari_data}"
export GPHELP="${pari}/bin/gphelp"
export GPDOCDIR="${pari}/share/pari/doc"
export SINGULARPATH='${singular}/share/singular'
export SINGULAR_SO='${singular}/lib/libSingular.so'
export GAP_SO='${gap}/lib/libgap.so'
2018-04-24 23:53:36 +02:00
export SINGULAR_EXECUTABLE='${singular}/bin/Singular'
export MAXIMA_FAS='${maxima-ecl}/lib/maxima/${maxima-ecl.version}/binary-ecl/maxima.fas'
export MAXIMA_PREFIX="${maxima-ecl}"
export CONWAY_POLYNOMIALS_DATA_DIR='${conway_polynomials}/share/conway_polynomials'
export GRAPHS_DATA_DIR='${graphs}/share/graphs'
export ELLCURVE_DATA_DIR='${elliptic_curves}/share/ellcurves'
export POLYTOPE_DATA_DIR='${polytopes_db}/share/reflexive_polytopes'
2019-01-17 00:28:37 +01:00
export GAP_ROOT_DIR='${gap}/share/gap/build-dir'
2018-04-24 23:53:36 +02:00
export ECLDIR='${ecl}/lib/ecl-${ecl.version}/'
export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs"
export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona"
2018-12-01 21:26:37 +01:00
export JMOL_DIR="${jmol}/share/jmol" # point to the directory that contains JmolData.jar
2018-08-25 14:04:46 +02:00
export JSMOL_DIR="${jmol}/share/jsmol"
2018-04-24 23:53:36 +02:00
export MATHJAX_DIR="${mathjax}/lib/node_modules/mathjax"
export THREEJS_DIR="${three}/lib/node_modules/three"
export SAGE_INCLUDE_DIRECTORIES="${cysignals}/lib/python2.7/site-packages"
'';
}