diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 9d7387a75af6..573d235d9443 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -347,6 +347,10 @@ In addition to numerous new and upgraded packages, this release has the followin - The `pict-rs` package was updated from an 0.3 alpha release to 0.3 stable, and related environment variables now require two underscores instead of one. +- The `shattered-pixel-dungeon` game was updated from 1.1.2 to 2.0.2. + - The location of game data has changed. To migrate it, run `mv ~/.shatteredpixel ~/.local/share/.shatteredpixel` + - The update will delete all your in-progress games. + - `espanso` has been updated to major version 2. Therefore, migration steps may need to be performed. See [the official migration instructions](https://espanso.org/docs/migration/overview/) for how to perform these migrations. Further, `espanso-wayland` can now be used for Wayland support. ## Other Notable Changes {#sec-release-23.05-notable-changes} diff --git a/pkgs/games/shattered-pixel-dungeon/default.nix b/pkgs/games/shattered-pixel-dungeon/default.nix index 81baf3b664ba..3d31a56ae3db 100644 --- a/pkgs/games/shattered-pixel-dungeon/default.nix +++ b/pkgs/games/shattered-pixel-dungeon/default.nix @@ -2,7 +2,7 @@ , makeWrapper , fetchFromGitHub , nixosTests -, gradle_6 +, gradle , perl , jre , libpulseaudio @@ -10,17 +10,19 @@ let pname = "shattered-pixel-dungeon"; - version = "1.1.2"; + version = "2.0.2"; src = fetchFromGitHub { owner = "00-Evan"; repo = "shattered-pixel-dungeon"; - # NOTE: always use the commit sha, not the tag. Tags _will_ disappear! - # https://github.com/00-Evan/shattered-pixel-dungeon/issues/596 - rev = "5d1a2dce6b554b40f6737ead45d411fd98f4c67d"; - sha256 = "sha256-Vu7K0NnqFY298BIQV9AwNEahV0eJl14tAeq+rw6KrtM="; + rev = "v${version}"; + sha256 = "sha256-gg8FHLkw964mYejXvK5GClTvTLGK3FyXR8Kkxjl/pRs="; }; + patches = [ + ./disable-beryx.patch + ]; + postPatch = '' # disable gradle plugins with native code and their targets perl -i.bak1 -pe "s#(^\s*id '.+' version '.+'$)#// \1#" build.gradle @@ -32,8 +34,8 @@ let # fake build to pre-download deps into fixed-output derivation deps = stdenv.mkDerivation { pname = "${pname}-deps"; - inherit version src postPatch; - nativeBuildInputs = [ gradle_6 perl ]; + inherit version src patches postPatch; + nativeBuildInputs = [ gradle perl ]; buildPhase = '' export GRADLE_USER_HOME=$(mktemp -d) # https://github.com/gradle/gradle/issues/4426 @@ -47,13 +49,13 @@ let | sh ''; outputHashMode = "recursive"; - outputHash = "sha256-UI5/ZJbUtEz1Fr+qn6a8kzi9rrP+lVrpBbuDv8TG5y0="; + outputHash = "sha256-ojwvs6j3R31723lfRlKdeyR5+txnetyK3foJTLqy28Q="; }; in stdenv.mkDerivation rec { - inherit pname version src postPatch; + inherit pname version src patches postPatch; - nativeBuildInputs = [ gradle_6 perl makeWrapper ]; + nativeBuildInputs = [ gradle perl makeWrapper ]; buildPhase = '' export GRADLE_USER_HOME=$(mktemp -d) diff --git a/pkgs/games/shattered-pixel-dungeon/disable-beryx.patch b/pkgs/games/shattered-pixel-dungeon/disable-beryx.patch new file mode 100644 index 000000000000..5bd6e5bcf16c --- /dev/null +++ b/pkgs/games/shattered-pixel-dungeon/disable-beryx.patch @@ -0,0 +1,47 @@ +diff --git a/desktop/build.gradle b/desktop/build.gradle +index 97f35f7..afd5116 100644 +--- a/desktop/build.gradle ++++ b/desktop/build.gradle +@@ -1,6 +1,7 @@ +-plugins { +- id 'org.beryx.runtime' version '1.12.7' +-} ++//plugins { ++// id 'org.beryx.runtime' version '1.12.7' ++//} ++apply plugin: "java" + + [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + sourceCompatibility = targetCompatibility = appJavaCompatibility +@@ -43,11 +44,11 @@ task release(type: Jar) { + attributes 'Implementation-Version': appVersionCode + } + } +-installDist.dependsOn release +-startScripts.dependsOn release +-jpackageImage.dependsOn release ++//installDist.dependsOn release ++//startScripts.dependsOn release ++//jpackageImage.dependsOn release + +-runtime { ++/*runtime { + modules = ['java.base', + 'java.desktop', + 'jdk.unsupported', +@@ -102,7 +103,7 @@ runtime { + } + } + +-} ++}*/ + + dependencies { + implementation project(':core') +@@ -123,4 +124,4 @@ dependencies { + + implementation project(':services:updates:githubUpdates') + implementation project(':services:news:shatteredNews') +-} +\ No newline at end of file ++}