From df3d59ca78add2549690d942412c73f2e1b6f5e2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 4 Oct 2023 09:45:54 +0000 Subject: [PATCH 01/13] python310Packages.mpi4py: 3.1.4 -> 3.1.5 --- pkgs/development/python-modules/mpi4py/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mpi4py/default.nix b/pkgs/development/python-modules/mpi4py/default.nix index 887c5446d53c..eaf7d30efb5d 100644 --- a/pkgs/development/python-modules/mpi4py/default.nix +++ b/pkgs/development/python-modules/mpi4py/default.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { pname = "mpi4py"; - version = "3.1.4"; + version = "3.1.5"; src = fetchPypi { inherit pname version; - hash = "sha256-F4WPLrxiMiDQEg0fqNQo0DPd50nEvDWzPYGmatf5NIA="; + hash = "sha256-pwbnbbklUTXC+10e9Uy097DkrZ4zy62n3idiYgXyoVM="; }; passthru = { From f05b197c2fb4e3011d8f79124c33456a45f6540d Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Sun, 17 Sep 2023 14:48:03 -0400 Subject: [PATCH 02/13] python3Packages.huggingface-hub: 0.16.4 -> 0.17.3 --- pkgs/development/python-modules/huggingface-hub/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/huggingface-hub/default.nix b/pkgs/development/python-modules/huggingface-hub/default.nix index 9fc7e657468d..dd7c1eec6725 100644 --- a/pkgs/development/python-modules/huggingface-hub/default.nix +++ b/pkgs/development/python-modules/huggingface-hub/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "huggingface-hub"; - version = "0.16.4"; + version = "0.17.3"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "huggingface"; repo = "huggingface_hub"; rev = "refs/tags/v${version}"; - hash = "sha256-fWvEvYiaLiVGmDdfibIHJAsu7nUX+eaE0QGolS3LHO8="; + hash = "sha256-zoZIxp9+4FVPLCiikKussC34rwWBQzWMDlZx9S7NnqQ="; }; propagatedBuildInputs = [ From 8ff6850f2564d26a91b30eb8f7993a7a2c3bf4bb Mon Sep 17 00:00:00 2001 From: nixdrin <146267602+nixdrin@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:03:14 +0200 Subject: [PATCH 03/13] jetbrains: drop libstdc++.so.6 from LD_LIBRARY_PATH Most of the libraries listed in the LD_LIBRARY_PATH for the Jetbrains IDEs are loaded indirectly using JNA in Java code, e.g. myLibNotify = Native.load("libnotify.so.4", LibNotify.class); [1] private val library = Native.load("secret-1", SecretLibrary::class.java) [2] In this case the typical patching mechanism with Nix does not work because JNA does the library lookup at runtime with its own mechanism. However, there is one outlier: stdenv.cc.cc.lib is also added to the LD_LIBRARY_PATH for libstdc++.so.6 because it is reportedly needed for some "internals". It does not make sense to access libstdc++ from Java code so it feels like this one was added to work around some native library or executable that should be patched instead of using LD_LIBRARY_PATH. Unfortunately, having libstdc++ in LD_LIBRARY_PATH can also easily cause ABI conflicts. This is because this variable is inherited into terminals opened within the IDE. Using a Nix environment there with different versions of libstdc++ easily causes errors such as libstdc++.so.6: version `GLIBCXX_3.4.29' not found Most of the IDEs work just fine without having libstdc++ in LD_LIBRARY_PATH. Since it's not really clear why it has to be in there let's just drop it to avoid the ABI conflicts. [1]: https://github.com/JetBrains/intellij-community/blob/c0a703267a671bbbac2384fc226c82b2203db72b/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java#L40 [2]: https://github.com/JetBrains/intellij-community/blob/c0a703267a671bbbac2384fc226c82b2203db72b/platform/credential-store/src/linuxSecretLibrary.kt#L38 --- pkgs/applications/editors/jetbrains/linux.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/applications/editors/jetbrains/linux.nix b/pkgs/applications/editors/jetbrains/linux.nix index 2d6cbf5b8720..cbbde3590c16 100644 --- a/pkgs/applications/editors/jetbrains/linux.nix +++ b/pkgs/applications/editors/jetbrains/linux.nix @@ -107,9 +107,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec { wrapProgram "$out/$pname/bin/${loName}.sh" \ --prefix PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git python3 ]}" \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([ - # Some internals want libstdc++.so.6 - stdenv.cc.cc.lib libsecret e2fsprogs - libnotify + libsecret e2fsprogs libnotify # Required for Help -> Collect Logs # in at least rider and goland udev From 7a8b142607999eb082a5fb9be5ec75d2cdedc50e Mon Sep 17 00:00:00 2001 From: nixdrin <146267602+nixdrin@users.noreply.github.com> Date: Thu, 28 Sep 2023 20:04:03 +0200 Subject: [PATCH 04/13] jetbrains: use -Djna.libary.path instead of LD_LIBRARY_PATH Most of the libraries listed in the LD_LIBRARY_PATH for the Jetbrains IDEs are loaded indirectly using JNA in Java code, e.g. myLibNotify = Native.load("libnotify.so.4", LibNotify.class); [1] private val library = Native.load("secret-1", SecretLibrary::class.java) [2] In this case the typical patching mechanism with Nix does not work because JNA does the library lookup at runtime with its own mechanism. However, to avoid causing ABI conflicts when using Nix in the terminal of the IDE it's better to avoid using LD_LIBRARY_PATH. JNA also looks for a "jna.library.path" Java system property when looking for libraries. Generate that property with the needed paths instead and append it to the vmopts file so that the property is applied when starting the IDE. With this the libraries only become available for the IDE and do not leak into terminals opened within the IDE context. [1]: https://github.com/JetBrains/intellij-community/blob/c0a703267a671bbbac2384fc226c82b2203db72b/platform/platform-impl/src/com/intellij/ui/LibNotifyWrapper.java#L40 [2]: https://github.com/JetBrains/intellij-community/blob/c0a703267a671bbbac2384fc226c82b2203db72b/platform/credential-store/src/linuxSecretLibrary.kt#L38 --- pkgs/applications/editors/jetbrains/linux.nix | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/jetbrains/linux.nix b/pkgs/applications/editors/jetbrains/linux.nix index cbbde3590c16..c5490e01b51e 100644 --- a/pkgs/applications/editors/jetbrains/linux.nix +++ b/pkgs/applications/editors/jetbrains/linux.nix @@ -89,6 +89,21 @@ with stdenv; lib.makeOverridable mkDerivation (rec { if [ -d "plugins/remote-dev-server" ]; then patch -p1 < ${./JetbrainsRemoteDev.patch} fi + + vmopts_file=bin/linux/${vmoptsName} + if [[ ! -f $vmopts_file ]]; then + vmopts_file=bin/${vmoptsName} + if [[ ! -f $vmopts_file ]]; then + echo "ERROR: $vmopts_file not found" + exit 1 + fi + fi + echo -Djna.library.path=${lib.makeLibraryPath ([ + libsecret e2fsprogs libnotify + # Required for Help -> Collect Logs + # in at least rider and goland + udev + ])} >> $vmopts_file ''; installPhase = '' @@ -106,12 +121,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec { wrapProgram "$out/$pname/bin/${loName}.sh" \ --prefix PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git python3 ]}" \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath ([ - libsecret e2fsprogs libnotify - # Required for Help -> Collect Logs - # in at least rider and goland - udev - ] ++ extraLdPath)}" \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath extraLdPath}" \ ${lib.concatStringsSep " " extraWrapperArgs} \ --set-default JDK_HOME "$jdk" \ --set-default ANDROID_JAVA_HOME "$jdk" \ From bcdfa1884623c42ed83fe541e5a60b8ee652692c Mon Sep 17 00:00:00 2001 From: nixdrin <146267602+nixdrin@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:29:43 +0200 Subject: [PATCH 05/13] jetbrains.rider: use autoPatchelf Turns out Rider was previously relying on having libstdc++ in LD_LIBRARY_PATH, because the binaries were not patched properly. Rewrite the patching to use autoPatchelf similar to CLion so that the RPATH of the binaries are adjusted. While at it also patch all the binaries in the dotCommon and dotTrace plugins. Those seem to need zlib and fontconfig which were completely missing before (they are probably only called when using certain functionality of the IDE). icu doesn't actually seem to be needed (autoPatchelf does not complain that it's missing) and the IDE starts fine without it, so drop it for now. --- .../editors/jetbrains/default.nix | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index a278a05fe33b..d2a83f07ed56 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -7,7 +7,6 @@ , gdb , zlib , python3 -, icu , lldb , dotnet-sdk_7 , maven @@ -17,6 +16,7 @@ , openssl , expat , libxcrypt-legacy +, fontconfig , vmopts ? null }: @@ -252,8 +252,6 @@ let (mkJetBrainsProduct { inherit pname version src wmClass jdk buildNumber; product = "Rider"; - # icu is required by Rider.Backend - extraLdPath = [ icu ]; meta = with lib; { homepage = "https://www.jetbrains.com/rider/"; inherit description license platforms; @@ -268,15 +266,28 @@ let maintainers = with maintainers; [ raphaelr ]; }; }).overrideAttrs (attrs: { - postPatch = lib.optionalString (!stdenv.isDarwin) (attrs.postPatch + '' - interp="$(cat $NIX_CC/nix-support/dynamic-linker)" - patchelf --set-interpreter $interp \ - lib/ReSharperHost/linux-x64/Rider.Backend \ - plugins/dotCommon/DotFiles/linux-x64/JetBrains.Profiler.PdbServer + nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [ + autoPatchelfHook + ]; + buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [ + stdenv.cc.cc + zlib + fontconfig # plugins/dotTrace/DotFiles/linux-x64/libSkiaSharp.so + ]; + dontAutoPatchelf = true; + postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) '' + ( + cd $out/rider - rm -rf lib/ReSharperHost/linux-x64/dotnet - ln -s ${dotnet-sdk_7} lib/ReSharperHost/linux-x64/dotnet - ''); + # Remove dotnet copy first so it's not considered by autoPatchElf + rm -rf lib/ReSharperHost/linux-x64/dotnet + autoPatchelf \ + lib/ReSharperHost/linux-x64/ \ + plugins/dotCommon/DotFiles/linux-x64/ \ + plugins/dotTrace/DotFiles/linux-x64/ + ln -s ${dotnet-sdk_7} lib/ReSharperHost/linux-x64/dotnet + ) + ''; }); buildRubyMine = { pname, version, src, license, description, wmClass, buildNumber, ... }: From cf8aa48605d68997be93f69ce853d76449ff68cc Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 8 Oct 2023 18:56:05 +0200 Subject: [PATCH 06/13] nixos/tests/kubo: various improvements Add new test to check if kubo.passthru.repoVersion is set correctly. Also split the existing NixOS VM test into two independent parts. The test already used two independent VMs but just one testScript. This made experimenting with just one of the two VMs slower than it needed to be. It should also increase parallelism slightly since both test scripts can now run at the same time. --- nixos/tests/all-tests.nix | 2 +- nixos/tests/kubo/default.nix | 5 +++ nixos/tests/kubo/kubo-fuse.nix | 42 +++++++++++++++++++ nixos/tests/{ => kubo}/kubo.nix | 32 -------------- pkgs/applications/networking/kubo/default.nix | 6 ++- .../networking/kubo/test-repoVersion.nix | 13 ++++++ 6 files changed, 66 insertions(+), 34 deletions(-) create mode 100644 nixos/tests/kubo/default.nix create mode 100644 nixos/tests/kubo/kubo-fuse.nix rename nixos/tests/{ => kubo}/kubo.nix (60%) create mode 100644 pkgs/applications/networking/kubo/test-repoVersion.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 3f19ed548121..443364f06e85 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -424,7 +424,7 @@ in { ksm = handleTest ./ksm.nix {}; kthxbye = handleTest ./kthxbye.nix {}; kubernetes = handleTestOn ["x86_64-linux"] ./kubernetes {}; - kubo = runTest ./kubo.nix; + kubo = import ./kubo { inherit recurseIntoAttrs runTest; }; ladybird = handleTest ./ladybird.nix {}; languagetool = handleTest ./languagetool.nix {}; latestKernel.login = handleTest ./login.nix { latestKernel = true; }; diff --git a/nixos/tests/kubo/default.nix b/nixos/tests/kubo/default.nix new file mode 100644 index 000000000000..629922fc366d --- /dev/null +++ b/nixos/tests/kubo/default.nix @@ -0,0 +1,5 @@ +{ recurseIntoAttrs, runTest }: +recurseIntoAttrs { + kubo = runTest ./kubo.nix; + kubo-fuse = runTest ./kubo-fuse.nix; +} diff --git a/nixos/tests/kubo/kubo-fuse.nix b/nixos/tests/kubo/kubo-fuse.nix new file mode 100644 index 000000000000..71a5bf61649f --- /dev/null +++ b/nixos/tests/kubo/kubo-fuse.nix @@ -0,0 +1,42 @@ +{ lib, ...} : { + name = "kubo-fuse"; + meta = with lib.maintainers; { + maintainers = [ mguentner Luflosi ]; + }; + + nodes.machine = { config, ... }: { + services.kubo = { + enable = true; + autoMount = true; + }; + users.users.alice = { + isNormalUser = true; + extraGroups = [ config.services.kubo.group ]; + }; + users.users.bob = { + isNormalUser = true; + }; + }; + + testScript = '' + start_all() + + with subtest("FUSE mountpoint"): + machine.fail("echo a | su bob -l -c 'ipfs add --quieter'") + # The FUSE mount functionality is broken as of v0.13.0 and v0.17.0. + # See https://github.com/ipfs/kubo/issues/9044. + # Workaround: using CID Version 1 avoids that. + ipfs_hash = machine.succeed( + "echo fnord3 | su alice -l -c 'ipfs add --quieter --cid-version=1'" + ).strip() + + machine.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3") + + with subtest("Unmounting of /ipns and /ipfs"): + # Force Kubo to crash and wait for it to restart + machine.systemctl("kill --signal=SIGKILL ipfs.service") + machine.wait_for_unit("ipfs.service", timeout = 30) + + machine.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3") + ''; +} diff --git a/nixos/tests/kubo.nix b/nixos/tests/kubo/kubo.nix similarity index 60% rename from nixos/tests/kubo.nix rename to nixos/tests/kubo/kubo.nix index 496f409a40a9..7965ad277385 100644 --- a/nixos/tests/kubo.nix +++ b/nixos/tests/kubo/kubo.nix @@ -18,20 +18,6 @@ }; }; - nodes.fuse = { config, ... }: { - services.kubo = { - enable = true; - autoMount = true; - }; - users.users.alice = { - isNormalUser = true; - extraGroups = [ config.services.kubo.group ]; - }; - users.users.bob = { - isNormalUser = true; - }; - }; - testScript = '' start_all() @@ -63,23 +49,5 @@ with subtest("Setting dataDir works properly with the hardened systemd unit"): machine.succeed("test -e /mnt/ipfs/config") machine.succeed("test ! -e /var/lib/ipfs/") - - with subtest("FUSE mountpoint"): - fuse.fail("echo a | su bob -l -c 'ipfs add --quieter'") - # The FUSE mount functionality is broken as of v0.13.0 and v0.17.0. - # See https://github.com/ipfs/kubo/issues/9044. - # Workaround: using CID Version 1 avoids that. - ipfs_hash = fuse.succeed( - "echo fnord3 | su alice -l -c 'ipfs add --quieter --cid-version=1'" - ).strip() - - fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3") - - with subtest("Unmounting of /ipns and /ipfs"): - # Force Kubo to crash and wait for it to restart - fuse.systemctl("kill --signal=SIGKILL ipfs.service") - fuse.wait_for_unit("ipfs.service", timeout = 30) - - fuse.succeed(f"cat /ipfs/{ipfs_hash} | grep fnord3") ''; } diff --git a/pkgs/applications/networking/kubo/default.nix b/pkgs/applications/networking/kubo/default.nix index defb898b4472..8ffeb2e9fcc1 100644 --- a/pkgs/applications/networking/kubo/default.nix +++ b/pkgs/applications/networking/kubo/default.nix @@ -2,6 +2,7 @@ , buildGoModule , fetchurl , nixosTests +, callPackage }: buildGoModule rec { @@ -29,7 +30,10 @@ buildGoModule rec { subPackages = [ "cmd/ipfs" ]; - passthru.tests.kubo = nixosTests.kubo; + passthru.tests = { + inherit (nixosTests) kubo; + repoVersion = callPackage ./test-repoVersion.nix {}; + }; vendorHash = null; diff --git a/pkgs/applications/networking/kubo/test-repoVersion.nix b/pkgs/applications/networking/kubo/test-repoVersion.nix new file mode 100644 index 000000000000..25fd8fcfbf43 --- /dev/null +++ b/pkgs/applications/networking/kubo/test-repoVersion.nix @@ -0,0 +1,13 @@ +{ runCommand, kubo }: + +runCommand "kubo-test-repoVersion" { } '' + export IPFS_PATH="$TMPDIR" + "${kubo}/bin/ipfs" init --empty-repo + declared_repo_version='${kubo.repoVersion}' + actual_repo_version="$(cat "$IPFS_PATH/version")" + if [ "$declared_repo_version" != "$actual_repo_version" ]; then + echo "kubo.repoVersion is not set correctly. It should be $actual_repo_version but is $declared_repo_version." + exit 1 + fi + touch "$out" +'' From 9ebc64b7ee6bc0dd6f06d46bb186d5045af511ed Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 12 Oct 2023 21:58:21 +0000 Subject: [PATCH 07/13] orbiton: 2.65.1 -> 2.65.2 --- pkgs/applications/editors/orbiton/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/orbiton/default.nix b/pkgs/applications/editors/orbiton/default.nix index b541f7a9049d..a4822d431543 100644 --- a/pkgs/applications/editors/orbiton/default.nix +++ b/pkgs/applications/editors/orbiton/default.nix @@ -4,13 +4,13 @@ buildGoModule rec { pname = "orbiton"; - version = "2.65.1"; + version = "2.65.2"; src = fetchFromGitHub { owner = "xyproto"; repo = "orbiton"; rev = "v${version}"; - hash = "sha256-ebtzhir6nBnIawkJJq+BgXv/5CbXtbhujXkMBzQEsNY="; + hash = "sha256-wuRbn3zQlyqba21tKLVCRfs8QgreWQ+FBFDw6myoYbk="; }; vendorHash = null; From a695f327a7e16374ecaf3faa4691e4ecf774c2d6 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Thu, 12 Oct 2023 20:37:58 -0400 Subject: [PATCH 08/13] althttpd: unstable-2022-08-12 -> unstable-2023-08-12 --- pkgs/servers/althttpd/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/althttpd/default.nix b/pkgs/servers/althttpd/default.nix index 1f3271be6ab1..49d552f48dcf 100644 --- a/pkgs/servers/althttpd/default.nix +++ b/pkgs/servers/althttpd/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { pname = "althttpd"; - version = "unstable-2022-08-12"; + version = "unstable-2023-08-12"; src = fetchfossil { url = "https://sqlite.org/althttpd/"; - rev = "823a1d985d4bacaa"; - sha256 = "sha256-yfVsOfqtHw9ftnK5B4RWeRR/ygfsTEDm7fFSaVxsCas="; + rev = "c0bdc68e6c56ef25"; + sha256 = "sha256-VoDR5MlVlvar9wYA0kUhvDQVjxDwsZlqrNR3u4Tqw5c="; }; buildInputs = [ openssl ]; From 172170ed98ad4ef92a34ea4af836e16feacb6e55 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 13 Oct 2023 10:53:46 +0100 Subject: [PATCH 09/13] wlr-randr: 0.3.0 -> 0.3.1 Changes: https://git.sr.ht/~emersion/wlr-randr/refs/v0.3.1 --- pkgs/tools/wayland/wlr-randr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/wayland/wlr-randr/default.nix b/pkgs/tools/wayland/wlr-randr/default.nix index b6f69992fec0..d9f7bc246cd0 100644 --- a/pkgs/tools/wayland/wlr-randr/default.nix +++ b/pkgs/tools/wayland/wlr-randr/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "wlr-randr"; - version = "0.3.0"; + version = "0.3.1"; src = fetchFromSourcehut { owner = "~emersion"; repo = pname; rev = "v${version}"; - sha256 = "sha256-iJSHCQbom+V0TrtEYrjMrMkdc6PoZrjhtcgebZYjQjI="; + hash = "sha256-u5fsM+DCefPTXEg+ByTs0wyOlEfCj5OUeJydX6RRvo4="; }; strictDeps = true; From c3844cc520ecbd05243bf6d0e42afbcece36ac22 Mon Sep 17 00:00:00 2001 From: Joe DeVivo Date: Fri, 13 Oct 2023 06:21:54 -0700 Subject: [PATCH 10/13] jetbrains.rust-rover: 2023.2 EAP -> 2023.3 EAP --- .../editors/jetbrains/versions.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/editors/jetbrains/versions.json b/pkgs/applications/editors/jetbrains/versions.json index 1a1f17c54e97..aee7d8105793 100644 --- a/pkgs/applications/editors/jetbrains/versions.json +++ b/pkgs/applications/editors/jetbrains/versions.json @@ -108,10 +108,10 @@ "rust-rover": { "update-channel": "RustRover EAP", "url-template": "https://download.jetbrains.com/rustrover/RustRover-{version}.tar.gz", - "version": "2023.2 EAP", - "sha256": "1f67e1a82f5cbb7c84382c7f251ae06b1e2699fa7d2fa4129e23ec2e43251687", - "url": "https://download.jetbrains.com/rustrover/RustRover-232.9921.62.tar.gz", - "build_number": "232.9921.62" + "version": "2023.3 EAP", + "sha256": "3dd8e99b066164efc11e86e3289e444c5238dfce8e9142fe2d3a8c340eeeb175", + "url": "https://download.jetbrains.com/rustrover/RustRover-233.8264.22.tar.gz", + "build_number": "233.8264.22" }, "webstorm": { "update-channel": "WebStorm RELEASE", @@ -231,10 +231,10 @@ "rust-rover": { "update-channel": "RustRover EAP", "url-template": "https://download.jetbrains.com/rustrover/RustRover-{version}.dmg", - "version": "2023.2 EAP", - "sha256": "dfde444bff011783cb4a5aa2aafae8ea989874c19535b01da8214df5eb3174fb", - "url": "https://download.jetbrains.com/rustrover/RustRover-232.9921.62.dmg", - "build_number": "232.9921.62" + "version": "2023.3 EAP", + "sha256": "889ed748efbd44b76da03186efac063baf36c2208d919550dd97cf2dae8f40e3", + "url": "https://download.jetbrains.com/rustrover/RustRover-233.8264.22.dmg", + "build_number": "233.8264.22" }, "webstorm": { "update-channel": "WebStorm RELEASE", @@ -355,9 +355,9 @@ "update-channel": "RustRover EAP", "url-template": "https://download.jetbrains.com/rustrover/RustRover-{version}-aarch64.dmg", "version": "2023.2 EAP", - "sha256": "35d44a4f72c027283843aaa6409de701d14274cdc5a614c3fdc53121383f9389", - "url": "https://download.jetbrains.com/rustrover/RustRover-232.9921.62-aarch64.dmg", - "build_number": "232.9921.62" + "sha256": "9c4f26089697f6cb394e971dac8ef4fe974b5ecffd63311fcf0be66d4b4aec59", + "url": "https://download.jetbrains.com/rustrover/RustRover-233.8264.22-aarch64.dmg", + "build_number": "233.8264.22-aarch64" }, "webstorm": { "update-channel": "WebStorm RELEASE", From 7010c825fb09e754242ee5ac33fca4db0f7e8eab Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Fri, 13 Oct 2023 11:19:26 -0700 Subject: [PATCH 11/13] probe-rs: 0.21.0 -> 0.21.1 --- pkgs/development/tools/rust/probe-rs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/probe-rs/default.nix b/pkgs/development/tools/rust/probe-rs/default.nix index ae30c18bd83d..4bb0a4de6a18 100644 --- a/pkgs/development/tools/rust/probe-rs/default.nix +++ b/pkgs/development/tools/rust/probe-rs/default.nix @@ -11,14 +11,14 @@ rustPlatform.buildRustPackage rec { pname = "probe-rs"; - version = "0.21.0"; + version = "0.21.1"; src = fetchCrate { inherit pname version; - hash = "sha256-3L4dvEIPxbNYh+Z5G1iccqLLYi13RTRaFnOD4U/zNtE="; + hash = "sha256-UmQwz9Ejb5+epwGKsglV3QdWGqOEH/3DRqvKtfm14kg="; }; - cargoHash = "sha256-peCXG9TrsnBqQOy+pgRNGstn0bwKNCdWQ3Jn5r0fcOI="; + cargoHash = "sha256-awa84xvIRrEhuPm4N2xt5bsYy2wbLjJokrKoAxCYvR4="; cargoBuildFlags = [ "--features=cli" ]; From 59cf1417db58c44e3fb93626b0fffc886b9e08cc Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Fri, 13 Oct 2023 15:05:01 -0500 Subject: [PATCH 12/13] twitch-tui: fix darwin build --- .../networking/instant-messengers/twitch-tui/default.nix | 2 ++ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix b/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix index d4877da69420..6ca9bdc0e764 100644 --- a/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix +++ b/pkgs/applications/networking/instant-messengers/twitch-tui/default.nix @@ -4,6 +4,7 @@ , rustPlatform , pkg-config , openssl +, CoreServices , Security }: @@ -27,6 +28,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ + CoreServices Security ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 56cdbd926052..ea8ae63b8e12 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6977,7 +6977,7 @@ with pkgs; keymapper = callPackage ../tools/inputmethods/keymapper { }; twitch-tui = callPackage ../applications/networking/instant-messengers/twitch-tui { - inherit (darwin.apple_sdk.frameworks) Security; + inherit (darwin.apple_sdk_11_0.frameworks) Security CoreServices; }; gebaar-libinput = callPackage ../tools/inputmethods/gebaar-libinput { stdenv = gcc10StdenvCompat; }; From 6def0080d7655b2e4b2ffd59fba7a67cf304a6ae Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 13 Oct 2023 22:52:11 +0200 Subject: [PATCH 13/13] jetbrains.jdk: fix build on aarch64-linux --- .../compilers/jetbrains-jdk/default.nix | 23 ++++++---- .../compilers/jetbrains-jdk/jcef.nix | 46 +++++++++++++++---- 2 files changed, 52 insertions(+), 17 deletions(-) diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix index 377f66ca97bc..9d5e53700c17 100644 --- a/pkgs/development/compilers/jetbrains-jdk/default.nix +++ b/pkgs/development/compilers/jetbrains-jdk/default.nix @@ -27,6 +27,13 @@ , udev }: +let + arch = { + "aarch64-linux" = "aarch64"; + "x86_64-linux" = "x64"; + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); + cpu = stdenv.hostPlatform.parsed.cpu.name; +in openjdk17.overrideAttrs (oldAttrs: rec { pname = "jetbrains-jdk-jcef"; javaVersion = "17.0.7"; @@ -57,22 +64,22 @@ openjdk17.overrideAttrs (oldAttrs: rec { buildPhase = '' runHook preBuild - mkdir -p jcef_linux_x64/jmods - cp ${jetbrains.jcef}/* jcef_linux_x64/jmods + mkdir -p jcef_linux_${arch}/jmods + cp ${jetbrains.jcef}/* jcef_linux_${arch}/jmods sed \ -e "s/OPENJDK_TAG=.*/OPENJDK_TAG=${openjdkTag}/" \ -e "s/SOURCE_DATE_EPOCH=.*//" \ -e "s/export SOURCE_DATE_EPOCH//" \ -i jb/project/tools/common/scripts/common.sh - sed -i "s/STATIC_CONF_ARGS/STATIC_CONF_ARGS \$configureFlags/" jb/project/tools/linux/scripts/mkimages_x64.sh + sed -i "s/STATIC_CONF_ARGS/STATIC_CONF_ARGS \$configureFlags/" jb/project/tools/linux/scripts/mkimages_${arch}.sh sed \ -e "s/create_image_bundle \"jb/#/" \ -e "s/echo Creating /exit 0 #/" \ - -i jb/project/tools/linux/scripts/mkimages_x64.sh + -i jb/project/tools/linux/scripts/mkimages_${arch}.sh patchShebangs . - ./jb/project/tools/linux/scripts/mkimages_x64.sh ${build} ${if debugBuild then "fd" else "jcef"} + ./jb/project/tools/linux/scripts/mkimages_${arch}.sh ${build} ${if debugBuild then "fd" else "jcef"} runHook postBuild ''; @@ -84,9 +91,9 @@ openjdk17.overrideAttrs (oldAttrs: rec { in '' runHook preInstall - mv build/linux-x86_64-server-${buildType}/images/jdk/man build/linux-x86_64-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-x64${debugSuffix}-b${build} - rm -rf build/linux-x86_64-server-${buildType}/images/jdk - mv build/linux-x86_64-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-x64${debugSuffix}-b${build} build/linux-x86_64-server-${buildType}/images/jdk + mv build/linux-${cpu}-server-${buildType}/images/jdk/man build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build} + rm -rf build/linux-${cpu}-server-${buildType}/images/jdk + mv build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build} build/linux-${cpu}-server-${buildType}/images/jdk '' + oldAttrs.installPhase + "runHook postInstall"; postInstall = '' diff --git a/pkgs/development/compilers/jetbrains-jdk/jcef.nix b/pkgs/development/compilers/jetbrains-jdk/jcef.nix index 165c9bea58ee..a36eae8be52d 100644 --- a/pkgs/development/compilers/jetbrains-jdk/jcef.nix +++ b/pkgs/development/compilers/jetbrains-jdk/jcef.nix @@ -73,6 +73,23 @@ let rpath = lib.makeLibraryPath [ ]; buildType = if debugBuild then "Debug" else "Release"; +platform = { + "aarch64-linux" = "linuxarm64"; + "x86_64-linux" = "linux64"; +}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); +arches = { + "linuxarm64" = { + depsArch = "arm64"; + projectArch = "arm64"; + targetArch = "arm64"; + }; + "linux64" = { + depsArch = "amd64"; + projectArch = "x86_64"; + targetArch = "x86_64"; + }; +}.${platform}; +inherit (arches) depsArch projectArch targetArch; in stdenv.mkDerivation rec { pname = "jcef-jetbrains"; @@ -92,12 +109,15 @@ in stdenv.mkDerivation rec { hash = "sha256-3HuW8upR/bZoK8euVti2KpCZh9xxfqgyHmgoG1NjxOI="; }; cef-bin = let - fileName = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_linux64_minimal"; - urlName = builtins.replaceStrings ["+"] ["%2B"] fileName; - in fetchzip rec { - name = fileName; + name = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_${platform}_minimal"; + hash = { + "linuxarm64" = "sha256-gCDIfWsysXE8lHn7H+YM3Jag+mdbWwTQpJf0GKdXEVs="; + "linux64" = "sha256-r+zXTmDN5s/bYLvbCnHufYdXIqQmCDlbWgs5pdOpLTw="; + }.${platform}; + urlName = builtins.replaceStrings ["+"] ["%2B"] name; + in fetchzip { url = "https://cef-builds.spotifycdn.com/${urlName}.tar.bz2"; - hash = "sha256-r+zXTmDN5s/bYLvbCnHufYdXIqQmCDlbWgs5pdOpLTw="; + inherit name hash; }; clang-fmt = fetchurl { url = "https://storage.googleapis.com/chromium-clang-format/dd736afb28430c9782750fc0fd5f0ed497399263"; @@ -128,7 +148,7 @@ in stdenv.mkDerivation rec { mkdir jcef_build cd jcef_build - cmake -G "Ninja" -DPROJECT_ARCH="x86_64" -DCMAKE_BUILD_TYPE=${buildType} .. + cmake -G "Ninja" -DPROJECT_ARCH="${projectArch}" -DCMAKE_BUILD_TYPE=${buildType} .. runHook postConfigure ''; @@ -137,7 +157,7 @@ in stdenv.mkDerivation rec { postBuild = '' export JCEF_ROOT_DIR=$(realpath ..) - ../tools/compile.sh linux64 Release + ../tools/compile.sh ${platform} Release ''; # Mostly taken from jb/tools/common/create_modules.sh @@ -148,8 +168,8 @@ in stdenv.mkDerivation rec { export OUT_NATIVE_DIR=$JCEF_ROOT_DIR/jcef_build/native/${buildType} export JB_TOOLS_DIR=$(realpath ../jb/tools) export JB_TOOLS_OS_DIR=$JB_TOOLS_DIR/linux - export OUT_CLS_DIR=$(realpath ../out/linux64) - export TARGET_ARCH=x86_64 DEPS_ARCH=amd64 + export OUT_CLS_DIR=$(realpath ../out/${platform}) + export TARGET_ARCH=${targetArch} DEPS_ARCH=${depsArch} export OS=linux export JOGAMP_DIR="$JCEF_ROOT_DIR"/third_party/jogamp/jar @@ -183,7 +203,11 @@ in stdenv.mkDerivation rec { jar uf gluegen-rt.jar module-info.class rm module-info.class module-info.java mkdir lib + '' + # see https://github.com/JetBrains/jcef/commit/f3b787e3326c1915d663abded7f055c0866f32ec + + lib.optionalString (platform != "linuxarm64") '' extract_jar "$JOGAMP_DIR"/gluegen-rt-natives-"$OS"-"$DEPS_ARCH".jar lib natives/"$OS"-"$DEPS_ARCH" + '' + '' cd ../jogl cp "$JOGAMP_DIR"/gluegen-rt.jar . @@ -193,7 +217,11 @@ in stdenv.mkDerivation rec { jar uf jogl-all.jar module-info.class rm module-info.class module-info.java mkdir lib + '' + # see https://github.com/JetBrains/jcef/commit/f3b787e3326c1915d663abded7f055c0866f32ec + + lib.optionalString (platform != "linuxarm64") '' extract_jar "$JOGAMP_DIR"/jogl-all-natives-"$OS"-"$DEPS_ARCH".jar lib natives/"$OS"-"$DEPS_ARCH" + '' + '' cd ../jcef cp "$OUT_CLS_DIR"/jcef.jar .