From 1c8aba83340be3713f68410d1d273a8b15e7e007 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 31 Mar 2020 10:47:18 -0400 Subject: treewide: use blas and lapack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkgs/development/ocaml-modules/lacaml/default.nix | 5 +++-- pkgs/development/ocaml-modules/owl/default.nix | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'pkgs/development/ocaml-modules') 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 -- cgit 1.4.1