Merge pull request #261007 from wegank/jetbrains-aarch64-1
jetbrains: do not hardcode x64 paths
This commit is contained in:
commit
d9584005c9
1 changed files with 22 additions and 13 deletions
|
@ -17,12 +17,14 @@
|
||||||
, expat
|
, expat
|
||||||
, libxcrypt-legacy
|
, libxcrypt-legacy
|
||||||
, fontconfig
|
, fontconfig
|
||||||
|
, libxml2
|
||||||
|
, xz
|
||||||
, vmopts ? null
|
, vmopts ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ];
|
platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ];
|
||||||
ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" ];
|
ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" "aarch64-linux" ];
|
||||||
|
|
||||||
inherit (stdenv.hostPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
|
|
||||||
|
@ -58,6 +60,9 @@ let
|
||||||
openssl.out
|
openssl.out
|
||||||
expat
|
expat
|
||||||
libxcrypt-legacy
|
libxcrypt-legacy
|
||||||
|
] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||||
|
libxml2
|
||||||
|
xz
|
||||||
];
|
];
|
||||||
dontAutoPatchelf = true;
|
dontAutoPatchelf = true;
|
||||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||||
|
@ -65,12 +70,12 @@ let
|
||||||
cd $out/clion
|
cd $out/clion
|
||||||
|
|
||||||
# I think the included gdb has a couple of patches, so we patch it instead of replacing
|
# I think the included gdb has a couple of patches, so we patch it instead of replacing
|
||||||
ls -d $PWD/bin/gdb/linux/x64/lib/python3.8/lib-dynload/* |
|
ls -d $PWD/bin/gdb/linux/*/lib/python3.8/lib-dynload/* |
|
||||||
xargs patchelf \
|
xargs patchelf \
|
||||||
--replace-needed libssl.so.10 libssl.so \
|
--replace-needed libssl.so.10 libssl.so \
|
||||||
--replace-needed libcrypto.so.10 libcrypto.so
|
--replace-needed libcrypto.so.10 libcrypto.so
|
||||||
|
|
||||||
ls -d $PWD/bin/lldb/linux/x64/lib/python3.8/lib-dynload/* |
|
ls -d $PWD/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
|
||||||
xargs patchelf \
|
xargs patchelf \
|
||||||
--replace-needed libssl.so.10 libssl.so \
|
--replace-needed libssl.so.10 libssl.so \
|
||||||
--replace-needed libcrypto.so.10 libcrypto.so
|
--replace-needed libcrypto.so.10 libcrypto.so
|
||||||
|
@ -271,7 +276,7 @@ let
|
||||||
buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
||||||
stdenv.cc.cc
|
stdenv.cc.cc
|
||||||
zlib
|
zlib
|
||||||
fontconfig # plugins/dotTrace/DotFiles/linux-x64/libSkiaSharp.so
|
fontconfig # plugins/dotTrace/DotFiles/linux-*/libSkiaSharp.so
|
||||||
];
|
];
|
||||||
dontAutoPatchelf = true;
|
dontAutoPatchelf = true;
|
||||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||||
|
@ -279,12 +284,12 @@ let
|
||||||
cd $out/rider
|
cd $out/rider
|
||||||
|
|
||||||
# Remove dotnet copy first so it's not considered by autoPatchElf
|
# Remove dotnet copy first so it's not considered by autoPatchElf
|
||||||
rm -rf lib/ReSharperHost/linux-x64/dotnet
|
rm -rf lib/ReSharperHost/linux-*/dotnet
|
||||||
autoPatchelf \
|
autoPatchelf \
|
||||||
lib/ReSharperHost/linux-x64/ \
|
lib/ReSharperHost/linux-*/ \
|
||||||
plugins/dotCommon/DotFiles/linux-x64/ \
|
plugins/dotCommon/DotFiles/linux-*/ \
|
||||||
plugins/dotTrace/DotFiles/linux-x64/
|
plugins/dotTrace/DotFiles/linux-*/
|
||||||
ln -s ${dotnet-sdk_7} lib/ReSharperHost/linux-x64/dotnet
|
ln -s ${dotnet-sdk_7} lib/ReSharperHost/linux-*/dotnet
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
@ -320,6 +325,10 @@ let
|
||||||
libdbusmenu
|
libdbusmenu
|
||||||
openssl.out
|
openssl.out
|
||||||
libxcrypt-legacy
|
libxcrypt-legacy
|
||||||
|
] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||||
|
expat
|
||||||
|
libxml2
|
||||||
|
xz
|
||||||
];
|
];
|
||||||
dontAutoPatchelf = true;
|
dontAutoPatchelf = true;
|
||||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||||
|
@ -327,12 +336,12 @@ let
|
||||||
cd $out/rust-rover
|
cd $out/rust-rover
|
||||||
|
|
||||||
# Copied over from clion (gdb seems to have a couple of patches)
|
# Copied over from clion (gdb seems to have a couple of patches)
|
||||||
ls -d $PWD/bin/gdb/linux/x64/lib/python3.8/lib-dynload/* |
|
ls -d $PWD/bin/gdb/linux/*/lib/python3.8/lib-dynload/* |
|
||||||
xargs patchelf \
|
xargs patchelf \
|
||||||
--replace-needed libssl.so.10 libssl.so \
|
--replace-needed libssl.so.10 libssl.so \
|
||||||
--replace-needed libcrypto.so.10 libcrypto.so
|
--replace-needed libcrypto.so.10 libcrypto.so
|
||||||
|
|
||||||
ls -d $PWD/bin/lldb/linux/x64/lib/python3.8/lib-dynload/* |
|
ls -d $PWD/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
|
||||||
xargs patchelf \
|
xargs patchelf \
|
||||||
--replace-needed libssl.so.10 libssl.so \
|
--replace-needed libssl.so.10 libssl.so \
|
||||||
--replace-needed libcrypto.so.10 libcrypto.so
|
--replace-needed libcrypto.so.10 libcrypto.so
|
||||||
|
@ -340,8 +349,8 @@ let
|
||||||
autoPatchelf $PWD/bin
|
autoPatchelf $PWD/bin
|
||||||
|
|
||||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||||
patchelf --set-interpreter $interp $PWD/plugins/intellij-rust/bin/linux/x86-64/intellij-rust-native-helper
|
patchelf --set-interpreter $interp $PWD/plugins/intellij-rust/bin/linux/*/intellij-rust-native-helper
|
||||||
chmod +x $PWD/plugins/intellij-rust/bin/linux/x86-64/intellij-rust-native-helper
|
chmod +x $PWD/plugins/intellij-rust/bin/linux/*/intellij-rust-native-helper
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue