@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, unzip, lib, makeWrapper, patchelf
1+{ stdenv, fetchurl, unzip, lib, makeWrapper, autoPatchelfHook
22, openjdk11, pam
33}: let
44
@@ -15,22 +15,16 @@ in stdenv.mkDerivation {
1515
1616 nativeBuildInputs = [
1717 makeWrapper
18− patchelf
18+ autoPatchelfHook
1919 unzip
2020 ];
2121
22− dontStrip = true;
23−
24− postPatch = ''
25− for f in Ghidra/Features/Decompiler/os/linux64/* GPL/DemanglerGnu/os/linux64/*; do
26− patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
27− --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" "$f"
28− done
22+ buildInputs = [
23+ stdenv.cc.cc.lib
24+ pam
25+ ];
2926
30− for f in Ghidra/Features/GhidraServer/os/linux64/*; do
31− patchelf --set-rpath "${stdenv.cc.libc}/lib:${pam}/lib" "$f"
32− done
33− '';
27+ dontStrip = true;
3428
3529 installPhase = ''
3630 mkdir -p "${pkg_path}"