Skip to content

Commit bc68570

Browse files
authored
summoning-pixel-dungeon: use default gradle (NixOS#352275)
2 parents 220bfa9 + 6854e01 commit bc68570

File tree

1 file changed

+21
-8
lines changed
  • pkgs/games/shattered-pixel-dungeon/summoning-pixel-dungeon

1 file changed

+21
-8
lines changed

pkgs/games/shattered-pixel-dungeon/summoning-pixel-dungeon/default.nix

+21-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ callPackage
22
, fetchFromGitHub
3-
, gradle_6
3+
, fetchpatch
44
, substitute
55
}:
66

@@ -16,10 +16,26 @@ callPackage ../generic.nix rec {
1616
hash = "sha256-VQcWkbGe/0qyt3M5WWgTxczwC5mE3lRHbYidOwRoukI=";
1717
};
1818

19-
patches = [(substitute {
20-
src = ./disable-git-version.patch;
21-
substitutions = [ "--subst-var-by" "version" version ];
22-
})];
19+
patches = [
20+
(substitute {
21+
src = ./disable-git-version.patch;
22+
substitutions = [ "--subst-var-by" "version" version ];
23+
})
24+
# FIXME: Remove after next release
25+
(fetchpatch {
26+
name = "Update-desktop-build-script-for-Gradle-7.0+";
27+
url = "https://github.com/TrashboxBobylev/Summoning-Pixel-Dungeon/commit/5610142126e161cbdc78a07c5d5abfbcd6eaf8a6.patch";
28+
hash = "sha256-zAiOz/Cu89Y+VmAyLCf7fzq0Mr0sYFZu14sqBZ/XvZU=";
29+
})
30+
];
31+
32+
postPatch = ''
33+
# Upstream patched this in https://github.com/TrashboxBobylev/Summoning-Pixel-Dungeon/commit/c8a6fdd57c49fd91bf65be48679ae6a77578ef9f,
34+
# but the patch fails to apply cleanly. Manually replace the deprecated option instead.
35+
# FIXME: Remove after next release
36+
substituteInPlace gradle.properties \
37+
--replace-fail "-XX:MaxPermSize" "-XX:MaxMetaspaceSize"
38+
'';
2339

2440
desktopName = "Summoning Pixel Dungeon";
2541

@@ -28,7 +44,4 @@ callPackage ../generic.nix rec {
2844
downloadPage = "https://github.com/TrashboxBobylev/Summoning-Pixel-Dungeon/releases";
2945
description = "A fork of the Shattered Pixel Dungeon roguelike with added summoning mechanics";
3046
};
31-
32-
# Probably due to https://github.com/gradle/gradle/issues/17236
33-
gradle = gradle_6;
3447
}

0 commit comments

Comments
 (0)