about summary refs log tree commit diff
path: root/pkgs/development/compilers/julia
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/julia')
-rw-r--r--pkgs/development/compilers/julia/1.6-bin.nix72
-rw-r--r--pkgs/development/compilers/julia/README.md24
-rw-r--r--pkgs/development/compilers/julia/default.nix60
-rw-r--r--pkgs/development/compilers/julia/generic-bin.nix119
-rw-r--r--pkgs/development/compilers/julia/generic.nix92
-rw-r--r--pkgs/development/compilers/julia/patches/1.10/0002-skip-failing-and-flaky-tests.patch25
-rw-r--r--pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch30
-rw-r--r--pkgs/development/compilers/julia/patches/1.9-bin/0001-allow-skipping-internet-required-tests.patch50
-rw-r--r--pkgs/development/compilers/julia/patches/1.9/0002-skip-failing-and-flaky-tests.patch25
9 files changed, 0 insertions, 497 deletions
diff --git a/pkgs/development/compilers/julia/1.6-bin.nix b/pkgs/development/compilers/julia/1.6-bin.nix
deleted file mode 100644
index dea8a140ee5f..000000000000
--- a/pkgs/development/compilers/julia/1.6-bin.nix
+++ /dev/null
@@ -1,72 +0,0 @@
-{ autoPatchelfHook, fetchurl, lib, stdenv }:
-
-stdenv.mkDerivation rec {
-  pname = "julia-bin";
-  version = "1.6.7";
-
-  src = {
-    x86_64-linux = fetchurl {
-      url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz";
-      sha256 = "sha256-bEUi1ZXky80AFXrEWKcviuwBdXBT0gc/mdqjnkQrKjY=";
-    };
-  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
-
-  # Julia’s source files are in different locations for source and binary
-  # releases. Thus we temporarily create a symlink to allow us to share patches
-  # with source releases.
-  prePatch = ''
-    ln -s share/julia/test
-  '';
-  patches = [
-    # Source release Nix patch(es) relevant for binary releases as well.
-    ./patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
-  ];
-  postPatch = ''
-    # Revert symlink hack.
-    rm test
-
-    # Julia fails to pick up our Certification Authority root certificates, but
-    # it provides its own so we can simply disable the test. Patching in the
-    # dynamic path to ours require us to rebuild the Julia system image.
-    substituteInPlace share/julia/stdlib/v${lib.versions.majorMinor version}/NetworkOptions/test/runtests.jl \
-      --replace '@test ca_roots_path() != bundled_ca_roots()' \
-        '@test_skip ca_roots_path() != bundled_ca_roots()'
-  '';
-
-  nativeBuildInputs = [ autoPatchelfHook ];
-
-  installPhase = ''
-    runHook preInstall
-    cp -r . $out
-    runHook postInstall
-  '';
-
-  # Breaks backtraces, etc.
-  dontStrip = true;
-
-  doInstallCheck = true;
-  preInstallCheck = ''
-    # Some tests require read/write access to $HOME.
-    export HOME="$TMPDIR"
-  '';
-  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
-    runHook postInstallCheck
-  '';
-
-  meta = {
-    description = "High-level, high-performance, dynamic language for technical computing";
-    homepage = "https://julialang.org";
-    # Bundled and linked with various GPL code, although Julia itself is MIT.
-    license = lib.licenses.gpl2Plus;
-    maintainers = with lib.maintainers; [ raskin thomasjm ];
-    platforms = [ "x86_64-linux" ];
-    mainProgram = "julia";
-  };
-}
diff --git a/pkgs/development/compilers/julia/README.md b/pkgs/development/compilers/julia/README.md
deleted file mode 100644
index e9843fa3c9e7..000000000000
--- a/pkgs/development/compilers/julia/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-Julia
-=====
-
-[Julia][julia], as a full-fledged programming language with an extensive
-standard library that covers numerical computing, can be somewhat challenging to
-package. This file aims to provide pointers which could not easily be included
-as comments in the expressions themselves.
-
-[julia]: https://julialang.org
-
-For Nixpkgs, the manual is as always your primary reference, and for the Julia
-side of things you probably want to familiarise yourself with the [README
-][readme], [build instructions][build], and [release process][release_process].
-Remember that these can change between Julia releases, especially if the LTS and
-release branches have deviated greatly. A lot of the build process is
-underdocumented and thus there is no substitute for digging into the code that
-controls the build process. You are very likely to need to use the test suite to
-locate and address issues and in the end passing it, while only disabling a
-minimal set of broken or incompatible tests you think you have a good reason to
-disable, is your best bet at arriving at a solid derivation.
-
-[readme]: https://github.com/JuliaLang/julia/blob/master/README.md
-[build]: https://github.com/JuliaLang/julia/tree/master/doc/src/devdocs/build
-[release_process]: https://julialang.org/blog/2019/08/release-process
diff --git a/pkgs/development/compilers/julia/default.nix b/pkgs/development/compilers/julia/default.nix
deleted file mode 100644
index becbd64ea55b..000000000000
--- a/pkgs/development/compilers/julia/default.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{ callPackage }:
-
-let
-  juliaWithPackages = callPackage ../../julia-modules { };
-
-  wrapJulia = julia: julia.overrideAttrs (oldAttrs: {
-    passthru = (oldAttrs.passthru or { }) // {
-      withPackages = juliaWithPackages.override { inherit julia; };
-    };
-  });
-
-in
-
-{
-  julia_16-bin = wrapJulia (callPackage ./1.6-bin.nix { });
-  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.4";
-      sha256 = {
-        x86_64-linux = "079f61757c3b5b40d2ade052b3cc4816f50f7ef6df668825772562b3746adff1";
-        aarch64-linux = "ae4ae6ade84a103cdf30ce91c8d4035a0ef51c3e2e66f90a0c13abeb4e100fc4";
-        x86_64-darwin = "259c18a5294dd41cc60117ecb9fc5a8b2f659807284903a65439fb9d3818c763";
-        aarch64-darwin = "97b88d7f9b5724118769f3a3bd259f8f7ada48cdecf3d584cf68162dd873dd10";
-      };
-    })
-    { });
-  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.4";
-      hash = "sha256-8y5Sd/XYKmOCSILN6/rBWBmbuEgUw8AZo/7MNgFYYZE=";
-      patches = [
-        ./patches/1.10/0002-skip-failing-and-flaky-tests.patch
-      ];
-    })
-    { });
-}
diff --git a/pkgs/development/compilers/julia/generic-bin.nix b/pkgs/development/compilers/julia/generic-bin.nix
deleted file mode 100644
index 09a8c2bce3bf..000000000000
--- a/pkgs/development/compilers/julia/generic-bin.nix
+++ /dev/null
@@ -1,119 +0,0 @@
-{ version
-, sha256
-, patches ? [ ]
-}:
-
-{ autoPatchelfHook
-, fetchurl
-, lib
-, stdenv
-}:
-
-let
-  skip_tests = [
-    # Test flaky on ofborg
-    "channels"
-    # Test flaky because of our RPATH patching
-    # https://github.com/NixOS/nixpkgs/pull/230965#issuecomment-1545336489
-    "compiler/codegen"
-    # Test flaky
-    "read"
-  ] ++ lib.optionals (lib.versionAtLeast version "1.10") [
-    # Test flaky
-    # https://github.com/JuliaLang/julia/issues/52739
-    "REPL"
-    # Test flaky
-    "ccall"
-  ] ++ lib.optionals stdenv.isDarwin [
-    # Test flaky on ofborg
-    "FileWatching"
-    # Test requires pbcopy
-    "InteractiveUtils"
-    # Test requires network access
-    "Sockets"
-  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
-    # Test Failed at $out/share/julia/stdlib/v1.8/LinearAlgebra/test/blas.jl:702
-    "LinearAlgebra/blas"
-    # Test Failed at $out/share/julia/test/misc.jl:724
-    "misc"
-  ];
-in
-stdenv.mkDerivation {
-  pname = "julia-bin";
-
-  inherit version patches;
-
-  src = {
-    x86_64-linux = fetchurl {
-      url = "https://julialang-s3.julialang.org/bin/linux/x64/${lib.versions.majorMinor version}/julia-${version}-linux-x86_64.tar.gz";
-      sha256 = sha256.x86_64-linux;
-    };
-    aarch64-linux = fetchurl {
-      url = "https://julialang-s3.julialang.org/bin/linux/aarch64/${lib.versions.majorMinor version}/julia-${version}-linux-aarch64.tar.gz";
-      sha256 = sha256.aarch64-linux;
-    };
-    x86_64-darwin = fetchurl {
-      url = "https://julialang-s3.julialang.org/bin/mac/x64/${lib.versions.majorMinor version}/julia-${version}-mac64.tar.gz";
-      sha256 = sha256.x86_64-darwin;
-    };
-    aarch64-darwin = fetchurl {
-      url = "https://julialang-s3.julialang.org/bin/mac/aarch64/${lib.versions.majorMinor version}/julia-${version}-macaarch64.tar.gz";
-      sha256 = sha256.aarch64-darwin;
-    };
-  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
-
-  postPatch = ''
-    # Julia fails to pick up our Certification Authority root certificates, but
-    # it provides its own so we can simply disable the test. Patching in the
-    # dynamic path to ours require us to rebuild the Julia system image.
-    substituteInPlace share/julia/stdlib/v${lib.versions.majorMinor version}/NetworkOptions/test/runtests.jl \
-      --replace '@test ca_roots_path() != bundled_ca_roots()' \
-        '@test_skip ca_roots_path() != bundled_ca_roots()'
-  '';
-
-  nativeBuildInputs = lib.optionals stdenv.isLinux [
-    autoPatchelfHook
-    # https://github.com/JuliaLang/julia/blob/v1.9.0/NEWS.md#external-dependencies
-    stdenv.cc.cc
-  ];
-
-  installPhase = ''
-    runHook preInstall
-    cp -r . $out
-    runHook postInstall
-  '';
-
-  # Breaks backtraces, etc.
-  dontStrip = true;
-
-  doInstallCheck = true;
-
-  preInstallCheck = ''
-    export JULIA_TEST_USE_MULTIPLE_WORKERS=true
-    # Some tests require read/write access to $HOME.
-    # And $HOME cannot be equal to $TMPDIR as it causes test failures
-    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
-  '';
-
-  meta = {
-    description = "High-level, high-performance, dynamic language for technical computing";
-    homepage = "https://julialang.org";
-    # Bundled and linked with various GPL code, although Julia itself is MIT.
-    license = lib.licenses.gpl2Plus;
-    maintainers = with lib.maintainers; [ raskin nickcao wegank thomasjm ];
-    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
-    mainProgram = "julia";
-  };
-}
diff --git a/pkgs/development/compilers/julia/generic.nix b/pkgs/development/compilers/julia/generic.nix
deleted file mode 100644
index 209e97edcce7..000000000000
--- a/pkgs/development/compilers/julia/generic.nix
+++ /dev/null
@@ -1,92 +0,0 @@
-{ version
-, hash
-, patches
-}:
-
-{ lib
-, stdenv
-, fetchurl
-, which
-, python3
-, gfortran
-, cmake
-, perl
-, gnum4
-, openssl
-, libxml2
-}:
-
-stdenv.mkDerivation rec {
-  pname = "julia";
-
-  inherit version patches;
-
-  src = fetchurl {
-    url = "https://github.com/JuliaLang/julia/releases/download/v${version}/julia-${version}-full.tar.gz";
-    inherit hash;
-  };
-
-  strictDeps = true;
-
-  nativeBuildInputs = [
-    which
-    python3
-    gfortran
-    cmake
-    perl
-    gnum4
-    openssl
-  ];
-
-  buildInputs = [
-    libxml2
-  ];
-
-  dontUseCmakeConfigure = true;
-
-  postPatch = ''
-    patchShebangs .
-  '';
-
-  makeFlags = [
-    "prefix=$(out)"
-    "USE_BINARYBUILDER=0"
-  ] ++ lib.optionals stdenv.isx86_64 [
-    # https://github.com/JuliaCI/julia-buildkite/blob/main/utilities/build_envs.sh
-    "JULIA_CPU_TARGET=generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1);x86-64-v4,-rdrnd,base(1)"
-  ] ++ lib.optionals stdenv.isAarch64 [
-    "JULIA_CPU_TARGET=generic;cortex-a57;thunderx2t99;carmel,clone_all;apple-m1,base(3);neoverse-512tvb,base(3)"
-  ];
-
-  # 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
-  '';
-
-  # 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.
-    # And $HOME cannot be equal to $TMPDIR as it causes test failures
-    export HOME=$(mktemp -d)
-  '';
-
-  dontStrip = true;
-
-  enableParallelBuilding = true;
-
-  meta = with lib; {
-    description = "High-level performance-oriented dynamical language for technical computing";
-    mainProgram = "julia";
-    homepage = "https://julialang.org/";
-    license = licenses.mit;
-    maintainers = with maintainers; [ nickcao joshniemela thomasjm ];
-    platforms = [ "x86_64-linux" "aarch64-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 <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
-
diff --git a/pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch b/pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
deleted file mode 100644
index 243a9cfd76ae..000000000000
--- a/pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 44c2c979c4f2222567ce65f506cf47fb87482348 Mon Sep 17 00:00:00 2001
-From: Pontus Stenetorp <pontus@stenetorp.se>
-Date: Thu, 8 Apr 2021 04:37:44 +0000
-Subject: [PATCH 5/6] nix: Enable parallel unit tests for sandbox
-
-Disabled by default due to lack of networking in the Nix sandbox. This
-greatly speeds up the build process on a multi-core system.
----
- test/runtests.jl | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/test/runtests.jl b/test/runtests.jl
-index 2f9cd058bb..2f8c19fa32 100644
---- a/test/runtests.jl
-+++ b/test/runtests.jl
-@@ -83,8 +83,9 @@ prepend!(tests, linalg_tests)
- import LinearAlgebra
- cd(@__DIR__) do
-     n = 1
--    if net_on
--        n = min(Sys.CPU_THREADS, length(tests))
-+    if net_on || haskey(ENV, "NIX_BUILD_CORES")
-+        x = haskey(ENV, "NIX_BUILD_CORES") ? parse(Int, ENV["NIX_BUILD_CORES"]) : Sys.CPU_THREADS
-+        n = min(x, Sys.CPU_THREADS, length(tests))
-         n > 1 && addprocs_with_testenv(n)
-         LinearAlgebra.BLAS.set_num_threads(1)
-     end
--- 
-2.29.3
-
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 <nickcao@nichi.co>
-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
-