ghidra: use autoPatchelfHook

This commit is contained in:
Christian Kögler 2019-03-13 22:03:40 +01:00
parent 631faad148
commit 2385d153ba

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, lib, makeWrapper, patchelf { stdenv, fetchurl, unzip, lib, makeWrapper, autoPatchelfHook
, openjdk11, pam , openjdk11, pam
}: let }: let
@ -15,23 +15,17 @@ in stdenv.mkDerivation {
nativeBuildInputs = [ nativeBuildInputs = [
makeWrapper makeWrapper
patchelf autoPatchelfHook
unzip unzip
]; ];
buildInputs = [
stdenv.cc.cc.lib
pam
];
dontStrip = true; dontStrip = true;
postPatch = ''
for f in Ghidra/Features/Decompiler/os/linux64/* GPL/DemanglerGnu/os/linux64/*; do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" "$f"
done
for f in Ghidra/Features/GhidraServer/os/linux64/*; do
patchelf --set-rpath "${stdenv.cc.libc}/lib:${pam}/lib" "$f"
done
'';
installPhase = '' installPhase = ''
mkdir -p "${pkg_path}" mkdir -p "${pkg_path}"
cp -a * "${pkg_path}" cp -a * "${pkg_path}"