diff --git a/pkgs/applications/editors/jetbrains/common.nix b/pkgs/applications/editors/jetbrains/common.nix index 4d8835c29c5f..b3145f342c9b 100644 --- a/pkgs/applications/editors/jetbrains/common.nix +++ b/pkgs/applications/editors/jetbrains/common.nix @@ -3,7 +3,7 @@ , vmopts ? null }: -{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [] }@args: +{ name, product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args: with lib; @@ -81,6 +81,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec { stdenv.cc.cc.lib libsecret e2fsprogs libnotify ] ++ extraLdPath)}" \ + ${lib.concatStringsSep " " extraWrapperArgs} \ --set JDK_HOME "$jdk" \ --set ${hiName}_JDK "$jdk" \ --set ANDROID_JAVA_HOME "$jdk" \ diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index fae273be6674..5fa93447cd51 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, callPackage, fetchurl , jdk, cmake, zlib, python3 , dotnet-sdk_5 +, maven , autoPatchelfHook , libdbusmenu , vmopts ? null @@ -98,6 +99,10 @@ let inherit name version src wmClass jdk; product = "IDEA"; extraLdPath = [ zlib ]; + extraWrapperArgs = [ + ''--set M2_HOME "${maven}/maven"'' + ''--set M2 "${maven}/maven/bin"'' + ]; meta = with lib; { homepage = "https://www.jetbrains.com/idea/"; inherit description license;