2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, which
|
|
|
|
, python3
|
|
|
|
, gfortran
|
|
|
|
, cmake
|
|
|
|
, perl
|
|
|
|
, gnum4
|
|
|
|
, libxml2
|
2022-12-28 21:21:41 +00:00
|
|
|
, openssl
|
2022-09-30 11:47:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "julia";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.8.5";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/JuliaLang/julia/releases/download/v${version}/julia-${version}-full.tar.gz";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-NVVAgKS0085S7yICVDBr1CrA2I7/nrhVkqV9BmPbXfI=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
patches = [
|
|
|
|
./patches/1.8/0001-skip-building-doc.patch
|
|
|
|
./patches/1.8/0002-skip-failing-and-flaky-tests.patch
|
|
|
|
];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
which
|
|
|
|
python3
|
|
|
|
gfortran
|
|
|
|
cmake
|
|
|
|
perl
|
|
|
|
gnum4
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxml2
|
2022-12-28 21:21:41 +00:00
|
|
|
openssl
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"prefix=$(out)"
|
|
|
|
"USE_BINARYBUILDER=0"
|
2022-12-28 21:21:41 +00:00
|
|
|
# workaround for https://github.com/JuliaLang/julia/issues/47989
|
|
|
|
"USE_INTEL_JITEVENTS=0"
|
2022-12-17 10:02:37 +00:00
|
|
|
] ++ lib.optionals stdenv.isx86_64 [
|
|
|
|
# https://github.com/JuliaCI/julia-buildbot/blob/master/master/inventory.py
|
|
|
|
"JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)"
|
|
|
|
] ++ lib.optionals stdenv.isAarch64 [
|
2023-01-11 07:51:40 +00:00
|
|
|
"JULIA_CPU_TARGET=generic;cortex-a57;thunderx2t99;armv8.2-a,crypto,fullfp16,lse,rdm"
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
# remove forbidden reference to $TMPDIR
|
|
|
|
preFixup = ''
|
|
|
|
for file in libcurl.so libgmpxx.so; do
|
|
|
|
patchelf --shrink-rpath --allowed-rpath-prefixes ${builtins.storeDir} "$out/lib/julia/$file"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckTarget = "testall";
|
|
|
|
|
|
|
|
preInstallCheck = ''
|
|
|
|
export HOME="$TMPDIR"
|
|
|
|
export JULIA_TEST_USE_MULTIPLE_WORKERS="true"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High-level performance-oriented dynamical language for technical computing";
|
|
|
|
homepage = "https://julialang.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nickcao ];
|
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
};
|
|
|
|
}
|