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
jetbrains.idea-community: add darwin support #64467
Conversation
cc @Mic92 |
402380b
to
3bbaf44
Compare
ping @edwtjo |
1 similar comment
ping @edwtjo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not an idea user, but, so I did not test in depth, but the changes look good to me.
@@ -28,7 +28,7 @@ with stdenv; lib.makeOverridable mkDerivation rec { | |||
|
|||
nativeBuildInputs = [ makeWrapper patchelf p7zip unzip ]; | |||
|
|||
patchPhase = '' | |||
patchPhase = if stdenv.hostPlatform.system == "x86_64-darwin" then "" else '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patchPhase = if stdenv.hostPlatform.system == "x86_64-darwin" then "" else '' | |
patchPhase = optionalString (!stdenv.isDarwin) '' |
@@ -63,7 +63,7 @@ with stdenv; lib.makeOverridable mkDerivation rec { | |||
item=${desktopItem} | |||
|
|||
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${execName}" \ | |||
--prefix PATH : "$out/libexec/${name}:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \ | |||
--prefix PATH : "$out/libexec/${name}:${jdk}/jdk/Contents/Home/bin:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--prefix PATH : "$out/libexec/${name}:${jdk}/jdk/Contents/Home/bin:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \ | |
--prefix PATH : "$out/libexec/${name}:${optionalString (!stdenv.isDarwin) "${jdk}/jdk/Contents/Home/bin"}:${stdenv.lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \ |
@@ -29,20 +34,20 @@ let drv = stdenv.mkDerivation rec { | |||
jrePath=$out/jre | |||
''; | |||
|
|||
postFixup = '' | |||
postFixup = if stdenv.hostPlatform.system == "x86_64-darwin" then "" else '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see optionalString
find $out -type f -perm -0100 \ | ||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | ||
--set-rpath "$rpath" {} \; | ||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; | ||
''; | ||
|
||
rpath = lib.makeLibraryPath ([ | ||
rpath = if stdenv.hostPlatform.system == "x86_64-darwin" then "" else (lib.makeLibraryPath ([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see optionalString
3bbaf44
to
01f0c10
Compare
Addressed comments. |
|
I don't think rider was tested. But it might just work as it is on macOS. |
Thanks for fixing the evaluation! |
It wouldn't evaluate, so I don't think it was really tested :-) Anyway, feel free to fix and test, of course. |
No it wasn't, but I can have a quick look, if it's simple enough I'll fix that. |
Yeah looks like it's an easy fix: #69349 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-do-you-discover-the-override-attributes-for-a-derivation/5214/23 |
Motivation for this change
Add darwin support to
jetbrains.idea-community
.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)