about summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2014-04-22 14:10:36 -0500
committerJohn Wiegley <johnw@newartisans.com>2014-04-22 14:10:36 -0500
commit7ce39b067aad3a2ac18a1dc8a13dc841d0363878 (patch)
tree6cf4aeab160671fe6b5dc8537a7e682c436b699f /pkgs/applications/science/math
parent7d1ddae58e465a1708967c9fee651c33819969c6 (diff)
Add expression for sage
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/sage/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix
new file mode 100644
index 0000000000000..0fd8621b0e0e1
--- /dev/null
+++ b/pkgs/applications/science/math/sage/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, m4, perl, gfortran, texLive, ffmpeg, tk
+, imagemagick, liblapack
+}:
+
+stdenv.mkDerivation rec {
+  name = "sage-6.1.1";
+
+  src = fetchurl {
+    url = "http://mirrors.xmission.com/sage/src/sage-6.1.1.tar.gz";
+    sha256 = "0kbzs0l9q7y34jv3f8rd1c2mrjsjkdgaw6mfdwjlpg9g4gghmq5y";
+  };
+
+  buildInputs = [ m4 perl gfortran texLive ffmpeg tk imagemagick liblapack ];
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    export SAGE_NUM_THREADS=$NIX_BUILD_CORES
+    sed -i 's/if ! [ -d "$HOME" ]/if [ -d "$HOME" ]/' src/bin/sage-env
+  '' ++ stdenv.lib.optionalString stdenv.isDarwin ''
+    sed -i "s/ld_version = try_run('ld  -v')/ld_version = 'Apple'/" \
+      build/pkgs/atlas/configuration.py
+  '';
+
+  meta = {
+    homepage = http://www.scilab.org/;
+    description = "Scientific software package for numerical computations (Matlab lookalike)";
+    # see http://www.scilab.org/legal
+    license = "SciLab";
+  };
+}