summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2018-09-15 17:22:11 +0200
committerTimo Kaufmann <timokau@zoho.com>2018-09-15 17:22:11 +0200
commitc3f652d5a85478fa39e681e74107aaad614f9f38 (patch)
treea1973ad164c1c408474e250508df50ea0f4a2dd3 /pkgs/applications/science/math
parent770c5b8a693e4e757c0c41bfdb85b425a088a4fc (diff)
parent76051c1ef605bb20e7f33eeb4ebdc62a60629915 (diff)
downloadnixpkgs-c3f652d5a85478fa39e681e74107aaad614f9f38.tar
nixpkgs-c3f652d5a85478fa39e681e74107aaad614f9f38.tar.gz
nixpkgs-c3f652d5a85478fa39e681e74107aaad614f9f38.tar.bz2
nixpkgs-c3f652d5a85478fa39e681e74107aaad614f9f38.tar.lz
nixpkgs-c3f652d5a85478fa39e681e74107aaad614f9f38.tar.xz
nixpkgs-c3f652d5a85478fa39e681e74107aaad614f9f38.tar.zst
nixpkgs-c3f652d5a85478fa39e681e74107aaad614f9f38.zip
Merge remote-tracking branch 'upstream/master' into sage-8.4
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/almonds/default.nix3
-rw-r--r--pkgs/applications/science/math/pynac/default.nix1
-rw-r--r--pkgs/applications/science/math/sage/default.nix10
-rw-r--r--pkgs/applications/science/math/sage/openblas-pc.nix17
-rw-r--r--pkgs/applications/science/math/sage/sage-env.nix6
-rw-r--r--pkgs/applications/science/math/sage/sage-with-env.nix6
-rw-r--r--pkgs/applications/science/math/sage/sagelib.nix7
7 files changed, 41 insertions, 9 deletions
diff --git a/pkgs/applications/science/math/almonds/default.nix b/pkgs/applications/science/math/almonds/default.nix
index 96613f4e38a..b5d9632c551 100644
--- a/pkgs/applications/science/math/almonds/default.nix
+++ b/pkgs/applications/science/math/almonds/default.nix
@@ -20,8 +20,7 @@ with python3.pkgs; buildPythonApplication rec {
   meta = with stdenv.lib; {
     description = "Terminal Mandelbrot fractal viewer";
     homepage = https://github.com/Tenchi2xh/Almonds;
-    # No license has been specified
-    license = licenses.unfree;
+    license = licenses.mit;
     maintainers = with maintainers; [ infinisil ];
   };
 }
diff --git a/pkgs/applications/science/math/pynac/default.nix b/pkgs/applications/science/math/pynac/default.nix
index 1a059aeb167..9bbb695a331 100644
--- a/pkgs/applications/science/math/pynac/default.nix
+++ b/pkgs/applications/science/math/pynac/default.nix
@@ -41,6 +41,7 @@ stdenv.mkDerivation rec {
       of the full GiNaC, and it is *only* meant to be used as a Python library.
     '';
     homepage    = http://pynac.org;
+    license = licenses.gpl3;
     maintainers = with maintainers; [ timokau ];
     platforms   = platforms.linux;
   };
diff --git a/pkgs/applications/science/math/sage/default.nix b/pkgs/applications/science/math/sage/default.nix
index 08e3a752b8b..7e62f0cf75e 100644
--- a/pkgs/applications/science/math/sage/default.nix
+++ b/pkgs/applications/science/math/sage/default.nix
@@ -21,7 +21,7 @@ let
 
       sagelib = self.callPackage ./sagelib.nix {
         inherit flint ecl arb;
-        inherit sage-src pynac singular;
+        inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
         linbox = nixpkgs.linbox.override { withSage = true; };
       };
 
@@ -41,13 +41,13 @@ let
       };
 
       sage-env = self.callPackage ./sage-env.nix {
-        inherit sage-src python rWrapper ecl singular palp flint pynac pythonEnv;
+        inherit sage-src python rWrapper openblas-cblas-pc ecl singular palp flint pynac pythonEnv;
         pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
       };
 
       sage-with-env = self.callPackage ./sage-with-env.nix {
         inherit pythonEnv;
-        inherit sage-src pynac singular;
+        inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular;
         pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig
         three = nodePackages_8_x.three;
       };
@@ -60,6 +60,10 @@ let
     };
   };
 
+  openblas-blas-pc = callPackage ./openblas-pc.nix { name = "blas"; };
+  openblas-cblas-pc = callPackage ./openblas-pc.nix { name = "cblas"; };
+  openblas-lapack-pc = callPackage ./openblas-pc.nix { name = "lapack"; };
+
   sage-src = callPackage ./sage-src.nix {};
 
   pythonRuntimeDeps = with python.pkgs; [
diff --git a/pkgs/applications/science/math/sage/openblas-pc.nix b/pkgs/applications/science/math/sage/openblas-pc.nix
new file mode 100644
index 00000000000..f4669a6557e
--- /dev/null
+++ b/pkgs/applications/science/math/sage/openblas-pc.nix
@@ -0,0 +1,17 @@
+{ openblasCompat
+, writeTextFile
+, name
+}:
+
+writeTextFile {
+  name = "openblas-${name}-pc-${openblasCompat.version}";
+  destination = "/lib/pkgconfig/${name}.pc";
+  text = ''
+    Name: ${name}
+    Version: ${openblasCompat.version}
+
+    Description: ${name} for SageMath, provided by the OpenBLAS package.
+    Cflags: -I${openblasCompat}/include
+    Libs: -L${openblasCompat}/lib -lopenblas
+  '';
+}
diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix
index 74c2e0aa036..317eb6e16c4 100644
--- a/pkgs/applications/science/math/sage/sage-env.nix
+++ b/pkgs/applications/science/math/sage/sage-env.nix
@@ -37,7 +37,7 @@
 , lcalc
 , rubiks
 , flintqs
-, openblasCompat
+, openblas-cblas-pc
 , flint
 , gmp
 , mpfr
@@ -98,9 +98,9 @@ writeTextFile rec {
     export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [
         # This is only needed in the src/sage/misc/cython.py test and I'm not sure if there's really a use-case
         # for it outside of the tests. However since singular and openblas are runtime dependencies anyways
-        # it doesn't really hurt to include.
+        # and openblas-cblas-pc is tiny, it doesn't really hurt to include.
         singular
-        openblasCompat
+        openblas-cblas-pc
       ])
     }'
     export SAGE_ROOT='${sage-src}'
diff --git a/pkgs/applications/science/math/sage/sage-with-env.nix b/pkgs/applications/science/math/sage/sage-with-env.nix
index 8ccf8b5a493..63b9772b823 100644
--- a/pkgs/applications/science/math/sage/sage-with-env.nix
+++ b/pkgs/applications/science/math/sage/sage-with-env.nix
@@ -4,6 +4,9 @@
 , sage-env
 , sage-src
 , openblasCompat
+, openblas-blas-pc
+, openblas-cblas-pc
+, openblas-lapack-pc
 , pkg-config
 , three
 , singular
@@ -29,6 +32,9 @@ let
     makeWrapper
     pkg-config
     openblasCompat # lots of segfaults with regular (64 bit) openblas
+    openblas-blas-pc
+    openblas-cblas-pc
+    openblas-lapack-pc
     singular
     three
     pynac
diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix
index 948da515af1..d26f5dad724 100644
--- a/pkgs/applications/science/math/sage/sagelib.nix
+++ b/pkgs/applications/science/math/sage/sagelib.nix
@@ -3,6 +3,9 @@
 , buildPythonPackage
 , arb
 , openblasCompat
+, openblas-blas-pc
+, openblas-cblas-pc
+, openblas-lapack-pc
 , brial
 , cliquer
 , cypari2
@@ -58,7 +61,9 @@ buildPythonPackage rec {
   nativeBuildInputs = [
     iml
     perl
-    openblasCompat
+    openblas-blas-pc
+    openblas-cblas-pc
+    openblas-lapack-pc
     jupyter_core
   ];