summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
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/development/ocaml-modules
parent43873351ffed36b52170571839e26b57c9f15920 (diff)
downloadnixpkgs-1c8aba83340be3713f68410d1d273a8b15e7e007.tar
nixpkgs-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.gz
nixpkgs-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.bz2
nixpkgs-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.lz
nixpkgs-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.xz
nixpkgs-1c8aba83340be3713f68410d1d273a8b15e7e007.tar.zst
nixpkgs-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/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/lacaml/default.nix5
-rw-r--r--pkgs/development/ocaml-modules/owl/default.nix7
2 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/development/ocaml-modules/lacaml/default.nix b/pkgs/development/ocaml-modules/lacaml/default.nix
index 41bfb3125e3..e4da2216a83 100644
--- a/pkgs/development/ocaml-modules/lacaml/default.nix
+++ b/pkgs/development/ocaml-modules/lacaml/default.nix
@@ -1,6 +1,7 @@
-{ stdenv, fetchFromGitHub, darwin, ocaml, findlib, dune, base, stdio, liblapack, blas }:
+{ stdenv, fetchFromGitHub, darwin, ocaml, findlib, dune, base, stdio, lapack, blas }:
 
 assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.05.0";
+assert (!blas.is64bit) && (!lapack.is64bit);
 
 stdenv.mkDerivation rec {
   pname = "ocaml${ocaml.version}-lacaml";
@@ -14,7 +15,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ ocaml findlib dune base stdio ];
-  propagatedBuildInputs = [ liblapack blas ] ++
+  propagatedBuildInputs = [ lapack blas ] ++
     stdenv.lib.optionals stdenv.isDarwin
       [ darwin.apple_sdk.frameworks.Accelerate ];
 
diff --git a/pkgs/development/ocaml-modules/owl/default.nix b/pkgs/development/ocaml-modules/owl/default.nix
index 7fa912d808d..c84743a8da5 100644
--- a/pkgs/development/ocaml-modules/owl/default.nix
+++ b/pkgs/development/ocaml-modules/owl/default.nix
@@ -6,11 +6,14 @@
 , eigen
 , stdio
 , stdlib-shims
-, openblasCompat
+, openblas, blas, lapack
 , owl-base
 , npy
 }:
 
+assert (!blas.is64bit) && (!lapack.is64bit);
+assert blas.implementation == "openblas" && lapack.implementation == "openblas";
+
 buildDunePackage rec {
   pname = "owl";
 
@@ -19,7 +22,7 @@ buildDunePackage rec {
   checkInputs = [ alcotest ];
   buildInputs = [ dune-configurator ];
   propagatedBuildInputs = [
-    eigen stdio stdlib-shims openblasCompat owl-base npy
+    eigen stdio stdlib-shims openblas owl-base npy
   ];
 
   doCheck = !stdenv.isDarwin;  # https://github.com/owlbarn/owl/issues/462