diff --git a/doc/languages-frameworks/julia.section.md b/doc/languages-frameworks/julia.section.md index 911a313a74ab..cd247a533fef 100644 --- a/doc/languages-frameworks/julia.section.md +++ b/doc/languages-frameworks/julia.section.md @@ -4,7 +4,7 @@ Nixpkgs includes Julia as the `julia` derivation. You can get specific versions by looking at the other `julia*` top-level derivations available. -For example, `julia_19` corresponds to Julia 1.9. +For example, `julia_112` corresponds to Julia 1.12. We also provide the current stable version as `julia-stable`, and an LTS version as `julia-lts`. Occasionally, a Julia version has been too difficult to build from source in Nixpkgs and has been fetched prebuilt instead. diff --git a/pkgs/development/compilers/julia/default.nix b/pkgs/development/compilers/julia/default.nix index 80fcfd5a0add..f59976263566 100644 --- a/pkgs/development/compilers/julia/default.nix +++ b/pkgs/development/compilers/julia/default.nix @@ -14,21 +14,6 @@ let in { - julia_19-bin = wrapJulia ( - callPackage (import ./generic-bin.nix { - version = "1.9.4"; - sha256 = { - x86_64-linux = "07d20c4c2518833e2265ca0acee15b355463361aa4efdab858dad826cf94325c"; - aarch64-linux = "541d0c5a9378f8d2fc384bb8595fc6ffe20d61054629a6e314fb2f8dfe2f2ade"; - x86_64-darwin = "67eec264f6afc9e9bf72c0f62c84d91c2ebdfaed6a0aa11606e3c983d278b441"; - aarch64-darwin = "67542975e86102eec95bc4bb7c30c5d8c7ea9f9a0b388f0e10f546945363b01a"; - }; - patches = [ - # https://github.com/JuliaLang/julia/commit/f5eeba35d9bf20de251bb9160cc935c71e8b19ba - ./patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch - ]; - }) { } - ); julia_110-bin = wrapJulia ( callPackage (import ./generic-bin.nix { version = "1.10.10"; @@ -62,21 +47,11 @@ in }; }) { } ); - julia_19 = wrapJulia ( - callPackage (import ./generic.nix { - version = "1.9.4"; - hash = "sha256-YYQ7lkf9BtOymU8yd6ZN4ctaWlKX2TC4yOO8DpN0ACQ="; - patches = [ - ./patches/1.9/0002-skip-failing-and-flaky-tests.patch - ]; - }) { } - ); julia_110 = wrapJulia ( callPackage (import ./generic.nix { version = "1.10.10"; hash = "sha256-/NTIGLlcNu4sI1rICa+PS/Jn+YnWi37zFBcbfMnv3Ys="; patches = [ - ./patches/1.10/0002-skip-failing-and-flaky-tests.patch # Revert https://github.com/JuliaLang/julia/pull/55354 # [build] Some improvements to the LLVM build system # Related: https://github.com/JuliaLang/julia/issues/55617 @@ -92,18 +67,12 @@ in callPackage (import ./generic.nix { version = "1.11.7"; hash = "sha256-puluy9YAV8kdx6mfwbN1F7Nhot+P0cRv/a0dm86Jln0="; - patches = [ - ./patches/1.11/0002-skip-failing-and-flaky-tests.patch - ]; }) { } ); julia_112 = wrapJulia ( callPackage (import ./generic.nix { version = "1.12.1"; hash = "sha256-iR0Wu5HIqU1aY1WoLBf6PCRY64kWDUKEQ6CyobhB6lI="; - patches = [ - ./patches/1.12/0001-skip-failing-and-flaky-tests.patch - ]; }) { } ); } diff --git a/pkgs/development/compilers/julia/generic.nix b/pkgs/development/compilers/julia/generic.nix index 0bd32f379562..d1a51e9994ef 100644 --- a/pkgs/development/compilers/julia/generic.nix +++ b/pkgs/development/compilers/julia/generic.nix @@ -1,7 +1,7 @@ { version, hash, - patches, + patches ? [ ], }: { @@ -21,6 +21,33 @@ buildPackages, }: +let + skip_tests = [ + # test flaky on ofborg + "channels" + # test flaky + "read" + "NetworkOptions" + "REPL" + "ccall" + ] + ++ lib.optionals (lib.versionAtLeast version "1.11") [ + "loading" + "cmdlineargs" + ] + ++ lib.optionals (lib.versionAtLeast version "1.12") [ + "Distributed" + # test flaky because of our RPATH patching + # https://github.com/NixOS/nixpkgs/pull/230965#issuecomment-1545336489 + "Compiler/codegen" + "precompile" + "compileall" + ] + ++ lib.optionals (lib.versionOlder version "1.12") [ + "compiler/codegen" # older versions' test was in lowercase + ]; +in + stdenv.mkDerivation rec { pname = "julia"; @@ -93,8 +120,6 @@ stdenv.mkDerivation rec { # tests are flaky for aarch64-linux on hydra doInstallCheck = if (lib.versionOlder version "1.10") then !stdenv.hostPlatform.isAarch64 else true; - installCheckTarget = "testall"; - preInstallCheck = '' export JULIA_TEST_USE_MULTIPLE_WORKERS="true" # Some tests require read/write access to $HOME. @@ -102,6 +127,18 @@ stdenv.mkDerivation rec { export HOME=$(mktemp -d) ''; + installCheckPhase = '' + runHook preInstallCheck + # Command lifted from `test/Makefile`. + $out/bin/julia \ + --check-bounds=yes \ + --startup-file=no \ + --depwarn=error \ + $out/share/julia/test/runtests.jl \ + --skip internet_required ${toString skip_tests} + runHook postInstallCheck + ''; + dontStrip = true; enableParallelBuilding = true; @@ -122,6 +159,7 @@ stdenv.mkDerivation rec { nickcao joshniemela thomasjm + taranarmo ]; platforms = [ "x86_64-linux" diff --git a/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch deleted file mode 100644 index 474653bf342c..000000000000 --- a/pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9da2f2596db9f4f1a61825d82d9b8c3f3b2e99aa Mon Sep 17 00:00:00 2001 -From: Nick Cao -Date: Wed, 10 Jan 2024 20:58:20 -0500 -Subject: [PATCH 2/2] skip failing and flaky tests - ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index 88dbe5b2b4..a2a7a55e20 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -28,7 +28,7 @@ default: - - $(TESTS): - @cd $(SRCDIR) && \ -- $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@) -+ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip NetworkOptions REPL channels FileWatching ccall $@) - - $(addprefix revise-, $(TESTS)): revise-% : - @cd $(SRCDIR) && \ --- -2.43.0 - diff --git a/pkgs/development/compilers/julia/patches/1.11/0002-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.11/0002-skip-failing-and-flaky-tests.patch deleted file mode 100644 index 3577e6e71e15..000000000000 --- a/pkgs/development/compilers/julia/patches/1.11/0002-skip-failing-and-flaky-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9da2f2596db9f4f1a61825d82d9b8c3f3b2e99aa Mon Sep 17 00:00:00 2001 -From: Nick Cao -Date: Wed, 10 Jan 2024 20:58:20 -0500 -Subject: [PATCH 2/2] skip failing and flaky tests - ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index 88dbe5b2b4..a2a7a55e20 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -28,7 +28,7 @@ default: - - $(TESTS): - @cd $(SRCDIR) && \ -- $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@) -+ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip NetworkOptions REPL channels FileWatching ccall loading cmdlineargs $@) - - $(addprefix revise-, $(TESTS)): revise-% : - @cd $(SRCDIR) && \ --- -2.43.0 - diff --git a/pkgs/development/compilers/julia/patches/1.12/0001-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.12/0001-skip-failing-and-flaky-tests.patch deleted file mode 100644 index 4ab76c9fa642..000000000000 --- a/pkgs/development/compilers/julia/patches/1.12/0001-skip-failing-and-flaky-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From e26b82d0c162b6c22b65b2a5d2cd03d98fd9f5d4 Mon Sep 17 00:00:00 2001 -From: Sergey Volkov -Date: Thu, 9 Oct 2025 13:00:31 +0200 -Subject: [PATCH] disable failing and flaky tests - ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index 69b7ad1451..583e64a287 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -30,7 +30,7 @@ default: - - $(TESTS): - @cd $(SRCDIR) && \ -- $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@) -+ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip NetworkOptions REPL channels FileWatching ccall loading cmdlineargs Distributed precompile compileall $@) - - $(addprefix revise-, $(TESTS)): revise-% : - @cd $(SRCDIR) && \ --- -2.51.0 - diff --git a/pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch b/pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch deleted file mode 100644 index fc7d40a54d49..000000000000 --- a/pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/share/julia/test/choosetests.jl b/share/julia/test/choosetests.jl -index 334ef05..db5f795 100644 ---- a/share/julia/test/choosetests.jl -+++ b/share/julia/test/choosetests.jl -@@ -31,6 +31,19 @@ const TESTNAMES = [ - "smallarrayshrink", "opaque_closure", "filesystem", "download", - ] - -+const INTERNET_REQUIRED_LIST = [ -+ "Artifacts", -+ "Downloads", -+ "LazyArtifacts", -+ "LibCURL", -+ "LibGit2", -+ "Pkg", -+ "download", -+ "TOML", -+] -+ -+const NETWORK_REQUIRED_LIST = vcat(INTERNET_REQUIRED_LIST, ["Sockets"]) -+ - """ - `(; tests, net_on, exit_on_error, seed) = choosetests(choices)` selects a set of tests to be - run. `choices` should be a vector of test names; if empty or set to -@@ -149,6 +162,7 @@ function choosetests(choices = []) - filtertests!(tests, "compiler/EscapeAnalysis", [ - "compiler/EscapeAnalysis/local", "compiler/EscapeAnalysis/interprocedural"]) - filtertests!(tests, "stdlib", STDLIBS) -+ filtertests!(tests, "internet_required", INTERNET_REQUIRED_LIST) - # do ambiguous first to avoid failing if ambiguities are introduced by other tests - filtertests!(tests, "ambiguous") - -@@ -164,16 +178,7 @@ function choosetests(choices = []) - filter!(x -> x != "rounding", tests) - end - -- net_required_for = filter!(in(tests), [ -- "Artifacts", -- "Downloads", -- "LazyArtifacts", -- "LibCURL", -- "LibGit2", -- "Sockets", -- "download", -- "TOML", -- ]) -+ net_required_for = filter!(in(tests), NETWORK_REQUIRED_LIST) - net_on = true - JULIA_TEST_NETWORKING_AVAILABLE = get(ENV, "JULIA_TEST_NETWORKING_AVAILABLE", "") |> - strip |> diff --git a/pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch b/pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch deleted file mode 100644 index 966c805ad7ae..000000000000 --- a/pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0e1fe51ce93847ac3c4de49a003d9762b2f3d7c6 Mon Sep 17 00:00:00 2001 -From: Nick Cao -Date: Tue, 20 Sep 2022 18:42:59 +0800 -Subject: [PATCH 2/2] skip failing and flaky tests - ---- - test/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/Makefile b/test/Makefile -index 24e137a5b1..e78f12da04 100644 ---- a/test/Makefile -+++ b/test/Makefile -@@ -23,7 +23,7 @@ default: - - $(TESTS): - @cd $(SRCDIR) && \ -- $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl $@) -+ $(call PRINT_JULIA, $(call spawn,$(JULIA_EXECUTABLE)) --check-bounds=yes --startup-file=no --depwarn=error ./runtests.jl --skip MozillaCACerts_jll --skip NetworkOptions --skip channels $@) - - $(addprefix revise-, $(TESTS)): revise-% : - @cd $(SRCDIR) && \ --- -2.38.1 - diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 3ff8a0ac5048..3a0be3791863 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -744,6 +744,8 @@ mapAliases { jing = jing-trang; # Added 2025-09-18 joplin = joplin-cli; # Added 2025-11-03 jscoverage = throw "jscoverage has been removed, as it was broken"; # Added 2025-08-25 + julia_19 = throw "Julia 1.9 has reached its end of life and 'julia_19' has been removed. Please use a supported version."; # Added 2025-10-29 + julia_19-bin = throw "Julia 1.9 has reached its end of life and 'julia_19-bin' has been removed. Please use a supported version."; # Added 2025-10-29 k2pdfopt = throw "'k2pdfopt' has been removed from nixpkgs as it was broken"; # Added 2025-09-27 k3s_1_30 = throw "'k3s_1_30' has been removed from nixpkgs as it has reached end of life"; # Added 2025-09-01 kak-lsp = throw "'kak-lsp' has been renamed to/replaced by 'kakoune-lsp'"; # Converted to throw 2025-10-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03cf81ed9f99..cc39c1553d5a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5015,11 +5015,9 @@ with pkgs; openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { }; inherit (callPackage ../development/compilers/julia { }) - julia_19-bin julia_110-bin julia_111-bin julia_112-bin - julia_19 julia_110 julia_111 julia_112