Unverified Commit 81d15a52 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

julia: drop 1.9, clean up package (#456726)

parents 7c7c3b01 e1147dbe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.
+0 −31
Original line number Diff line number Diff line
@@ -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
      ];
    }) { }
  );
}
+41 −3
Original line number Diff line number Diff line
{
  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"
+0 −25
Original line number Diff line number Diff line
From 9da2f2596db9f4f1a61825d82d9b8c3f3b2e99aa Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
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
+0 −25
Original line number Diff line number Diff line
From 9da2f2596db9f4f1a61825d82d9b8c3f3b2e99aa Mon Sep 17 00:00:00 2001
From: Nick Cao <nickcao@nichi.co>
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
Loading