From a0d2fa17bee251db0b74f7f8df2907b1aaf9398d Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 12 Jan 2023 10:06:26 +0800 Subject: [PATCH] julia_19: init at 1.9.0-beta2 --- pkgs/development/compilers/julia/1.9.nix | 94 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 95 insertions(+) create mode 100644 pkgs/development/compilers/julia/1.9.nix diff --git a/pkgs/development/compilers/julia/1.9.nix b/pkgs/development/compilers/julia/1.9.nix new file mode 100644 index 000000000000..71bf442c82cd --- /dev/null +++ b/pkgs/development/compilers/julia/1.9.nix @@ -0,0 +1,94 @@ +{ lib +, stdenv +, fetchurl +, fetchpatch +, which +, python3 +, gfortran +, cmake +, perl +, gnum4 +, openssl +, libxml2 +}: + +stdenv.mkDerivation rec { + pname = "julia"; + version = "1.9.0-beta2"; + + src = fetchurl { + url = "https://github.com/JuliaLang/julia/releases/download/v${version}/julia-${version}-full.tar.gz"; + hash = "sha256-LTQp5vBMOSlwThYpSIv/UNJ9eIU+WId/XWGFxsrQEzs="; + }; + + patches = [ + ./patches/1.8/0002-skip-failing-and-flaky-tests.patch + # https://github.com/JuliaLang/julia/issues/46530 + (fetchpatch { + url = "https://github.com/JuliaLang/julia/commit/b9b60fcde61ff18d77cb548421b3f71a369b4e02.patch"; + revert = true; + hash = "sha256-XXn4U8aWkWwZYwpvIx+Gk5E16prjeXooF9AafK0aEfg="; + }) + ]; + + strictDeps = true; + + nativeBuildInputs = [ + which + python3 + gfortran + cmake + perl + gnum4 + openssl + ]; + + buildInputs = [ + libxml2 + ]; + + dontUseCmakeConfigure = true; + + postPatch = '' + patchShebangs . + ''; + + makeFlags = [ + "prefix=$(out)" + "USE_BINARYBUILDER=0" + # workaround for https://github.com/JuliaLang/julia/issues/47989 + "USE_INTEL_JITEVENTS=0" + ] ++ 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 [ + "JULIA_CPU_TARGET=generic;cortex-a57;thunderx2t99;armv8.2-a,crypto,fullfp16,lse,rdm" + ]; + + # remove forbidden reference to $TMPDIR + preFixup = '' + for file in libcurl.so libgmpxx.so libmpfr.so; do + patchelf --shrink-rpath --allowed-rpath-prefixes ${builtins.storeDir} "$out/lib/julia/$file" + done + ''; + + 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" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f50f92d1994d..0a271b7b7b6f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14864,6 +14864,7 @@ with pkgs; julia_18-bin = callPackage ../development/compilers/julia/1.8-bin.nix { }; julia_18 = callPackage ../development/compilers/julia/1.8.nix { }; + julia_19 = callPackage ../development/compilers/julia/1.9.nix { }; julia-lts-bin = julia_16-bin; julia-stable-bin = julia_18-bin;