Skip to content

recaf: init at 4.0-unstable-2024-12-11#350589

Closed
nartsisss wants to merge 1 commit intoNixOS:masterfrom
nartsisss:init-recaf
Closed

recaf: init at 4.0-unstable-2024-12-11#350589
nartsisss wants to merge 1 commit intoNixOS:masterfrom
nartsisss:init-recaf

Conversation

@nartsisss
Copy link
Copy Markdown
Member

@nartsisss nartsisss commented Oct 23, 2024

Recaf - modern Java bytecode editor
image

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Oct 23, 2024
@nartsisss nartsisss force-pushed the init-recaf branch 7 times, most recently from 7d6231d to 1167816 Compare October 27, 2024 00:16
@nartsisss nartsisss marked this pull request as ready for review October 27, 2024 12:05
@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4755

@pluiedev
Copy link
Copy Markdown
Member

Does this still evaluate after #344544? If not, then you might need to do the same hacks as I did over in #354184

@nartsisss
Copy link
Copy Markdown
Member Author

nartsisss commented Nov 10, 2024

@pluiedev I tested it on aarch64 (both darwin & linux), and according to the logs from Ofborg, everything is fine on x86_64 as well.

image

@pluiedev
Copy link
Copy Markdown
Member

I tested it on aarch64 (both darwin & linux), and according to the logs from Ofborg, everything is fine on x86_64 as well.

Try rebasing as you're about 10k commits behind master :p

@nartsisss
Copy link
Copy Markdown
Member Author

I tested it on aarch64 (both darwin & linux), and according to the logs from Ofborg, everything is fine on x86_64 as well.

Try rebasing as you're about 10k commits behind master :p

You're right. Rebased and applied your java-23-instead-of-22.patch. Works fine now

image

Comment thread pkgs/by-name/re/recaf/package.nix Outdated
Comment thread pkgs/by-name/re/recaf/package.nix Outdated
@nartsisss nartsisss force-pushed the init-recaf branch 2 times, most recently from e8b4f95 to 09c2a16 Compare November 11, 2024 05:36
@nartsisss nartsisss changed the title recaf: init at 4.0.0 recaf: init at 4.0.0-unstable Nov 11, 2024
@C0D3-M4513R
Copy link
Copy Markdown
Contributor

Addresses: #267124

@nartsisss nartsisss changed the title recaf: init at 4.0.0-unstable recaf: init at 4.0-unstable-2024-12-11 Dec 12, 2024
@github-actions github-actions bot removed the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 12, 2024
@ofborg ofborg bot added the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 13, 2024
@nartsisss nartsisss requested a review from Aleksanaa December 14, 2024 00:29
@github-actions github-actions bot removed the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 14, 2024
@ofborg ofborg bot added the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 15, 2024
Comment on lines +25 to +26
#Required for build info
leaveDotGit = true;
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
#Required for build info
leaveDotGit = true;

This needs to be patched out of the gradle scripts.
The hash is not reproducible.

};

nativeBuildInputs = [
git
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
git

@FliegendeWurst
Copy link
Copy Markdown
Member

Try adding this patch:

diff --git a/recaf-core/build.gradle b/recaf-core/build.gradle
index eda3177..91e3ce7 100644
--- a/recaf-core/build.gradle
+++ b/recaf-core/build.gradle
@@ -49,7 +49,6 @@
 // Force generation of gversion data class when the version information is not up-to-date
 tasks.register('conditionalBuildConfigUpdate') {
     if (!isBuildConfigUpToDate()) {
-        finalizedBy createVersionFile
     }
 }
 
diff --git a/recaf-core/src/main/java/software/coley/recaf/RecafBuildConfig.java b/recaf-core/src/main/java/software/coley/recaf/RecafBuildConfig.java
new file mode 100644
index 0000000..bfe2657
--- /dev/null
+++ b/recaf-core/src/main/java/software/coley/recaf/RecafBuildConfig.java
@@ -0,0 +1,19 @@
+package software.coley.recaf;
+
+/**
+ * Automatically generated file containing build version information.
+ */
+public final class RecafBuildConfig {
+	public static final String MAVEN_GROUP = "software.coley";
+	public static final String MAVEN_NAME = "recaf-core";
+	public static final String VERSION = "@version@-SNAPSHOT";
+	public static final int GIT_REVISION = 1;
+	public static final String GIT_SHA = "@commit@";
+	public static final String GIT_DATE = "1970 01/01 00:00";
+	public static final String GIT_BRANCH = "master";
+	public static final String BUILD_DATE = "1970 01/01 00:00";
+	public static final long BUILD_UNIX_TIME = 1L;
+	public static final int DIRTY = 0;
+
+	private RecafBuildConfig(){}
+}

and these changes:

diff --git a/pkgs/by-name/re/recaf/package.nix b/pkgs/by-name/re/recaf/package.nix
index 9225c94ee95d..95fc95f4f46b 100644
--- a/pkgs/by-name/re/recaf/package.nix
+++ b/pkgs/by-name/re/recaf/package.nix
@@ -8,26 +8,25 @@
   makeWrapper,
   makeDesktopItem,
   copyDesktopItems,
+  substitute,
 }:
 let
   pname = "recaf";
+  version = "4.0-unstable-2025-02-20";
+  commit = "6e83f6a7d22aa95e8f4caaa13c84e8074b7373fa";
   jdk = jdk23.override { enableJavaFX = true; };
 in
 stdenv.mkDerivation {
-  inherit pname;
-  version = "4.0-unstable-2024-12-11";
+  inherit pname version;
 
   src = fetchFromGitHub {
     owner = "Col-E";
     repo = "Recaf";
-    rev = "483b8004251e5c654090d2315af30913d724a083";
-    hash = "sha256-OKz9KSl1g0ddLm38f6E6Ee9X0Q53hngPZPFDtramunQ=";
-    #Required for build info
-    leaveDotGit = true;
+    rev = commit;
+    hash = "sha256-GyDGsdGO4Uq8L0CLc1falPDQE7W1xLaHCcasucqFxwQ=";
   };
 
   nativeBuildInputs = [
-    git
     jdk
     gradle
     makeWrapper
@@ -37,6 +36,10 @@ stdenv.mkDerivation {
   patches = [
     ./wrap-javafx.patch
     ./use-java-23.patch
+    (substitute {
+      src = ./create-version-file.patch;
+      inherit version commit;
+    })
   ];
 
   mitmCache = gradle.fetchDeps {
diff --git a/pkgs/by-name/re/recaf/wrap-javafx.patch b/pkgs/by-name/re/recaf/wrap-javafx.patch
index b0f865961fc0..3f1c4d062792 100644
--- a/pkgs/by-name/re/recaf/wrap-javafx.patch
+++ b/pkgs/by-name/re/recaf/wrap-javafx.patch
@@ -5,7 +5,7 @@ index 04d19ecc8..6f2af575f 100644
 @@ -5,11 +5,15 @@
  }
  
- def javaFxVersion = '22.0.1'
+ def javaFxVersion = '23.0.2'
 -def javaFxIncludeInDist = System.getProperty('skip_jfx_bundle') == null
 +def javaFxPlatform = System.getenv('FX_PLATFORM')
  

@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 29, 2025
@nartsisss nartsisss closed this Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants