-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
julia: init at 1.5 #101933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
julia: init at 1.5 #101933
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
50866d2
Julia 1.5
cstich 69a54ef
Update pkgs/development/compilers/julia/1.5.nix
cstich b3641bb
Update pkgs/development/compilers/julia/1.5.nix
cstich 3f7c850
Updates from review
cstich d37f5e8
Apply comments from review
7c6f434c 73f27cc
Fix CPU reference
7c6f434c c16ba37
Look up llc CPU names
7c6f434c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| { stdenv, fetchurl, fetchzip, fetchFromGitHub | ||
| # build tools | ||
| , gfortran, m4, makeWrapper, patchelf, perl, which, python2 | ||
| , cmake | ||
| # libjulia dependencies | ||
| , libunwind, readline, utf8proc, zlib | ||
| # standard library dependencies | ||
| , curl, fftwSinglePrec, fftw, libgit2, mpfr, openlibm, openspecfun, pcre2 | ||
| # linear algebra | ||
| , blas, lapack, arpack | ||
| # Darwin frameworks | ||
| , CoreServices, ApplicationServices | ||
| }: | ||
|
|
||
| assert (!blas.isILP64) && (!lapack.isILP64); | ||
|
|
||
| with stdenv.lib; | ||
|
|
||
| let | ||
| majorVersion = "1"; | ||
| minorVersion = "5"; | ||
| maintenanceVersion = "3"; | ||
| src_sha256 = "sha256:0jds8lrhk4hfdv7dg5p2ibzin9ivga7wrx7zwcmz6dqp3x792n1i"; | ||
| version = "${majorVersion}.${minorVersion}.${maintenanceVersion}"; | ||
| in | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "julia"; | ||
| inherit version; | ||
|
|
||
| src = fetchzip { | ||
| url = "https://github.com/JuliaLang/julia/releases/download/v${version}/julia-${version}-full.tar.gz"; | ||
| sha256 = src_sha256; | ||
| }; | ||
|
|
||
| patches = [ | ||
| ./use-system-utf8proc-julia-1.3.patch | ||
|
|
||
| # Julia recompiles a precompiled file if the mtime stored *in* the | ||
| # .ji file differs from the mtime of the .ji file. This | ||
| # doesn't work in Nix because Nix changes the mtime of files in | ||
| # the Nix store to 1. So patch Julia to accept mtimes of 1. | ||
| ./allow_nix_mtime.patch | ||
| ]; | ||
|
|
||
| postPatch = '' | ||
| patchShebangs . contrib | ||
| for i in backtrace cmdlineargs; do | ||
| mv test/$i.jl{,.off} | ||
| touch test/$i.jl | ||
| done | ||
| rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl | ||
| rm stdlib/Distributed/test/runtests.jl && touch stdlib/Distributed/test/runtests.jl | ||
| # LibGit2 fails with a weird error, so we skip it as well now | ||
| rm stdlib/LibGit2/test/runtests.jl && touch stdlib/LibGit2/test/runtests.jl | ||
| sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl | ||
| sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl | ||
| ''; | ||
|
|
||
| dontUseCmakeConfigure = true; | ||
|
|
||
| buildInputs = [ | ||
| arpack fftw fftwSinglePrec libgit2 libunwind mpfr | ||
| pcre2.dev blas lapack openlibm openspecfun readline utf8proc | ||
| zlib | ||
| ] ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices]; | ||
|
|
||
| nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which cmake ]; | ||
|
|
||
| makeFlags = | ||
| let | ||
| arch = head (splitString "-" stdenv.system); | ||
| march = { | ||
| x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; | ||
| i686 = "pentium4"; | ||
| aarch64 = "armv8-a"; | ||
| }.${arch} | ||
| or (throw "unsupported architecture: ${arch}"); | ||
| # Julia requires Pentium 4 (SSE2) or better | ||
| cpuTarget = { x86_64 = "x86-64"; i686 = "pentium4"; aarch64 = "generic"; }.${arch} | ||
| or (throw "unsupported architecture: ${arch}"); | ||
| # Julia applies a lot of patches to its dependencies, so for now do not use the system LLVM | ||
| # https://github.com/JuliaLang/julia/tree/master/deps/patches | ||
| in [ | ||
| "ARCH=${arch}" | ||
| "MARCH=${march}" | ||
| "JULIA_CPU_TARGET=${cpuTarget}" | ||
| "PREFIX=$(out)" | ||
| "prefix=$(out)" | ||
| "SHELL=${stdenv.shell}" | ||
|
|
||
| "USE_SYSTEM_BLAS=1" | ||
| "USE_BLAS64=${if blas.isILP64 then "1" else "0"}" | ||
|
|
||
| "USE_SYSTEM_LAPACK=1" | ||
|
|
||
| "USE_SYSTEM_ARPACK=1" | ||
| "USE_SYSTEM_FFTW=1" | ||
| "USE_SYSTEM_GMP=0" | ||
| "USE_SYSTEM_LIBGIT2=1" | ||
| "USE_SYSTEM_LIBUNWIND=1" | ||
|
|
||
| "USE_SYSTEM_MPFR=1" | ||
| "USE_SYSTEM_OPENLIBM=1" | ||
| "USE_SYSTEM_OPENSPECFUN=1" | ||
| "USE_SYSTEM_PATCHELF=1" | ||
| "USE_SYSTEM_PCRE=1" | ||
| "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config" | ||
| "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h" | ||
| "USE_SYSTEM_READLINE=1" | ||
| "USE_SYSTEM_UTF8PROC=1" | ||
| "USE_SYSTEM_ZLIB=1" | ||
|
|
||
| "USE_BINARYBUILDER=0" | ||
| ]; | ||
|
|
||
| LD_LIBRARY_PATH = makeLibraryPath [ | ||
| arpack fftw fftwSinglePrec libgit2 mpfr blas openlibm | ||
| openspecfun pcre2 lapack | ||
| ]; | ||
|
|
||
| enableParallelBuilding = true; | ||
|
|
||
| # Julia's tests require read/write access to $HOME | ||
| preCheck = '' | ||
| export HOME="$NIX_BUILD_TOP" | ||
| ''; | ||
|
|
||
| preBuild = '' | ||
| sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile | ||
| sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile | ||
| export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} | ||
| ''; | ||
|
|
||
| postInstall = '' | ||
| # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, | ||
| # as using a wrapper with LD_LIBRARY_PATH causes segmentation | ||
| # faults when program returns an error: | ||
| # $ julia -e 'throw(Error())' | ||
| find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do | ||
| if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then | ||
| ln -sv $lib $out/lib/julia/$(basename $lib) | ||
| fi | ||
| done | ||
| ''; | ||
|
|
||
| passthru = { | ||
| inherit majorVersion minorVersion maintenanceVersion; | ||
| site = "share/julia/site/v${majorVersion}.${minorVersion}"; | ||
| }; | ||
|
|
||
| meta = { | ||
| description = "High-level performance-oriented dynamical language for technical computing"; | ||
| homepage = "https://julialang.org/"; | ||
| license = stdenv.lib.licenses.mit; | ||
| maintainers = with stdenv.lib.maintainers; [ raskin rob garrison ]; | ||
| platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]; | ||
| broken = stdenv.isi686; | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -9360,6 +9360,12 @@ in | |||
| inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; | ||||
| }; | ||||
|
|
||||
| julia_15 = callPackage ../development/compilers/julia/1.5.nix { | ||||
| inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; | ||||
| }; | ||||
|
|
||||
|
|
||||
|
|
||||
|
Comment on lines
+9366
to
+9368
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| julia_1 = julia_10; | ||||
| julia = julia_1; | ||||
|
|
||||
|
|
||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.