From 3b6dfbae8178ea66dc1ca22b8ba509007e1d3eb4 Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Wed, 23 Jun 2021 11:22:02 +0200 Subject: [PATCH 1/5] maintainer: update babariviere --- maintainers/maintainer-list.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 7c1c5aa2bd7a..8d6f065cb744 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1062,7 +1062,11 @@ email = "babathriviere@gmail.com"; github = "babariviere"; githubId = 12128029; - name = "babariviere"; + name = "Bastien Rivière"; + keys = [{ + longkeyid = "rsa4096/0xF202AD3B6EDF4BD1"; + fingerprint = "2F85 B362 B274 0012 37E2 81EE F202 AD3B 6EDF 4BD1"; + }]; }; babbaj = { name = "babbaj"; From a6bb32aeccb5cf66e657cc044baf1609ee1cd5e2 Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Wed, 23 Jun 2021 11:26:53 +0200 Subject: [PATCH 2/5] graalvm-ce: fix NativePRNG errors on darwin Fix NativePRNG errors when building softwares like `babashka`. Also temporarly disable JShell in installCheckPhase. --- .../compilers/graalvm/community-edition.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/graalvm/community-edition.nix b/pkgs/development/compilers/graalvm/community-edition.nix index 0d12d5fe2dfb..8669b57dcca2 100644 --- a/pkgs/development/compilers/graalvm/community-edition.nix +++ b/pkgs/development/compilers/graalvm/community-edition.nix @@ -180,7 +180,10 @@ let rm $out/jre/lib/jvmci/parentClassLoader.classpath ''; "11-darwin-amd64" = '' - echo "" + # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html + substituteInPlace $out/conf/security/java.security \ + --replace file:/dev/random file:/dev/./urandom \ + --replace NativePRNGBlocking SHA1PRNG ''; }.${javaVersionPlatform}; @@ -259,7 +262,8 @@ let ''} echo '1 + 1' | $out/bin/node -i - ${lib.optionalString (javaVersion == "11") '' + ${lib.optionalString (javaVersion == "11" && stdenv.isLinux) '' + # Doesn't work on MacOS, we have this error: "Launching JShell execution engine threw: Operation not permitted (Bind failed)" echo '1 + 1' | $out/bin/jshell ''}''; @@ -269,7 +273,7 @@ let homepage = "https://www.graalvm.org/"; description = "High-Performance Polyglot VM"; license = with licenses; [ upl gpl2Classpath bsd3 ]; - maintainers = with maintainers; [ bandresen volth hlolli glittershark ]; + maintainers = with maintainers; [ bandresen volth hlolli glittershark babariviere ]; platforms = [ "x86_64-linux" "x86_64-darwin" ]; }; }; From e234811bb075fd88dc7f52b7122f04f66b042398 Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Wed, 23 Jun 2021 12:24:20 +0200 Subject: [PATCH 3/5] clojure-lsp: fix compilation on darwin --- pkgs/development/tools/misc/clojure-lsp/default.nix | 5 ++++- .../misc/clojure-lsp/disable-check-toolchain.patch | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/tools/misc/clojure-lsp/disable-check-toolchain.patch diff --git a/pkgs/development/tools/misc/clojure-lsp/default.nix b/pkgs/development/tools/misc/clojure-lsp/default.nix index 3f51136c65c2..095968a2d084 100644 --- a/pkgs/development/tools/misc/clojure-lsp/default.nix +++ b/pkgs/development/tools/misc/clojure-lsp/default.nix @@ -18,6 +18,9 @@ stdenv.mkDerivation rec { GRAALVM_HOME = graalvm11-ce; CLOJURE_LSP_JAR = jar; + CLOJURE_LSP_XMX = "-J-Xmx4g"; + + patches = lib.optionals stdenv.isDarwin [ ./disable-check-toolchain.patch ]; buildInputs = [ graalvm11-ce ]; @@ -52,7 +55,7 @@ stdenv.mkDerivation rec { description = "Language Server Protocol (LSP) for Clojure"; homepage = "https://github.com/clojure-lsp/clojure-lsp"; license = licenses.mit; - maintainers = [ maintainers.ericdallo ]; + maintainers = [ maintainers.ericdallo maintainers.babariviere ]; platforms = graalvm11-ce.meta.platforms; }; } diff --git a/pkgs/development/tools/misc/clojure-lsp/disable-check-toolchain.patch b/pkgs/development/tools/misc/clojure-lsp/disable-check-toolchain.patch new file mode 100644 index 000000000000..402189627c25 --- /dev/null +++ b/pkgs/development/tools/misc/clojure-lsp/disable-check-toolchain.patch @@ -0,0 +1,12 @@ +diff --git a/graalvm/native-unix-compile.sh b/graalvm/native-unix-compile.sh +index ec0e49f..e19a120 100755 +--- a/graalvm/native-unix-compile.sh ++++ b/graalvm/native-unix-compile.sh +@@ -17,6 +17,7 @@ CLOJURE_LSP_XMX=${CLOJURE_LSP_XMX:-"-J-Xmx4g"} + + args=("-jar" "$CLOJURE_LSP_JAR" + "-H:+ReportExceptionStackTraces" ++ "-H:-CheckToolchain" + "--verbose" + "--no-fallback" + "--native-image-info" From 4400e4d06c1081fce7834b3a2b9639c3e730e885 Mon Sep 17 00:00:00 2001 From: Bastien Riviere Date: Wed, 23 Jun 2021 12:38:47 +0200 Subject: [PATCH 4/5] zprint: fix compilation on darwin --- pkgs/development/tools/zprint/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/zprint/default.nix b/pkgs/development/tools/zprint/default.nix index 702012806209..266ac83b80dd 100644 --- a/pkgs/development/tools/zprint/default.nix +++ b/pkgs/development/tools/zprint/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { -H:Name=${pname} \ -H:EnableURLProtocols=https,http \ -H:+ReportExceptionStackTraces \ + ${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \ --report-unsupported-elements-at-runtime \ --initialize-at-build-time \ --no-fallback From b19285d9f6eeef872ccb91ab5a01e9a2451367e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20Rivi=C3=A8re?= Date: Wed, 23 Jun 2021 13:47:54 +0200 Subject: [PATCH 5/5] clojure-lsp: update maintainers list Co-authored-by: Sandro --- pkgs/development/tools/misc/clojure-lsp/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/clojure-lsp/default.nix b/pkgs/development/tools/misc/clojure-lsp/default.nix index 095968a2d084..8783d217c1fa 100644 --- a/pkgs/development/tools/misc/clojure-lsp/default.nix +++ b/pkgs/development/tools/misc/clojure-lsp/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { description = "Language Server Protocol (LSP) for Clojure"; homepage = "https://github.com/clojure-lsp/clojure-lsp"; license = licenses.mit; - maintainers = [ maintainers.ericdallo maintainers.babariviere ]; + maintainers = with maintainers; [ ericdallo babariviere ]; platforms = graalvm11-ce.meta.platforms; }; }