Skip to content
Merged
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
176 changes: 91 additions & 85 deletions pkgs/by-name/mo/modrinth-app-unwrapped/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pkgs/by-name/mo/modrinth-app-unwrapped/gradle-from-path.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/packages/app-lib/build.rs b/packages/app-lib/build.rs
index 251c4e84..eeacd02a 100644
index 10ed29b9..97c832e1 100644
--- a/packages/app-lib/build.rs
+++ b/packages/app-lib/build.rs
@@ -1,7 +1,7 @@
Expand All @@ -10,8 +10,8 @@ index 251c4e84..eeacd02a 100644
+use std::env;

fn main() {
println!("cargo::rerun-if-changed=java/gradle");
@@ -19,21 +19,11 @@ fn main() {
println!("cargo::rerun-if-changed=.env");
@@ -38,21 +38,12 @@ fn build_java_jars() {
out_dir.join("java/libs").display()
);

Expand All @@ -22,7 +22,7 @@ index 251c4e84..eeacd02a 100644
- "java/gradlew",
- )
- .unwrap();
-
let mut build_dir_str = OsString::from("-Dorg.gradle.project.buildDir=");
build_dir_str.push(out_dir.join("java"));
- let exit_status = Command::new(gradle_path)
Expand Down
21 changes: 12 additions & 9 deletions pkgs/by-name/mo/modrinth-app-unwrapped/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
desktop-file-utils,
fetchFromGitHub,
gradle_8,
jdk11,
jdk17,
makeBinaryWrapper,
makeShellWrapper,
nix-update-script,
Expand All @@ -21,22 +21,23 @@
rustPlatform,
turbo,
webkitgtk_4_1,
xcbuild,
}:

let
gradle = gradle_8.override { java = jdk; };
jdk = jdk11;
jdk = jdk17;
in

rustPlatform.buildRustPackage (finalAttrs: {
pname = "modrinth-app-unwrapped";
version = "0.10.5";
version = "0.10.23";

src = fetchFromGitHub {
owner = "modrinth";
repo = "code";
tag = "v${finalAttrs.version}";
hash = "sha256-KqC+5RLLvg3cyjY7Ecw9qxQ5XUKsK7Tfxl4WC1OwZeI=";
hash = "sha256-Or2KkcZnZCZOnUd++SmDgbUOwa6ZmRDaoo7gF3XvN6I=";
};

patches = [
Expand Down Expand Up @@ -66,8 +67,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
--replace-fail '1.0.0-local' '${finalAttrs.version}'
'';

cargoHash = "sha256-chUPd1fLZ7dm0MXkbD7Bv4tE520ooEyliVZ9Pp+LIdk=";

cargoHash = "sha256-hWjoNwKA39YYhPSrQUNaM1nS+CtV9vff+aXpoQLPCOM=";
mitmCache = gradle.fetchDeps {
inherit (finalAttrs) pname;
data = ./deps.json;
Expand All @@ -77,7 +77,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
inherit (finalAttrs) pname version src;
pnpm = pnpm_9;
fetcherVersion = 1;
hash = "sha256-1tDegt8OgG0ZhvNGpkYQR+PuX/xI287OFk4MGAXUKZQ=";
hash = "sha256-jLuI8qNJgFkuBbKuBNKGuk/6v62iY7fNZX2t3U3olk0=";
};

nativeBuildInputs = [
Expand All @@ -90,7 +90,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
pnpmConfigHook
pnpm_9
]
++ lib.optional stdenv.hostPlatform.isDarwin makeBinaryWrapper;
++ lib.optional stdenv.hostPlatform.isDarwin [
makeBinaryWrapper
xcbuild
];

buildInputs = [ openssl ] ++ lib.optional stdenv.hostPlatform.isLinux webkitgtk_4_1;

Expand Down Expand Up @@ -163,7 +166,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
# This builds on architectures like aarch64, but the launcher itself does not support them yet.
# Darwin is the only exception
# See https://github.com/modrinth/code/issues/776#issuecomment-1742495678
broken = !stdenv.hostPlatform.isx86_64 && !stdenv.hostPlatform.isDarwin;
broken = !stdenv.hostPlatform.isx86_64 || !stdenv.hostPlatform.isLinux;
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode # mitm cache
Expand Down
11 changes: 5 additions & 6 deletions pkgs/by-name/mo/modrinth-app-unwrapped/remove-spotless.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
diff --git a/packages/app-lib/java/build.gradle.kts b/packages/app-lib/java/build.gradle.kts
index a671dd6f..d18c28de 100644
index 10435b98..c4346a0c 100644
--- a/packages/app-lib/java/build.gradle.kts
+++ b/packages/app-lib/java/build.gradle.kts
@@ -1,6 +1,5 @@
plugins {
java
- id("com.diffplug.spotless") version "7.0.4"
id("com.gradleup.shadow") version "9.0.0-rc2"
- id("com.diffplug.spotless") version "8.0.0"
id("com.gradleup.shadow") version "9.2.2"
}

@@ -27,13 +26,6 @@ tasks.withType<JavaCompile>().configureEach {
@@ -28,12 +27,6 @@ tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.addAll(listOf("-Xlint:all", "-Werror"))
}

Expand All @@ -19,7 +19,6 @@ index a671dd6f..d18c28de 100644
- removeUnusedImports()
- }
-}
-
tasks.jar {
enabled = false
}
2 changes: 2 additions & 0 deletions pkgs/by-name/mo/modrinth-app/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
glib,
glib-networking,
gsettings-desktop-schemas,
jdk25,
jdk17,
jdk21,
jdk8,
jdks ? [
jdk8
jdk17
jdk21
jdk25
],
libGL,
libjack2,
Expand Down
Loading