Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions pkgs/by-name/re/recaf/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
lib,
maven,
fetchFromGitHub,
jdk11,
makeBinaryWrapper,
libglvnd,
glib,
gtk3,
libXtst,
nix-update-script,
}:
let
version = "2.21.14";
jdk = jdk11;
in
maven.buildMavenPackage {
pname = "recaf";
inherit version;

src = fetchFromGitHub {
owner = "Col-E";
repo = "Recaf";
rev = "refs/tags/${version}";
hash = "sha256-aVOVfrACawYc9VlBZ6+IHiCDGPOsVLdAvwQHdByZ584=";
};

nativeBuildInputs = [ makeBinaryWrapper ];

mvnHash = "sha256-MPPZXQilmMaj8n5SXP7fG1Q95pH5Ydu7jU+KRS9beO8=";
Comment thread
getchoo marked this conversation as resolved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mvnHash = "sha256-MPPZXQilmMaj8n5SXP7fG1Q95pH5Ydu7jU+KRS9beO8=";
mvnHash = "sha256-QwkUgTF/a0ZY2RN8fvlVBsMECo9ijUCRB7nuW7zIt/Y=";

on x64 Linux.

mvnJdk = jdk; # Required for tests

# Disable flaky tests
mvnParameters = "'-Dtest=!CompilerTest,!#testMaven+testMavenLoading'";

installPhase =
let
# Required by glassgtk3
libPath = lib.makeLibraryPath [
libglvnd
gtk3
glib
libXtst
];
in
''
runHook preInstall

install -Dm644 target/recaf-${version}-*-jar-with-dependencies.jar $out/lib/recaf.jar
makeWrapper ${lib.getExe jdk} $out/bin/recaf \
--add-flags "-jar $out/lib/recaf.jar" \
--prefix LD_LIBRARY_PATH : "${libPath}"

runHook postInstall
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "Modern Java bytecode editor";
homepage = "https://recaf.coley.software/";
license = with lib.licenses; [ mit ];
inherit (jdk.meta) platforms;
maintainers = with lib.maintainers; [ pluiedev ];
};
}
Loading