Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

julia-bin: 1.7.3 -> 1.8.0 #189656

Merged
merged 1 commit into from
Sep 7, 2022
Merged

julia-bin: 1.7.3 -> 1.8.0 #189656

merged 1 commit into from
Sep 7, 2022

Conversation

wentasah
Copy link
Contributor

@wentasah wentasah commented Sep 3, 2022

Description of changes

This is a quick attempt to make Julia 1.8.0 available in Nixpkgs. I tested it on a few of my projects and it seems to work. I only get the following warning from time to time when using Pkg:

┌ Warning: NetworkOptions could only find OpenSSL-specific TLS certificate files which cannot be used by MbedTLS. Please open an issue at https://github.com/JuliaLang/NetworkOptions.jl/issues with details about your system, especially where generic non-OpenSSL certificates can be found. See https://stackoverflow.com/questions/55447752/what-does-begin-trusted-certificate-in-a-certificate-mean for more details.
└ @ NetworkOptions /cache/build/default-amdci4-3/julialang/julia-release-1-dot-8/usr/share/julia/stdlib/v1.8/NetworkOptions/src/ca_roots.jl:104

I'll try to fix it later. For now, I'm marking this as a draft, because I'm not sure how severe the warning is.

I'm keeping version 1.7 in place. There are no big differences in the expression of 1.7 and 1.8, as can be seen from the diff below:

diff --git a/1.7-bin.nix b/1.8-bin.nix
index 5352d38a221..0dbdb3713d2 100644
--- a/1.7-bin.nix
+++ b/1.8-bin.nix
@@ -2,12 +2,12 @@
 
 stdenv.mkDerivation rec {
   pname = "julia-bin";
-  version = "1.7.3";
+  version = "1.8.0";
 
   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 = "0ff7ypr76xf99h3dmy1xdnkq2xn432qnzihxs72xrd4j5nhlybwv";
+      sha256 = "sha256-6A1zLMt/eeAA15jLi2Vtw2QatZUW1uTlLhZ2UBeJKgA=";
     };
   }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
 
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
   '';
   patches = [
     # Source release Nix patch(es) relevant for binary releases as well.
-    ./patches/1.7-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
+    # (currently we have no patches)
   ];
   postPatch = ''
     # Revert symlink hack.
@@ -48,6 +48,8 @@ stdenv.mkDerivation rec {
   preInstallCheck = ''
     # Some tests require read/write access to $HOME.
     export HOME="$TMPDIR"
+    # Run tests in parallel
+    export JULIA_TEST_USE_MULTIPLE_WORKERS=true
   '';
   installCheckPhase = ''
     runHook preInstallCheck

Closes #189444

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@wentasah wentasah mentioned this pull request Sep 3, 2022
2 tasks
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Sep 3, 2022
@ofborg ofborg bot requested review from a user and 7c6f434c September 3, 2022 22:44
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Sep 3, 2022
@ghost
Copy link

ghost commented Sep 4, 2022 via email

@rikhuijzer
Copy link
Contributor

rikhuijzer commented Sep 4, 2022

Thanks for working on this, @wentasah! Much appreciated. I'm currently running binaries from Julia by just downloading them and running those. I did it by adding a symlink for /lib64/ld-linux-x86-64.so.2 on my system, see https://discourse.nixos.org/t/making-lib64-ld-linux-x86-64-so-2-available/19679/3 for details. I say this for people who run into this issue later and want to run Julia but do not have the right binary available. It's still good to get it in nixpkgs!

I only get the following warning from time to time when using Pkg:

I'm running with that error for months already. Everything works fine. The risk is probably that sophisticated attackers could alter code sent from the package servers. We probably need to teach NetworkOptions.jl where the certificates are on NixOS or symlink the certificates to one of the paths that NetworkOptions.jl knows. I would say that this is outside the scope of this PR.

You're halfway a patch already I see. Would be nice to fix it, but I do think that it's outside the scope of this PR. I fear that it will take long to fix and thus cause Julia 1.8 to not become available as a nixpkg

@ghost
Copy link

ghost commented Sep 4, 2022 via email

@wentasah
Copy link
Contributor Author

wentasah commented Sep 4, 2022

@ninjin I addressed your three points and pushed an updated version.

I agree with your analysis of the TLS certificate warnings and therefore, I'm removing the draft flag from this PR. I dug even deeper and figured out, that NixOS-provided certificates are probably OK, the issue is in how Julia detects their incompatibility. I submitted the issue, as requested in the warning.

With respect to the dynamic linker, I'm using nix-ld. Formerly, it was necessary to use it in order to have packages like Plots.jl work. It was because their binary artifacts needed libraries like qt and freetype from the host system. Nowadays, these are no longer necessary. My wrapper currently looks this way. It only makes OpenGL libraries available for Makie.jl and similar. I was thinking about upstreaming the wrapper as a NixOS module. Do you know about some packages, which depend on host libraries (besides OpenGL/Vulkan) these days?

@wentasah wentasah marked this pull request as ready for review September 4, 2022 21:37
@ghost
Copy link

ghost commented Sep 5, 2022 via email

@wentasah
Copy link
Contributor Author

wentasah commented Sep 5, 2022 via email

@ghost
Copy link

ghost commented Sep 5, 2022 via email

@7c6f434c 7c6f434c merged commit b15ab19 into NixOS:master Sep 7, 2022
@wentasah wentasah deleted the julia-1.8.0 branch September 11, 2022 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: clean-up 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

julia-bin update available
3 participants