|
|
|
@ -55,12 +55,28 @@ let
|
|
|
|
export PATH="$dir/bin/:$PATH"
|
|
|
|
export PATH="$dir/bin/:$PATH"
|
|
|
|
'';
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
macosQuarantine = lib.optionalString pkgs.stdenv.isDarwin ''
|
|
|
|
|
|
|
|
libpython="libpython${python3.pythonVersion}.dylib"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if command -v xattr >/dev/null 2>&1 && command -v grep >/dev/null 2>&1; then
|
|
|
|
|
|
|
|
if xattr -x "$dir/lib/$libpython" 2>/dev/null | grep -q com.apple.quarantine; then
|
|
|
|
|
|
|
|
echo "Error: The pwndbg is marked as quarantined by macOS."
|
|
|
|
|
|
|
|
echo "To fix this, run the following command:"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo " xattr -rd com.apple.quarantine \"$dir\""
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
wrapperBinPy =
|
|
|
|
wrapperBinPy =
|
|
|
|
file:
|
|
|
|
file:
|
|
|
|
pkgs.writeScript "pwndbg-wrapper-bin-py" ''
|
|
|
|
pkgs.writeScript "pwndbg-wrapper-bin-py" ''
|
|
|
|
#!/bin/sh
|
|
|
|
#!/bin/sh
|
|
|
|
dir="$(cd -- "$(dirname "$(dirname "$(realpath "$0")")")" >/dev/null 2>&1 ; pwd -P)"
|
|
|
|
dir="$(cd -- "$(dirname "$(dirname "$(realpath "$0")")")" >/dev/null 2>&1 ; pwd -P)"
|
|
|
|
${commonEnvs}
|
|
|
|
${commonEnvs}
|
|
|
|
|
|
|
|
${macosQuarantine}
|
|
|
|
exec ${ldLoader} "$dir/exe/python3" "$dir/${file}" "$@"
|
|
|
|
exec ${ldLoader} "$dir/exe/python3" "$dir/${file}" "$@"
|
|
|
|
'';
|
|
|
|
'';
|
|
|
|
wrapperBin =
|
|
|
|
wrapperBin =
|
|
|
|
@ -69,6 +85,7 @@ let
|
|
|
|
#!/bin/sh
|
|
|
|
#!/bin/sh
|
|
|
|
dir="$(cd -- "$(dirname "$(dirname "$(realpath "$0")")")" >/dev/null 2>&1 ; pwd -P)"
|
|
|
|
dir="$(cd -- "$(dirname "$(dirname "$(realpath "$0")")")" >/dev/null 2>&1 ; pwd -P)"
|
|
|
|
${commonEnvs}
|
|
|
|
${commonEnvs}
|
|
|
|
|
|
|
|
${macosQuarantine}
|
|
|
|
exec ${ldLoader} "$dir/${file}" "$@"
|
|
|
|
exec ${ldLoader} "$dir/${file}" "$@"
|
|
|
|
'';
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
|