git.iko.soy/typeable/nixpkgs
on master help sign in
Merge branch 'julia-0.4'
commitae49c91569a43e94f8a88bf4a0e94aa362fabbd6 authorThomas Tuegel <ttuegel@gmail.com> dateSun 11 Oct 2015, 10:11 (11 years ago) parentfa53fbea8353b2
14 files changed+340−320
pkgs/development/compilers/julia/0.2.nix−143 pkgs/development/compilers/julia/0.3.nix−154 pkgs/development/compilers/julia/0001-use-system-utf8proc.patch+29 pkgs/development/compilers/julia/0002-use-system-suitesparse.patch+25 pkgs/development/compilers/julia/0003-no-ldconfig.patch+29 pkgs/development/compilers/julia/default.nix+157 pkgs/development/compilers/llvm/3.3/llvm.nix+9−1 pkgs/development/libraries/pcre2/default.nix+23 pkgs/development/libraries/science/math/openblas/default.nix+10−5 pkgs/development/libraries/science/math/openlibm/default.nix+19 pkgs/development/libraries/science/math/openspecfun/default.nix+21 pkgs/development/libraries/science/math/suitesparse/default.nix+1−1 pkgs/development/libraries/utf8proc/default.nix+5−7 pkgs/top-level/all-packages.nix+12−9
pkgs/development/compilers/julia/0.2.nixdeleted−143
@@ -1,143 +0,0 @@
1−{ stdenv, fetchgit, gfortran, perl, m4, llvm, gmp, pcre, zlib
2− , readline, fftwSinglePrec, fftw, libunwind, suitesparse, glpk, fetchurl
3− , ncurses, libunistring, lighttpd, patchelf, openblas
4− , tcl, tk, xproto, libX11, git, mpfr
5− } :
6−let
7− realGcc = stdenv.cc.cc;
8−in
9−stdenv.mkDerivation rec {
10− pname = "julia";
11− version = "0.2.1";
12− name = "${pname}-${version}";
13−
14− grisu_ver = "1.1.1";
15− dsfmt_ver = "2.2";
16− openblas_ver = "v0.2.2";
17− lapack_ver = "3.4.1";
18− arpack_ver = "3.1.3";
19− clp_ver = "1.14.5";
20− lighttpd_ver = "1.4.29";
21− patchelf_ver = "0.6";
22− pcre_ver = "8.31";
23−
24− grisu_src = fetchurl {
25− url = "http://double-conversion.googlecode.com/files/double-conversion-${grisu_ver}.tar.gz";
26− sha256 = "e1cabb73fd69e74f145aea91100cde483aef8b79dc730fcda0a34466730d4d1d";
27− };
28− dsfmt_src = fetchurl {
29− url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmt_ver}.tar.gz";
30− name = "dsfmt-${dsfmt_ver}.tar.gz";
31− sha256 = "bc3947a9b2253a869fcbab8ff395416cb12958be9dba10793db2cd7e37b26899";
32− };
33− openblas_src = fetchurl {
34− url = "https://github.com/xianyi/OpenBLAS/tarball/${openblas_ver}";
35− name = "openblas-${openblas_ver}.tar.gz";
36− sha256 = "19ffec70f9678f5c159feadc036ca47720681b782910fbaa95aa3867e7e86d8e";
37− };
38− arpack_src = fetchurl {
39− url = "http://forge.scilab.org/index.php/p/arpack-ng/downloads/607/get/";
40− name = "arpack-ng-${arpack_ver}.tar.gz";
41− sha256 = "039w7j3dr1xy35a3hp92zg2g92gmjq6xsv0g4awlb4cffy09nr2d";
42− };
43− lapack_src = fetchurl {
44− url = "http://www.netlib.org/lapack/lapack-${lapack_ver}.tgz";
45− name = "lapack-${lapack_ver}.tgz";
46− sha256 = "93b910f94f6091a2e71b59809c4db4a14655db527cfc5821ade2e8c8ab75380f";
47− };
48− clp_src = fetchurl {
49− url = "http://www.coin-or.org/download/source/Clp/Clp-${clp_ver}.tgz";
50− name = "clp-${clp_ver}.tar.gz";
51− sha256 = "e6cabe8b4319c17a9bbe6fe172194ab6cd1fe6e376f5e9969d3040636ea3a817";
52− };
53− lighttpd_src = fetchurl {
54− url = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${lighttpd_ver}.tar.gz";
55− sha256 = "ff9f4de3901d03bb285634c5b149191223d17f1c269a16c863bac44238119c85";
56− };
57− patchelf_src = fetchurl {
58− url = "http://hydra.nixos.org/build/1524660/download/2/patchelf-${patchelf_ver}.tar.bz2";
59− sha256 = "00bw29vdsscsili65wcb5ay0gvg1w0ljd00sb5xc6br8bylpyzpw";
60− };
61− pcre_src = fetchurl {
62− url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${pcre_ver}.tar.bz2";
63− sha256 = "0g4c0z4h30v8g8qg02zcbv7n67j5kz0ri9cfhgkpwg276ljs0y2p";
64− };
65−
66− src = fetchgit {
67− url = "git://github.com/JuliaLang/julia.git";
68− rev = "refs/tags/v${version}";
69− sha256 = "7ee0f267bc1ae286764ced3c0c695c335a6f8d67bd7b3ca7e4de259333c9426a";
70− };
71−
72− buildInputs = [ gfortran perl m4 gmp pcre llvm readline zlib
73− fftw fftwSinglePrec libunwind suitesparse glpk ncurses libunistring patchelf
74− openblas tcl tk xproto libX11 git mpfr
75− ];
76−
77− configurePhase = ''
78− for i in GMP LLVM PCRE LAPACK OPENBLAS BLAS READLINE FFTW LIBUNWIND SUITESPARSE GLPK LIGHTTPD ZLIB MPFR;
79− do
80− makeFlags="$makeFlags USE_SYSTEM_$i=1 "
81− done
82− makeFlags="$makeFlags JULIA_CPU_TARGET=core2";
83−
84− copy_kill_hash(){
85− cp "$1" "$2/$(basename "$1" | sed -e 's/^[a-z0-9]*-//')"
86− }
87−
88− for i in "${grisu_src}" "${dsfmt_src}" "${arpack_src}" "${clp_src}" "${patchelf_src}" "${pcre_src}" ; do
89− copy_kill_hash "$i" deps
90− done
91− copy_kill_hash "${dsfmt_src}" deps/random
92−
93− ${if realGcc ==null then "" else
94− ''export NIX_LDFLAGS="$NIX_LDFLAGS -L${realGcc}/lib -L${realGcc}/lib64 -lpcre -lopenblas -lm -lfftw3f -lfftw3 -lglpk -lunistring -lz -lgmp -lmpfr"''}
95− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC "
96−
97− export LDFLAGS="-L${suitesparse}/lib -L$out/lib/julia -Wl,-rpath,$out/lib/julia"
98−
99− export GLPK_PREFIX="${glpk}/include"
100−
101− sed -e "s@/usr/local/lib@$out/lib@g" -i deps/Makefile
102− sed -e "s@/usr/lib@$out/lib@g" -i deps/Makefile
103−
104− export makeFlags="$makeFlags PREFIX=$out SHELL=${stdenv.shell}"
105−
106− export dontPatchELF=1
107−
108− export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/usr/lib:$PWD/usr/lib/julia"
109− '';
110−
111− preBuild = ''
112− mkdir -p usr/lib
113−
114− mkdir -p "$out/lib"
115− ln -s "${openblas}/lib/libopenblas.so" "$out/lib/libblas.so"
116− ln -s "${openblas}/lib/libopenblas.so" "$out/lib/liblapack.so"
117−
118− echo "$out"
119− (
120− cd "$(mktemp -d)"
121− for i in "${suitesparse}"/lib/lib*.a; do
122− ar -x $i
123− done
124− gcc *.o --shared -o "$out/lib/libsuitesparse.so"
125− )
126− cp "$out/lib/libsuitesparse.so" usr/lib
127− for i in umfpack cholmod amd camd colamd spqr; do
128− ln -s libsuitesparse.so "$out"/lib/lib$i.so;
129− ln -s libsuitesparse.so "usr"/lib/lib$i.so;
130− done
131− '';
132−
133− preInstall = ''
134− '';
135−
136− meta = {
137− description = "High-level performance-oriented dynamical language for technical computing";
138− homepage = "http://julialang.org/";
139− license = stdenv.lib.licenses.mit;
140− maintainers = [ stdenv.lib.maintainers.raskin ];
141− platforms = with stdenv.lib.platforms; linux;
142− };
143−}
pkgs/development/compilers/julia/0.3.nixdeleted−154
@@ -1,154 +0,0 @@
1−{ stdenv, fetchgit, fetchurl
2−# build tools
3−, gfortran, git, m4, patchelf, perl, which, python2
4−# libjulia dependencies
5−, libunwind, llvm, readline, utf8proc, zlib
6−# standard library dependencies
7−, double_conversion, fftwSinglePrec, fftw, glpk, gmp, mpfr, pcre
8−# linear algebra
9−, openblas, arpack, suitesparse
10−}:
11−
12−with stdenv.lib;
13−
14−# All dependencies should use the same OpenBLAS.
15−let
16− arpack_ = arpack;
17− suitesparse_ = suitesparse;
18−in
19−let
20− arpack = arpack_.override { inherit openblas; };
21− suitesparse = suitesparse_.override { inherit openblas; };
22−in
23−
24−stdenv.mkDerivation rec {
25− pname = "julia";
26− version = "0.3.11";
27− name = "${pname}-${version}";
28−
29− src = fetchgit {
30− url = "git://github.com/JuliaLang/julia.git";
31− rev = "refs/tags/v${version}";
32− sha256 = "06xmv2l8hskdh1s5y2dh28vpb5pc0gzmfl5a03yp0qjjsl5cb284";
33− name = "julia-git-v${version}";
34− };
35−
36− patches = [ ./0001-work-around-buggy-wcwidth.patch ];
37−
38− extraSrcs =
39− let
40− dsfmt_ver = "2.2";
41−
42− dsfmt_src = fetchurl {
43− url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmt_ver}.tar.gz";
44− name = "dsfmt-${dsfmt_ver}.tar.gz";
45− md5 = "cb61be3be7254eae39684612c524740d";
46− };
47−
48− in [ dsfmt_src ];
49−
50− prePatch = ''
51− copy_kill_hash(){
52− cp "$1" "$2/$(basename "$1" | sed -e 's/^[a-z0-9]*-//')"
53− }
54−
55− for i in $extraSrcs; do
56− copy_kill_hash "$i" deps
57− done
58− '';
59−
60− postPatch = ''
61− sed -i deps/Makefile \
62− -e "s@/usr/local/lib@$out/lib@g" \
63− -e "s@/usr/lib@$out/lib@g" \
64− -e "s@/usr/include/double-conversion@${double_conversion}/include/double-conversion@g"
65−
66− patchShebangs . contrib
67−
68− # ldconfig doesn't seem to ever work on NixOS; system-wide ldconfig cache
69− # is probably not what we want anyway on non-NixOS
70− sed -e "s@/sbin/ldconfig@true@" -i src/ccall.*
71− '';
72−
73− buildInputs = [
74− arpack double_conversion fftw fftwSinglePrec glpk gmp libunwind
75− llvm mpfr pcre openblas readline suitesparse utf8proc zlib
76− ];
77−
78− nativeBuildInputs = [ gfortran git m4 patchelf perl python2 which ];
79−
80− makeFlags =
81− let
82− arch = head (splitString "-" stdenv.system);
83− march = { "x86_64" = "x86-64"; "i686" = "i686"; }."${arch}"
84− or (throw "unsupported architecture: ${arch}");
85− in [
86− "ARCH=${arch}"
87− "MARCH=${march}"
88− "JULIA_CPU_TARGET=${march}"
89− "PREFIX=$(out)"
90− "prefix=$(out)"
91− "SHELL=${stdenv.shell}"
92−
93− "USE_SYSTEM_BLAS=1"
94− "LIBBLAS=-lopenblas"
95− "LIBBLASNAME=libopenblas"
96−
97− "USE_SYSTEM_LAPACK=1"
98− "LIBLAPACK=-lopenblas"
99− "LIBLAPACKNAME=libopenblas"
100−
101− "USE_SYSTEM_ARPACK=1"
102− "USE_SYSTEM_FFTW=1"
103− "USE_SYSTEM_GLPK=1"
104− "USE_SYSTEM_GMP=1"
105− "USE_SYSTEM_GRISU=1"
106− "USE_SYSTEM_LIBUNWIND=1"
107− "USE_SYSTEM_LLVM=1"
108− "USE_SYSTEM_MPFR=1"
109− "USE_SYSTEM_PATCHELF=1"
110− "USE_SYSTEM_PCRE=1"
111− "USE_SYSTEM_READLINE=1"
112− "USE_SYSTEM_SUITESPARSE=1"
113− "USE_SYSTEM_UTF8PROC=1"
114− "USE_SYSTEM_ZLIB=1"
115− ];
116−
117− GLPK_PREFIX = "${glpk}/include";
118−
119− NIX_CFLAGS_COMPILE = [ "-fPIC" ];
120−
121− # Julia tries to load these libraries dynamically at runtime, but they can't be found.
122− # Easier by far to link against them as usual.
123− # These go in LDFLAGS, where they affect only Julia itself, and not NIX_LDFLAGS,
124− # where they would also be used for all the private libraries Julia builds.
125− LDFLAGS = [
126− "-larpack"
127− "-lfftw3_threads"
128− "-lfftw3f_threads"
129− "-lglpk"
130− "-lgmp"
131− "-lmpfr"
132− "-lopenblas"
133− "-lpcre"
134− "-lsuitesparse"
135− "-lz"
136− ];
137−
138− dontStrip = true;
139− dontPatchELF = true;
140−
141− enableParallelBuilding = true;
142−
143− # Test fail on i686 (julia version 0.3.10)
144− doCheck = !stdenv.isi686;
145− checkTarget = "testall";
146−
147− meta = {
148− description = "High-level performance-oriented dynamical language for technical computing";
149− homepage = "http://julialang.org/";
150− license = stdenv.lib.licenses.mit;
151− maintainers = with stdenv.lib.maintainers; [ raskin ttuegel ];
152− platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
153− };
154−}
pkgs/development/compilers/julia/0001-use-system-utf8proc.patchnew file+29
@@ -0,0 +1,29 @@
1+From 54a66b5728ec98f44a1768f064509be4fd3f2ef6 Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@gmail.com>
3+Date: Sat, 10 Oct 2015 13:09:48 -0500
4+Subject: [PATCH 1/3] use system utf8proc
5+
6+---
7+ src/flisp/Makefile | 6 +++---
8+ 1 file changed, 3 insertions(+), 3 deletions(-)
9+
10+diff --git a/src/flisp/Makefile b/src/flisp/Makefile
11+index bec8624..5437b5c 100644
12+--- a/src/flisp/Makefile
13++++ b/src/flisp/Makefile
14+@@ -24,9 +24,9 @@ DOBJS = $(SRCS:%.c=$(BUILDDIR)/%.dbg.obj)
15+ LLTDIR = ../support
16+ LLT_release = $(BUILDDIR)/$(LLTDIR)/libsupport.a
17+ LLT_debug = $(BUILDDIR)/$(LLTDIR)/libsupport-debug.a
18+-LIBFILES_release = $(LLT_release) $(LIBUV) $(LIBUTF8PROC)
19+-LIBFILES_debug = $(LLT_debug) $(LIBUV) $(LIBUTF8PROC)
20+-LIBS =
21++LIBFILES_release = $(LLT_release) $(LIBUV)
22++LIBFILES_debug = $(LLT_debug) $(LIBUV)
23++LIBS = $(LIBUTF8PROC)
24+ ifneq ($(OS),WINNT)
25+ LIBS += -lpthread
26+ endif
27+--
28+2.5.2
29+
pkgs/development/compilers/julia/0002-use-system-suitesparse.patchnew file+25
@@ -0,0 +1,25 @@
1+From e2b0ed6664fe4adfd0f9ce8fa14732d47b30ab5c Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@gmail.com>
3+Date: Sat, 10 Oct 2015 16:18:53 -0500
4+Subject: [PATCH 2/3] use system suitesparse
5+
6+---
7+ base/sparse/cholmod.jl | 2 +-
8+ 1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+diff --git a/base/sparse/cholmod.jl b/base/sparse/cholmod.jl
11+index ec7e980..f834cc1 100644
12+--- a/base/sparse/cholmod.jl
13++++ b/base/sparse/cholmod.jl
14+@@ -151,7 +151,7 @@ function __init__()
15+
16+ # Register gc tracked allocator if CHOLMOD is new enough
17+ if current_version >= v"3.0.0"
18+- cnfg = cglobal((:SuiteSparse_config, :libsuitesparseconfig), Ptr{Void})
19++ cnfg = cglobal((:SuiteSparse_config, :libsuitesparse), Ptr{Void})
20+ unsafe_store!(cnfg, cglobal(:jl_malloc, Ptr{Void}), 1)
21+ unsafe_store!(cnfg, cglobal(:jl_calloc, Ptr{Void}), 2)
22+ unsafe_store!(cnfg, cglobal(:jl_realloc, Ptr{Void}), 3)
23+--
24+2.5.2
25+
pkgs/development/compilers/julia/0003-no-ldconfig.patchnew file+29
@@ -0,0 +1,29 @@
1+From 8802fe583eda93a928739cb3bc3517e19d1a6fa1 Mon Sep 17 00:00:00 2001
2+From: Thomas Tuegel <ttuegel@gmail.com>
3+Date: Sun, 11 Oct 2015 07:19:42 -0500
4+Subject: [PATCH 3/3] no ldconfig
5+
6+---
7+ src/ccall.cpp | 6 +-----
8+ 1 file changed, 1 insertion(+), 5 deletions(-)
9+
10+diff --git a/src/ccall.cpp b/src/ccall.cpp
11+index 22015ff..2821192 100644
12+--- a/src/ccall.cpp
13++++ b/src/ccall.cpp
14+@@ -13,11 +13,7 @@ extern "C" DLLEXPORT void jl_read_sonames(void)
15+ {
16+ char *line=NULL;
17+ size_t sz=0;
18+-#if defined(__linux__)
19+- FILE *ldc = popen("/sbin/ldconfig -p", "r");
20+-#else
21+- FILE *ldc = popen("/sbin/ldconfig -r", "r");
22+-#endif
23++ FILE *ldc = popen("true", "r");
24+
25+ while (!feof(ldc)) {
26+ ssize_t n = getline(&line, &sz, ldc);
27+--
28+2.5.2
29+
pkgs/development/compilers/julia/default.nixnew file+157
@@ -0,0 +1,157 @@
1+{ stdenv, fetchgit, fetchurl
2+# build tools
3+, gfortran, m4, makeWrapper, patchelf, perl, which, python2
4+# libjulia dependencies
5+, libunwind, llvm, readline, utf8proc, zlib
6+# standard library dependencies
7+, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
8+# linear algebra
9+, openblas, arpack, suitesparse
10+}:
11+
12+with stdenv.lib;
13+
14+# All dependencies must use the same OpenBLAS.
15+let
16+ arpack_ = arpack;
17+ suitesparse_ = suitesparse;
18+in
19+let
20+ arpack = arpack_.override { inherit openblas; };
21+ suitesparse = suitesparse_.override { inherit openblas; };
22+in
23+
24+let
25+ dsfmtVersion = "2.2.3";
26+ dsfmt = fetchurl {
27+ url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmtVersion}.tar.gz";
28+ sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42";
29+ };
30+
31+ libuvVersion = "28f5f06b5ff6f010d666ec26552e0badaca5cdcd";
32+ libuv = fetchurl {
33+ url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}";
34+ sha256 = "1ksns0aiayxmxffvq2kc96904mxlmbkfc30xxck69xnidr2jvr4a";
35+ };
36+
37+ rmathVersion = "0.1";
38+ rmath-julia = fetchurl {
39+ url = "https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v${rmathVersion}";
40+ sha256 = "0ai5dhjc43zcvangz123ryxmlbm51s21rg13bllwyn98w67arhb4";
41+ };
42+in
43+
44+stdenv.mkDerivation rec {
45+ pname = "julia";
46+ version = "0.4.0";
47+ name = "${pname}-${version}";
48+
49+ src = fetchurl {
50+ url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${name}.tar.gz";
51+ sha256 = "00k53hzbawpqvmkkyzcvbmf1d0ycshzdqk19nwsifv1rmiwjj7ss";
52+ };
53+
54+ prePatch = ''
55+ cp "${dsfmt}" "./deps/dsfmt-${dsfmtVersion}.tar.gz"
56+ cp "${rmath-julia}" "./deps/Rmath-julia-${rmathVersion}.tar.gz"
57+ cp "${libuv}" "./deps/libuv-${libuvVersion}.tar.gz"
58+ '';
59+
60+ patches = [
61+ ./0001-use-system-utf8proc.patch
62+ ./0002-use-system-suitesparse.patch
63+ ./0003-no-ldconfig.patch
64+ ];
65+
66+ postPatch = ''
67+ patchShebangs . contrib
68+ '';
69+
70+ buildInputs = [
71+ arpack fftw fftwSinglePrec gmp libgit2 libunwind llvm mpfr
72+ pcre2 openblas openlibm openspecfun readline suitesparse utf8proc
73+ zlib
74+ ];
75+
76+ nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ];
77+
78+ makeFlags =
79+ let
80+ arch = head (splitString "-" stdenv.system);
81+ march = { "x86_64" = "x86-64"; "i686" = "i686"; }."${arch}"
82+ or (throw "unsupported architecture: ${arch}");
83+ # Julia requires Pentium 4 (SSE2) or better
84+ cpuTarget = { "x86_64" = "x86-64"; "i686" = "pentium4"; }."${arch}"
85+ or (throw "unsupported architecture: ${arch}");
86+ in [
87+ "ARCH=${arch}"
88+ "MARCH=${march}"
89+ "JULIA_CPU_TARGET=${cpuTarget}"
90+ "PREFIX=$(out)"
91+ "prefix=$(out)"
92+ "SHELL=${stdenv.shell}"
93+
94+ "USE_SYSTEM_BLAS=1"
95+ "USE_BLAS64=${if openblas.blas64 then "1" else "0"}"
96+ "LIBBLAS=-lopenblas"
97+ "LIBBLASNAME=libopenblas"
98+
99+ "USE_SYSTEM_LAPACK=1"
100+ "LIBLAPACK=-lopenblas"
101+ "LIBLAPACKNAME=libopenblas"
102+
103+ "USE_SYSTEM_SUITESPARSE=1"
104+ "SUITESPARSE_LIB=-lsuitesparse"
105+ "SUITESPARSE_INC=-I${suitesparse}/include"
106+
107+ "USE_SYSTEM_ARPACK=1"
108+ "USE_SYSTEM_FFTW=1"
109+ "USE_SYSTEM_GMP=1"
110+ "USE_SYSTEM_LIBGIT2=1"
111+ "USE_SYSTEM_LIBUNWIND=1"
112+ "USE_SYSTEM_LLVM=1"
113+ "USE_SYSTEM_MPFR=1"
114+ "USE_SYSTEM_OPENLIBM=1"
115+ "USE_SYSTEM_OPENSPECFUN=1"
116+ "USE_SYSTEM_PATCHELF=1"
117+ "USE_SYSTEM_PCRE=1"
118+ "USE_SYSTEM_READLINE=1"
119+ "USE_SYSTEM_UTF8PROC=1"
120+ "USE_SYSTEM_ZLIB=1"
121+ ];
122+
123+ NIX_CFLAGS_COMPILE = [ "-fPIC" ];
124+
125+ LD_LIBRARY_PATH = makeSearchPath "lib" [
126+ arpack fftw fftwSinglePrec gmp libgit2 mpfr openblas openlibm
127+ openspecfun pcre2 suitesparse
128+ ];
129+
130+ dontStrip = true;
131+ dontPatchELF = true;
132+
133+ enableParallelBuilding = true;
134+
135+ doCheck = true;
136+ checkTarget = "testall";
137+ # Julia's tests require read/write access to $HOME
138+ preCheck = ''
139+ export HOME="$NIX_BUILD_TOP"
140+ '';
141+
142+ postInstall = ''
143+ for prog in "$out/bin/julia" "$out/bin/julia-debug"; do
144+ wrapProgram "$prog" \
145+ --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH" \
146+ --prefix PATH : "${curl}/bin"
147+ done
148+ '';
149+
150+ meta = {
151+ description = "High-level performance-oriented dynamical language for technical computing";
152+ homepage = "http://julialang.org/";
153+ license = stdenv.lib.licenses.mit;
154+ maintainers = with stdenv.lib.maintainers; [ raskin ttuegel ];
155+ platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
156+ };
157+}
pkgs/development/compilers/llvm/3.3/llvm.nix+9−1
@@ -14,9 +14,17 @@ in stdenv.mkDerivation rec {
1414 ./no-rule-aarch64.patch # http://llvm.org/bugs/show_bug.cgi?id=16625
1515 # Patch needed for Julia, backports fixes from LLVM 3.5
1616 (fetchurl {
17− url = "https://raw.githubusercontent.com/JuliaLang/julia/3bdda3750efc4ebf8ce7eda8a0888ffef3851605/deps/llvm-3.3.patch";
17+ url = "https://raw.githubusercontent.com/JuliaLang/julia/release-0.4/deps/llvm-3.3.patch";
1818 sha256 = "0j6chyx4k8zr1qha5dks8lqlcraqrj4q1hwnk2kj3qi6cajsd8k3";
1919 })
20+ (fetchurl {
21+ url = "https://raw.githubusercontent.com/JuliaLang/julia/release-0.4/deps/instcombine-llvm-3.3.patch";
22+ sha256 = "161frq3wxrkxah78krb24hp4zkcnphzcgnvkwfq1abq2vjx3f8sn";
23+ })
24+ (fetchurl {
25+ url = "https://raw.githubusercontent.com/JuliaLang/julia/release-0.4/deps/int128-vector.llvm-3.3.patch";
26+ sha256 = "0lzkv6hvsdaalwsyf6sq0vdrf8x5nk58qg6nn5dlw7n3hxaxpm4m";
27+ })
2028 ];
2129
2230 buildInputs = [ perl groff cmake python libffi ];
pkgs/development/libraries/pcre2/default.nixnew file+23
@@ -0,0 +1,23 @@
1+{ stdenv, fetchurl }:
2+
3+stdenv.mkDerivation {
4+ name = "pcre2-10.20";
5+ src = fetchurl {
6+ url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.20.tar.bz2";
7+ sha256 = "0yj8mm9ll9zj3v47rvmmqmr1ybxk72rr2lym3rymdsf905qjhbik";
8+ };
9+
10+ configureFlags = [
11+ "--enable-pcre2-16"
12+ "--enable-pcre2-32"
13+ "--enable-jit"
14+ ];
15+
16+ meta = {
17+ description = "Perl Compatible Regular Expressions";
18+ homepage = "http://www.pcre.org/";
19+ license = stdenv.lib.licenses.bsd3;
20+ maintainers = [ stdenv.lib.maintainers.ttuegel ];
21+ platforms = stdenv.lib.platforms.all;
22+ };
23+}
pkgs/development/libraries/science/math/openblas/default.nix+10−5
@@ -6,6 +6,8 @@
66
77with stdenv.lib;
88
9+let blas64_ = blas64; in
10+
911let local = config.openblas.preferLocalBuild or false;
1012 binary =
1113 { i686-linux = "32";
@@ -18,11 +20,11 @@ let local = config.openblas.preferLocalBuild or false;
1820 ];
1921 localFlags = config.openblas.flags or
2022 optionals (hasAttr "target" config.openblas) [ "TARGET=${config.openblas.target}" ];
21− blas64Orig = blas64;
22−in
23−stdenv.mkDerivation rec {
24− version = "0.2.14";
23+ blas64 = if blas64_ != null then blas64_ else hasPrefix "x86_64" stdenv.system;
2524
25+ version = "0.2.14";
26+in
27+stdenv.mkDerivation {
2628 name = "openblas-${version}";
2729 src = fetchurl {
2830 url = "https://github.com/xianyi/OpenBLAS/tarball/v${version}";
@@ -30,6 +32,8 @@ stdenv.mkDerivation rec {
3032 name = "openblas-${version}.tar.gz";
3133 };
3234
35+ inherit blas64;
36+
3337 preBuild = "cp ${liblapack.src} lapack-${liblapack.meta.version}.tgz";
3438
3539 nativeBuildInputs = optionals stdenv.isDarwin [coreutils] ++ [gfortran perl];
@@ -50,7 +54,8 @@ stdenv.mkDerivation rec {
5054 "INTERFACE64=${if blas64 then "1" else "0"}"
5155 ];
5256
53− blas64 = if blas64Orig != null then blas64Orig else hasPrefix "x86_64" stdenv.system;
57+ doCheck = true;
58+ checkTarget = "tests";
5459
5560 meta = with stdenv.lib; {
5661 description = "Basic Linear Algebra Subprograms";
pkgs/development/libraries/science/math/openlibm/default.nixnew file+19
@@ -0,0 +1,19 @@
1+{ stdenv, fetchurl }:
2+
3+stdenv.mkDerivation {
4+ name = "openlibm-0.4.1";
5+ src = fetchurl {
6+ url = "https://github.com/JuliaLang/openlibm/archive/v0.4.1.tar.gz";
7+ sha256 = "0cwqqqlblj3kzp9aq1wnpfs1fl0qd1wp1xzm5shb09w06i4rh9nn";
8+ };
9+
10+ makeFlags = [ "prefix=$(out)" ];
11+
12+ meta = {
13+ description = "High quality system independent, portable, open source libm implementation";
14+ homepage = "http://www.openlibm.org/";
15+ license = stdenv.lib.licenses.mit;
16+ maintainers = [ stdenv.lib.maintainers.ttuegel ];
17+ platforms = stdenv.lib.platforms.all;
18+ };
19+}
pkgs/development/libraries/science/math/openspecfun/default.nixnew file+21
@@ -0,0 +1,21 @@
1+{ stdenv, fetchurl, gfortran }:
2+
3+stdenv.mkDerivation {
4+ name = "openspecfun-0.4";
5+ src = fetchurl {
6+ url = "https://github.com/JuliaLang/openspecfun/archive/v0.4.tar.gz";
7+ sha256 = "0nsa3jjmlhcqkw5ba5ypbn3n0c8b6lc22zzlxnmxkxi9shhdx65z";
8+ };
9+
10+ makeFlags = [ "prefix=$(out)" ];
11+
12+ nativeBuildInputs = [ gfortran ];
13+
14+ meta = {
15+ description = "A collection of special mathematical functions";
16+ homepage = "https://github.com/JuliaLang/openspecfun";
17+ license = stdenv.lib.licenses.mit;
18+ maintainers = [ stdenv.lib.maintainers.ttuegel ];
19+ platforms = stdenv.lib.platforms.all;
20+ };
21+}
pkgs/development/libraries/science/math/suitesparse/default.nix+1−1
@@ -42,7 +42,7 @@ stdenv.mkDerivation {
4242 for i in "$out"/lib/lib*.a; do
4343 ar -x $i
4444 done
45− gcc *.o --shared -o "$out/lib/libsuitesparse.so"
45+ gcc *.o --shared -o "$out/lib/libsuitesparse.so" -lopenblas
4646 )
4747 for i in umfpack cholmod amd camd colamd spqr; do
4848 ln -s libsuitesparse.so "$out"/lib/lib$i.so;
pkgs/development/libraries/utf8proc/default.nix+5−7
@@ -1,14 +1,12 @@
1−{ stdenv, fetchFromGitHub }:
1+{ stdenv, fetchurl }:
22
33stdenv.mkDerivation rec {
44 name = "utf8proc-${version}";
5− version = "v1.2";
5+ version = "1.3";
66
7− src = fetchFromGitHub {
8− owner = "JuliaLang";
9− repo = "utf8proc";
10− rev = "${version}";
11− sha256 = "1ryjlcnpfm7fpkq6444ybi576hbnh2l0w7kjhbqady5lxwjyg3pf";
7+ src = fetchurl {
8+ url = "https://github.com/JuliaLang/utf8proc/archive/v${version}.tar.gz";
9+ sha256 = "07r7djkmd399wl9cn0s2iqjhmm7l5iifp5h1yf2in9s366mlhkkg";
1210 };
1311
1412 makeFlags = [ "prefix=$(out)" ];
pkgs/top-level/all-packages.nix+12−9
@@ -4137,15 +4137,11 @@ let
41374137
41384138 jikes = callPackage ../development/compilers/jikes { };
41394139
4140− julia02 = callPackage ../development/compilers/julia/0.2.nix {
4141− llvm = llvm_33;
4142− suitesparse = suitesparse_4_2;
4143− };
4144−
4145− julia03 = callPackage ../development/compilers/julia/0.3.nix {
4140+ julia = callPackage ../development/compilers/julia {
4141+ gmp = gmp6;
41464142 llvm = llvm_33;
4143+ openblas = openblasCompat;
41474144 };
4148− julia = julia03;
41494145
41504146 lazarus = callPackage ../development/compilers/fpc/lazarus.nix {
41514147 fpc = fpc;
@@ -6356,6 +6352,7 @@ let
63566352
63576353 gmp4 = callPackage ../development/libraries/gmp/4.3.2.nix { }; # required by older GHC versions
63586354 gmp5 = callPackage ../development/libraries/gmp/5.1.x.nix { };
6355+ gmp6 = callPackage ../development/libraries/gmp/6.x.nix { };
63596356 gmp = gmp5;
63606357 gmpxx = appendToName "with-cxx" (gmp.override { cxx = true; });
63616358
@@ -7824,6 +7821,8 @@ let
78247821 unicodeSupport = config.pcre.unicode or true;
78257822 };
78267823
7824+ pcre2 = callPackage ../development/libraries/pcre2 { };
7825+
78277826 pdf2xml = callPackage ../development/libraries/pdf2xml {} ;
78287827
78297828 phonon = callPackage ../development/libraries/phonon/qt4 {};
@@ -14266,13 +14265,17 @@ let
1426614265 # standard BLAS and LAPACK.
1426714266 openblasCompat = openblas.override { blas64 = false; };
1426814267
14268+ openlibm = callPackage ../development/libraries/science/math/openlibm {};
14269+
14270+ openspecfun = callPackage ../development/libraries/science/math/openspecfun {};
14271+
1426914272 mathematica = callPackage ../applications/science/math/mathematica { };
1427014273 mathematica9 = callPackage ../applications/science/math/mathematica/9.nix { };
1427114274
14272− sage = callPackage ../applications/science/math/sage { };
14273−
1427414275 metis = callPackage ../development/libraries/science/math/metis {};
1427514276
14277+ sage = callPackage ../applications/science/math/sage { };
14278+
1427614279 suitesparse_4_2 = callPackage ../development/libraries/science/math/suitesparse/4.2.nix { };
1427714280 suitesparse_4_4 = callPackage ../development/libraries/science/math/suitesparse {};
1427814281 suitesparse = suitesparse_4_4;