Merge pull request #329272 from vringar/fix/ghidra-extensions

gradle: fix update-deps.sh to use Nix bash
This commit is contained in:
Emily Trau 2024-08-03 10:41:29 +10:00 committed by GitHub
commit f10aad89bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -104,10 +104,10 @@ writeTextFile {
--tmpfs /home --bind /tmp /tmp --ro-bind /nix /nix --ro-bind /run /run --proc /proc --dev /dev \
--ro-bind ${toString path} ${toString path} --bind "$MITM_CACHE_CERT_DIR" "$MITM_CACHE_CERT_DIR" \
${builtins.concatStringsSep " " (map (x: "--setenv ${x} \"\$${x}\"") keep)} \
--setenv NIX_BUILD_SHELL bash ${bwrapFlags} ''${BWRAP_FLAGS:-} \
--setenv NIX_BUILD_SHELL ${runtimeShell} ${bwrapFlags} ''${BWRAP_FLAGS:-} \
-- ${nix}/bin/nix-shell --pure --run ${gradleScript} ${nixShellKeep} ${sourceDrvPath}
else
NIX_BUILD_SHELL=bash nix-shell --pure --run ${gradleScript} ${nixShellKeep} ${sourceDrvPath}
NIX_BUILD_SHELL=${runtimeShell} nix-shell --pure --run ${gradleScript} ${nixShellKeep} ${sourceDrvPath}
fi${lib.optionalString silent " >&2"}
kill -s SIGINT "$MITM_CACHE_PID"
for i in {0..20}; do

View File

@ -26,9 +26,11 @@ let
preBuild = ''
# Set project name, otherwise defaults to directory name
echo -e '\nrootProject.name = "${pname}"' >> settings.gradle
${args.preBuild or ""}
'';
gradleFlags = [ "-PGHIDRA_INSTALL_DIR=${ghidra}/lib/ghidra" ];
gradleBuildTask = args.gradleBuildTask or "buildExtension";
gradleFlags = args.gradleFlags or [] ++ [ "-PGHIDRA_INSTALL_DIR=${ghidra}/lib/ghidra" ];
installPhase = args.installPhase or ''
runHook preInstall

View File

@ -48,6 +48,7 @@ buildGhidraExtension {
buildInputs = [
zlib
];
gradleBuildTask = "assemble";
installPhase = ''
runHook preInstall