ghidra-extensions.ghidra-delinker-extension: 0.5.1 -> 0.7.0 (#424848)

This commit is contained in:
Sandro
2026-01-04 16:24:49 +00:00
committed by GitHub
3 changed files with 73 additions and 3 deletions
@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
maven,
}:
maven.buildMavenPackage rec {
pname = "binary-file-toolkit";
version = "0.4.0";
src = fetchFromGitHub {
owner = "boricj";
repo = "binary-file-toolkit";
tag = "v${version}";
hash = "sha256-ABDJDdx0OxXVOgYAw4kZAP3Psr+w7YevP1xk1RszXw8=";
};
mvnHash = "sha256-Ek2qulMSHd1ZJfEloo6fIe+QMqub/Ftna/TzTt01ky8=";
installPhase = ''
runHook preInstall
mkdir -p $out/
cp dist/* $out/
runHook postInstall
'';
meta = {
description = "Set of Java libraries for manipulating toolchain file formats";
homepage = "https://github.com/boricj/binary-file-toolkit";
changelog = "https://github.com/boricj/binary-file-toolkit/releases";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ timschumi ];
};
}
@@ -1,23 +1,35 @@
{
callPackage,
lib,
ghidra,
gradle,
fetchFromGitHub,
binary-file-toolkit ? callPackage ./binary-file-toolkit.nix { },
}:
ghidra.buildGhidraExtension (finalAttrs: {
pname = "ghidra-delinker-extension";
version = "0.5.1";
version = "0.7.0";
src = fetchFromGitHub {
owner = "boricj";
repo = "ghidra-delinker-extension";
rev = "v${finalAttrs.version}";
hash = "sha256-h6F50Z7S6tPOl9mIhChLKoFxHuAkq/n36ysUEFwWGxI=";
hash = "sha256-Hgpf1eqP/DRYczRDvAhXTWoycHe8N/xhMorlYDjytZg=";
};
patches = [
# The GitHub Maven repository is not available unauthenticated,
# so patch in the dependency this way and replace the fake path
# with the locally built derivation later.
# This is tracked at boricj/binary-file-toolkit#1.
./local-binary-file-toolkit.patch
];
postPatch = ''
substituteInPlace build.gradle \
--replace-fail '"''${getGitHash()}"' '"v${finalAttrs.version}"'
--replace-fail '"''${getGitHash()}"' '"v${finalAttrs.version}"' \
--replace-fail '"@binary-file-toolkit@"' '"${binary-file-toolkit}"'
'';
gradleBuildTask = "buildExtension";
@@ -0,0 +1,23 @@
diff --git a/build.gradle b/build.gradle
index 6f3bc6f..16fc51b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -55,16 +55,8 @@ else {
repositories {
mavenLocal()
mavenCentral()
- maven {
- name = "boricj's binary-file-toolkit"
- url = uri("https://maven.pkg.github.com/boricj/binary-file-toolkit")
- credentials(HttpHeaderCredentials) {
- name = "Authorization"
- value = "Bearer " + project.findProperty("githubToken") as String ?: System.getenv("GITHUB_TOKEN")
- }
- authentication {
- header(HttpHeaderAuthentication)
- }
+ flatDir {
+ dirs "@binary-file-toolkit@"
}
}