···8888 ;
89899090 patches = [
9191- # Julia recompiles a precompiled file if the mtime stored *in* the
9292- # .ji file differs from the mtime of the .ji file. This
9393- # doesn't work in Nix because Nix changes the mtime of files in
9494- # the Nix store to 1. So patch Julia to accept mtimes of 1.
9595- ./allow_nix_mtime.patch
9696- ./diagonal-test.patch
9797- ./use-system-utf8proc-julia-1.0.patch
9191+ ./patches/1.0/use-system-utf8proc-julia-1.0.patch
9892 ];
999310094 postPatch = ''
···183177 sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
184178 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
185179 '';
180180+181181+ enableParallelBuilding = true;
186182187183 postInstall = ''
188184 # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
-161
pkgs/development/compilers/julia/1.3.nix
···11-{ lib, stdenv, fetchurl, fetchzip, fetchFromGitHub
22-# build tools
33-, gfortran, m4, makeWrapper, patchelf, perl, which, python2
44-, cmake
55-# libjulia dependencies
66-, libunwind, readline, utf8proc, zlib
77-# standard library dependencies
88-, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
99-# linear algebra
1010-, blas, lapack, arpack
1111-# Darwin frameworks
1212-, CoreServices, ApplicationServices
1313-}:
1414-1515-assert (!blas.isILP64) && (!lapack.isILP64);
1616-1717-with lib;
1818-1919-let
2020- majorVersion = "1";
2121- minorVersion = "3";
2222- maintenanceVersion = "1";
2323- src_sha256 = "0q9a7yc3b235psrwl5ghyxgwly25lf8n818l8h6bkf2ymdbsv5p6";
2424- version = "${majorVersion}.${minorVersion}.${maintenanceVersion}";
2525-in
2626-2727-stdenv.mkDerivation rec {
2828- pname = "julia";
2929- inherit version;
3030-3131- src = fetchzip {
3232- url = "https://github.com/JuliaLang/julia/releases/download/v${majorVersion}.${minorVersion}.${maintenanceVersion}/julia-${majorVersion}.${minorVersion}.${maintenanceVersion}-full.tar.gz";
3333- sha256 = src_sha256;
3434- };
3535-3636- prePatch = ''
3737- export PATH=$PATH:${cmake}/bin
3838- '';
3939-4040- patches = [
4141- ./use-system-utf8proc-julia-1.3.patch
4242-4343- # Julia recompiles a precompiled file if the mtime stored *in* the
4444- # .ji file differs from the mtime of the .ji file. This
4545- # doesn't work in Nix because Nix changes the mtime of files in
4646- # the Nix store to 1. So patch Julia to accept mtimes of 1.
4747- ./allow_nix_mtime.patch
4848- ];
4949-5050- postPatch = ''
5151- patchShebangs . contrib
5252- for i in backtrace cmdlineargs; do
5353- mv test/$i.jl{,.off}
5454- touch test/$i.jl
5555- done
5656- rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl
5757- rm stdlib/Distributed/test/runtests.jl && touch stdlib/Distributed/test/runtests.jl
5858- sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl
5959- sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl
6060- '';
6161-6262- buildInputs = [
6363- arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr
6464- pcre2.dev blas lapack openlibm openspecfun readline utf8proc
6565- zlib
6666- ]
6767- ++ lib.optionals stdenv.isDarwin [CoreServices ApplicationServices]
6868- ;
6969-7070- nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ];
7171-7272- makeFlags =
7373- let
7474- arch = head (splitString "-" stdenv.system);
7575- march = {
7676- x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64";
7777- i686 = "pentium4";
7878- aarch64 = "armv8-a";
7979- }.${arch}
8080- or (throw "unsupported architecture: ${arch}");
8181- # Julia requires Pentium 4 (SSE2) or better
8282- cpuTarget = { x86_64 = "x86-64"; i686 = "pentium4"; aarch64 = "generic"; }.${arch}
8383- or (throw "unsupported architecture: ${arch}");
8484- in [
8585- "ARCH=${arch}"
8686- "MARCH=${march}"
8787- "JULIA_CPU_TARGET=${cpuTarget}"
8888- "PREFIX=$(out)"
8989- "prefix=$(out)"
9090- "SHELL=${stdenv.shell}"
9191-9292- (lib.optionalString (!stdenv.isDarwin) "USE_SYSTEM_BLAS=1")
9393- "USE_BLAS64=${if blas.isILP64 then "1" else "0"}"
9494-9595- "USE_SYSTEM_LAPACK=1"
9696-9797- "USE_SYSTEM_ARPACK=1"
9898- "USE_SYSTEM_FFTW=1"
9999- "USE_SYSTEM_GMP=1"
100100- "USE_SYSTEM_LIBGIT2=1"
101101- "USE_SYSTEM_LIBUNWIND=1"
102102-103103- "USE_SYSTEM_MPFR=1"
104104- "USE_SYSTEM_OPENLIBM=1"
105105- "USE_SYSTEM_OPENSPECFUN=1"
106106- "USE_SYSTEM_PATCHELF=1"
107107- "USE_SYSTEM_PCRE=1"
108108- "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config"
109109- "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
110110- "USE_SYSTEM_READLINE=1"
111111- "USE_SYSTEM_UTF8PROC=1"
112112- "USE_SYSTEM_ZLIB=1"
113113-114114- "USE_BINARYBUILDER=0"
115115- ];
116116-117117- LD_LIBRARY_PATH = makeLibraryPath [
118118- arpack fftw fftwSinglePrec gmp libgit2 mpfr blas openlibm
119119- openspecfun pcre2 lapack
120120- ];
121121-122122- # Other versions of Julia pass the tests, but we are not sure why these fail.
123123- doCheck = false;
124124- checkTarget = "testall";
125125- # Julia's tests require read/write access to $HOME
126126- preCheck = ''
127127- export HOME="$NIX_BUILD_TOP"
128128- '';
129129-130130- preBuild = ''
131131- sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile
132132- sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
133133- export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
134134- '';
135135-136136- postInstall = ''
137137- # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
138138- # as using a wrapper with LD_LIBRARY_PATH causes segmentation
139139- # faults when program returns an error:
140140- # $ julia -e 'throw(Error())'
141141- find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do
142142- if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then
143143- ln -sv $lib $out/lib/julia/$(basename $lib)
144144- fi
145145- done
146146- '';
147147-148148- passthru = {
149149- inherit majorVersion minorVersion maintenanceVersion;
150150- site = "share/julia/site/v${majorVersion}.${minorVersion}";
151151- };
152152-153153- meta = {
154154- description = "High-level performance-oriented dynamical language for technical computing";
155155- homepage = "https://julialang.org/";
156156- license = lib.licenses.mit;
157157- maintainers = with lib.maintainers; [ raskin rob garrison ];
158158- platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
159159- broken = stdenv.isi686;
160160- };
161161-}
+3-7
pkgs/development/compilers/julia/1.5.nix
···3333 };
34343535 patches = [
3636- ./use-system-utf8proc-julia-1.3.patch
3737-3838- # Julia recompiles a precompiled file if the mtime stored *in* the
3939- # .ji file differs from the mtime of the .ji file. This
4040- # doesn't work in Nix because Nix changes the mtime of files in
4141- # the Nix store to 1. So patch Julia to accept mtimes of 1.
4242- ./allow_nix_mtime.patch
3636+ ./patches/1.5/use-system-utf8proc-julia-1.3.patch
4337 ];
44384539 postPatch = ''
···128122 sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
129123 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
130124 '';
125125+126126+ enableParallelBuilding = true;
131127132128 postInstall = ''
133129 # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
+24
pkgs/development/compilers/julia/README.md
···11+Julia
22+=====
33+44+[Julia][julia], as a full-fledged programming language with an extensive
55+standard library that covers numerical computing, can be somewhat challenging to
66+package. This file aims to provide pointers which could not easily be included
77+as comments in the expressions themselves.
88+99+[julia]: https://julialang.org
1010+1111+For Nixpkgs, the manual is as always your primary reference, and for the Julia
1212+side of things you probably want to familiarise yourself with the [README
1313+][readme], [build instructions][build], and [release process][release_process].
1414+Remember that these can change between Julia releases, especially if the LTS and
1515+release branches have deviated greatly. A lot of the build process is
1616+underdocumented and thus there is no substitute for digging into the code that
1717+controls the build process. You are very likely to need to use the test suite to
1818+locate and address issues and in the end passing it, while only disabling a
1919+minimal set of broken or incompatible tests you think you have a good reason to
2020+disable, is your best bet at arriving at a solid derivation.
2121+2222+[readme]: https://github.com/JuliaLang/julia/blob/master/README.md
2323+[build]: https://github.com/JuliaLang/julia/blob/master/doc/build/build.md
2424+[release_process]: https://julialang.org/blog/2019/08/release-process
···337337 kodiPlain = kodi;
338338 kodiPlainWayland = kodi-wayland;
339339 jellyfin_10_5 = throw "Jellyfin 10.5 is no longer supported and contains a security vulnerability. Please upgrade to a newer version."; # added 2021-04-26
340340- julia_07 = throw "julia_07 is deprecated in favor of julia_10 LTS"; # added 2020-09-15
341341- julia_11 = throw "julia_11 is deprecated in favor of latest Julia version"; # added 2020-09-15
340340+ julia_07 = throw "julia_07 has been deprecated in favor of the latest LTS version"; # added 2020-09-15
341341+ julia_1 = throw "julia_1 has been deprecated in favor of julia_10 as it was ambiguous"; # added 2021-03-13
342342+ julia_11 = throw "julia_11 has been deprecated in favor of the latest stable version"; # added 2020-09-15
343343+ julia_13 = throw "julia_13 has been deprecated in favor of the latest stable version"; # added 2021-03-13
342344 kdeconnect = plasma5Packages.kdeconnect-kde; # added 2020-10-28
343345 kdiff3-qt5 = kdiff3; # added 2017-02-18
344346 keepass-keefox = keepass-keepassrpc; # backwards compatibility alias, added 2018-02