Merge pull request #230965 from GaetanLepage/julia-bin

julia-bin: 1.8.5 -> 1.9.0

authored by Nick Cao and committed by GitHub cbfad296 dfb8a2a7

+156 -1
+104
pkgs/development/compilers/julia/1.9-bin.nix
··· 1 + { autoPatchelfHook, fetchurl, lib, stdenv }: 2 + 3 + let 4 + skip_tests = [ 5 + # Test flaky on ofborg 6 + "channels" 7 + 8 + # Test flaky because of our RPATH patching 9 + # https://github.com/NixOS/nixpkgs/pull/230965#issuecomment-1545336489 10 + "compiler/codegen" 11 + ] ++ lib.optionals stdenv.isDarwin [ 12 + # Test flaky on ofborg 13 + "FileWatching" 14 + # Test requires pbcopy 15 + "InteractiveUtils" 16 + # Test requires network access 17 + "Sockets" 18 + ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ 19 + # Test Failed at $out/share/julia/stdlib/v1.8/LinearAlgebra/test/blas.jl:702 20 + "LinearAlgebra/blas" 21 + # Test Failed at $out/share/julia/test/misc.jl:724 22 + "misc" 23 + ]; 24 + in 25 + stdenv.mkDerivation rec { 26 + pname = "julia-bin"; 27 + version = "1.9.0"; 28 + 29 + src = { 30 + x86_64-linux = fetchurl { 31 + url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz"; 32 + hash = "sha256-AMYURm75gJwusjSA440ZaixXf/8nMMT4PRNbkT1HM1k="; 33 + }; 34 + aarch64-linux = fetchurl { 35 + url = "https://julialang-s3.julialang.org/bin/linux/aarch64/${lib.versions.majorMinor version}/julia-${version}-linux-aarch64.tar.gz"; 36 + hash = "sha256-ChQxW1Os2X8i0m1Kj9LCN+Uk6Vw77JjS14tU2Awrw2Q="; 37 + }; 38 + x86_64-darwin = fetchurl { 39 + url = "https://julialang-s3.julialang.org/bin/mac/x64/${lib.versions.majorMinor version}/julia-${version}-mac64.tar.gz"; 40 + hash = "sha256-ALxMJ+6xvr01BZcxL/CRkXYxX9MZnGPslj+0HjsEv68="; 41 + }; 42 + aarch64-darwin = fetchurl { 43 + url = "https://julialang-s3.julialang.org/bin/mac/aarch64/${lib.versions.majorMinor version}/julia-${version}-macaarch64.tar.gz"; 44 + hash = "sha256-U+YncKaZDVqJ56AB72iqJd4lEmo76DggDEyacF2uo3w="; 45 + }; 46 + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 47 + 48 + patches = [ 49 + # https://github.com/JuliaLang/julia/commit/f5eeba35d9bf20de251bb9160cc935c71e8b19ba 50 + ./patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch 51 + ]; 52 + 53 + postPatch = '' 54 + # Julia fails to pick up our Certification Authority root certificates, but 55 + # it provides its own so we can simply disable the test. Patching in the 56 + # dynamic path to ours require us to rebuild the Julia system image. 57 + substituteInPlace share/julia/stdlib/v${lib.versions.majorMinor version}/NetworkOptions/test/runtests.jl \ 58 + --replace '@test ca_roots_path() != bundled_ca_roots()' \ 59 + '@test_skip ca_roots_path() != bundled_ca_roots()' 60 + ''; 61 + 62 + nativeBuildInputs = lib.optionals stdenv.isLinux [ 63 + autoPatchelfHook 64 + # https://github.com/JuliaLang/julia/blob/v1.9.0/NEWS.md#external-dependencies 65 + stdenv.cc.cc 66 + ]; 67 + 68 + installPhase = '' 69 + runHook preInstall 70 + cp -r . $out 71 + runHook postInstall 72 + ''; 73 + 74 + # Breaks backtraces, etc. 75 + dontStrip = true; 76 + 77 + doInstallCheck = true; 78 + preInstallCheck = '' 79 + export JULIA_TEST_USE_MULTIPLE_WORKERS=true 80 + # Some tests require read/write access to $HOME. 81 + export HOME="$TMPDIR" 82 + ''; 83 + installCheckPhase = '' 84 + runHook preInstallCheck 85 + # Command lifted from `test/Makefile`. 86 + $out/bin/julia \ 87 + --check-bounds=yes \ 88 + --startup-file=no \ 89 + --depwarn=error \ 90 + $out/share/julia/test/runtests.jl \ 91 + --skip internet_required ${toString skip_tests} 92 + runHook postInstallCheck 93 + ''; 94 + 95 + meta = { 96 + description = "High-level, high-performance, dynamic language for technical computing"; 97 + homepage = "https://julialang.org"; 98 + # Bundled and linked with various GPL code, although Julia itself is MIT. 99 + license = lib.licenses.gpl2Plus; 100 + maintainers = with lib.maintainers; [ raskin nickcao wegank ]; 101 + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 102 + mainProgram = "julia"; 103 + }; 104 + }
+50
pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch
··· 1 + diff --git a/share/julia/test/choosetests.jl b/share/julia/test/choosetests.jl 2 + index 334ef05..db5f795 100644 3 + --- a/share/julia/test/choosetests.jl 4 + +++ b/share/julia/test/choosetests.jl 5 + @@ -31,6 +31,19 @@ const TESTNAMES = [ 6 + "smallarrayshrink", "opaque_closure", "filesystem", "download", 7 + ] 8 + 9 + +const INTERNET_REQUIRED_LIST = [ 10 + + "Artifacts", 11 + + "Downloads", 12 + + "LazyArtifacts", 13 + + "LibCURL", 14 + + "LibGit2", 15 + + "Pkg", 16 + + "download", 17 + + "TOML", 18 + +] 19 + + 20 + +const NETWORK_REQUIRED_LIST = vcat(INTERNET_REQUIRED_LIST, ["Sockets"]) 21 + + 22 + """ 23 + `(; tests, net_on, exit_on_error, seed) = choosetests(choices)` selects a set of tests to be 24 + run. `choices` should be a vector of test names; if empty or set to 25 + @@ -149,6 +162,7 @@ function choosetests(choices = []) 26 + filtertests!(tests, "compiler/EscapeAnalysis", [ 27 + "compiler/EscapeAnalysis/local", "compiler/EscapeAnalysis/interprocedural"]) 28 + filtertests!(tests, "stdlib", STDLIBS) 29 + + filtertests!(tests, "internet_required", INTERNET_REQUIRED_LIST) 30 + # do ambiguous first to avoid failing if ambiguities are introduced by other tests 31 + filtertests!(tests, "ambiguous") 32 + 33 + @@ -164,16 +178,7 @@ function choosetests(choices = []) 34 + filter!(x -> x != "rounding", tests) 35 + end 36 + 37 + - net_required_for = filter!(in(tests), [ 38 + - "Artifacts", 39 + - "Downloads", 40 + - "LazyArtifacts", 41 + - "LibCURL", 42 + - "LibGit2", 43 + - "Sockets", 44 + - "download", 45 + - "TOML", 46 + - ]) 47 + + net_required_for = filter!(in(tests), NETWORK_REQUIRED_LIST) 48 + net_on = true 49 + JULIA_TEST_NETWORKING_AVAILABLE = get(ENV, "JULIA_TEST_NETWORKING_AVAILABLE", "") |> 50 + strip |>
+2 -1
pkgs/top-level/all-packages.nix
··· 15521 15521 15522 15522 julia_16-bin = callPackage ../development/compilers/julia/1.6-bin.nix { }; 15523 15523 julia_18-bin = callPackage ../development/compilers/julia/1.8-bin.nix { }; 15524 + julia_19-bin = callPackage ../development/compilers/julia/1.9-bin.nix { }; 15524 15525 15525 15526 julia_18 = callPackage ../development/compilers/julia/1.8.nix { }; 15526 15527 julia_19 = callPackage ../development/compilers/julia/1.9.nix { }; 15527 15528 15528 15529 julia-lts-bin = julia_16-bin; 15529 - julia-stable-bin = julia_18-bin; 15530 + julia-stable-bin = julia_19-bin; 15530 15531 julia-bin = julia-stable-bin; 15531 15532 15532 15533 jwasm = callPackage ../development/compilers/jwasm { };