about summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-03-31 10:47:18 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-04-17 16:24:09 -0500
commit1c8aba83340be3713f68410d1d273a8b15e7e007 (patch)
treefdc752744f384be57b6ff3c65495018432bff0ab /pkgs/applications/science/math/sage
parent43873351ffed36b52170571839e26b57c9f15920 (diff)
downloadnixlib-1c8aba83340be3713f68410d1d273a8b15e7e007.tar
nixlib-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.gz
nixlib-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.bz2
nixlib-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.lz
nixlib-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.xz
nixlib-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.zst
nixlib-1c8aba83340be3713f68410d1d273a8b15e7e007.zip
treewide: use blas and lapack
This makes packages use lapack and blas, which can wrap different
BLAS/LAPACK implementations.

treewide: cleanup from blas/lapack changes

A few issues in the original treewide:

- can’t assume blas64 is a bool
- unused commented code
Diffstat (limited to 'pkgs/applications/science/math/sage')
-rw-r--r--pkgs/applications/science/math/sage/sage-env.nix7
-rw-r--r--pkgs/applications/science/math/sage/sage-with-env.nix8
-rw-r--r--pkgs/applications/science/math/sage/sagelib.nix8
3 files changed, 17 insertions, 6 deletions
diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix
index 68e0d134ace2..c0dfeef1119b 100644
--- a/pkgs/applications/science/math/sage/sage-env.nix
+++ b/pkgs/applications/science/math/sage/sage-env.nix
@@ -41,7 +41,8 @@
 , lcalc
 , rubiks
 , flintqs
-, openblasCompat
+, blas
+, lapack
 , flint
 , gmp
 , mpfr
@@ -53,6 +54,8 @@
 , less
 }:
 
+assert (!blas.is64bit) && (!lapack.is64bit);
+
 # This generates a `sage-env` shell file that will be sourced by sage on startup.
 # It sets up various environment variables, telling sage where to find its
 # dependencies.
@@ -114,7 +117,7 @@ writeTextFile rec {
         # testsuite instead, but since all the packages are also runtime
         # dependencies it doesn't really hurt to include them here.
         singular
-        openblasCompat
+        blas lapack
         fflas-ffpack givaro
         gd
         libpng zlib
diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix
index 524085e8c012..77bc65c2be12 100644
--- a/pkgs/applications/science/math/sage/sage-with-env.nix
+++ b/pkgs/applications/science/math/sage/sage-with-env.nix
@@ -2,7 +2,8 @@
 , lib
 , makeWrapper
 , sage-env
-, openblasCompat
+, blas
+, lapack
 , pkg-config
 , three
 , singular
@@ -21,6 +22,9 @@
 , pythonEnv
 }:
 
+# lots of segfaults with (64 bit) blas
+assert (!blas.is64bit) && (!lapack.is64bit);
+
 # Wrapper that combined `sagelib` with `sage-env` to produce an actually
 # executable sage. No tests are run yet and no documentation is built.
 
@@ -29,7 +33,7 @@ let
     pythonEnv # for patchShebangs
     makeWrapper
     pkg-config
-    openblasCompat # lots of segfaults with regular (64 bit) openblas
+    blas lapack
     singular
     three
     pynac
diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix
index 69f7624078ea..92b4e8efa2ec 100644
--- a/pkgs/applications/science/math/sage/sagelib.nix
+++ b/pkgs/applications/science/math/sage/sagelib.nix
@@ -3,7 +3,8 @@
 , perl
 , buildPythonPackage
 , arb
-, openblasCompat
+, blas
+, lapack
 , brial
 , cliquer
 , cypari2
@@ -52,6 +53,8 @@
 , pplpy
 }:
 
+assert (!blas.is64bit) && (!lapack.is64bit);
+
 # This is the core sage python package. Everything else is just wrappers gluing
 # stuff together. It is not very useful on its own though, since it will not
 # find many of its dependencies without `sage-env`, will not be tested without
@@ -103,7 +106,8 @@ buildPythonPackage rec {
     m4rie
     mpfi
     ntl
-    openblasCompat
+    blas
+    lapack
     pari
     planarity
     ppl