elasticsearch7: remove manual elf patching

The options as specified were not a coherent set. There were three
things to consider: autoPatchelfHook, the regular rpath
fixup (controlled by dontPatchELF) and the elf interpreter rewrite in
the postFixup hook.

The autoPatchelfHook will set the interpreter, so the explicit
invocation of patchelf to do so in postFixup should not be required.

The autoPatchelfHook will rewrite rpaths entirely, so disabling the
rpath minimizing via dontPatchELF should have no effect.
This commit is contained in:
Andrew Childs 2021-03-01 16:23:06 +09:00 committed by Robert Hensing
parent 35db6bc554
commit 8fba8ef596

View File

@ -50,8 +50,6 @@ stdenv.mkDerivation rec {
runtimeDependencies = [ zlib ];
dontPatchELF = true;
installPhase = ''
mkdir -p $out
cp -R bin config lib modules plugins $out
@ -68,13 +66,6 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}"
'';
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
for exe in $(find $out/modules/x-pack-ml/platform/${plat}-${arch}/bin -executable -type f); do
echo "patching $exe..."
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$exe"
done
'';
passthru = { enableUnfree = true; };
meta = {