dbeaver-bin: remove bundled jre on darwin
This commit is contained in:
@@ -55,18 +55,29 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}dbeaver.ini \
|
||||
--replace-fail '-Xmx1024m' '-Xmx${override_xmx}'
|
||||
'';
|
||||
prePatch =
|
||||
''
|
||||
substituteInPlace ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}dbeaver.ini \
|
||||
--replace-fail '-Xmx1024m' '-Xmx${override_xmx}'
|
||||
''
|
||||
# remove the bundled JRE configuration on Darwin
|
||||
# dont use substituteInPlace here because it would match "-vmargs"
|
||||
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
|
||||
sed -i -e '/^-vm$/ { N; d; }' Contents/Eclipse/dbeaver.ini
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
# most directories are for different architectures, only keep what we need
|
||||
shopt -s extglob
|
||||
pushd ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}plugins/com.sun.jna_*/com/sun/jna/
|
||||
rm -r !(ptr|internal|linux-x86-64|linux-aarch64|darwin-x86-64|darwin-aarch64)/
|
||||
popd
|
||||
'';
|
||||
preInstall =
|
||||
''
|
||||
# most directories are for different architectures, only keep what we need
|
||||
shopt -s extglob
|
||||
pushd ${lib.optionalString stdenvNoCC.hostPlatform.isDarwin "Contents/Eclipse/"}plugins/com.sun.jna_*/com/sun/jna/
|
||||
rm -r !(ptr|internal|linux-x86-64|linux-aarch64|darwin-x86-64|darwin-aarch64)/
|
||||
popd
|
||||
''
|
||||
# remove the bundled JRE on Darwin
|
||||
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
|
||||
rm -r Contents/Eclipse/jre/
|
||||
'';
|
||||
|
||||
installPhase =
|
||||
if !stdenvNoCC.hostPlatform.isDarwin then
|
||||
|
||||
Reference in New Issue
Block a user