diff options
Diffstat (limited to 'pkgs/development/compilers/julia/0.3.nix')
-rw-r--r-- | pkgs/development/compilers/julia/0.3.nix | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/pkgs/development/compilers/julia/0.3.nix b/pkgs/development/compilers/julia/0.3.nix index 7f0f263283d8..70ba2b6fd061 100644 --- a/pkgs/development/compilers/julia/0.3.nix +++ b/pkgs/development/compilers/julia/0.3.nix @@ -5,11 +5,22 @@ , libunwind, llvm, readline, utf8proc, zlib # standard library dependencies , double_conversion, fftwSinglePrec, fftw, glpk, gmp, mpfr, pcre +# linear algebra , openblas, arpack, suitesparse }: with stdenv.lib; +# All dependencies should use the same OpenBLAS. +let + arpack_ = arpack; + suitesparse_ = suitesparse; +in +let + arpack = arpack_.override { inherit openblas; }; + suitesparse = suitesparse_.override { inherit openblas; }; +in + stdenv.mkDerivation rec { pname = "julia"; version = "0.3.11"; @@ -68,7 +79,17 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gfortran git m4 patchelf perl which python2 ]; makeFlags = - [ + let + arch = head (splitString "-" stdenv.system); + march = + { "x86_64-linux" = "x86-64"; + "x86_64-darwin" = "x86-64"; + "i686-linux" = "i686"; + }."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}"); + in [ + "ARCH=${arch}" + "MARCH=${march}" + "JULIA_CPU_TARGET=${march}" "PREFIX=$(out)" "prefix=$(out)" "SHELL=${stdenv.shell}" @@ -122,8 +143,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - # Test fail on i686 (julia version 0.3.10) - doCheck = !stdenv.isi686; checkTarget = "testall"; meta = { @@ -131,6 +150,6 @@ stdenv.mkDerivation rec { homepage = "http://julialang.org/"; license = stdenv.lib.licenses.mit; maintainers = with stdenv.lib.maintainers; [ raskin ttuegel ]; - platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; }; } |