forked from mirrors/nixpkgs
Merge pull request #171027 from trofi/fix-mindustry-runtime-depends
mindustry: propagate more runtime depends
This commit is contained in:
commit
f02b987754
|
@ -128,15 +128,6 @@ stdenv.mkDerivation rec {
|
|||
rm Arc/backends/backend-sdl/libs/linux64/libsdl-arc*.so
|
||||
'' + cleanupMindustrySrc;
|
||||
|
||||
# Propagate glew to prevent it from being cleaned up.
|
||||
# Since a jar is a compressed archive, nix can't figure out that the dependency is actually in there,
|
||||
# and will assume that it's not actually needed.
|
||||
# This can cause issues.
|
||||
# See https://github.com/NixOS/nixpkgs/issues/109798.
|
||||
propagatedBuildInputs = lib.optionals enableClient [
|
||||
glew.out
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals enableClient [
|
||||
SDL2
|
||||
glew
|
||||
|
@ -183,6 +174,17 @@ stdenv.mkDerivation rec {
|
|||
makeWrapper ${jdk}/bin/java $out/bin/mindustry \
|
||||
--add-flags "-jar $out/share/mindustry.jar" \
|
||||
--set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib/
|
||||
|
||||
# Retain runtime depends to prevent them from being cleaned up.
|
||||
# Since a jar is a compressed archive, nix can't figure out that the dependency is actually in there,
|
||||
# and will assume that it's not actually needed.
|
||||
# This can cause issues.
|
||||
# See https://github.com/NixOS/nixpkgs/issues/109798.
|
||||
echo "# Retained runtime dependencies: " >> $out/bin/mindustry
|
||||
for dep in ${SDL2.out} ${alsa-lib.out} ${glew.out}; do
|
||||
echo "# $dep" >> $out/bin/mindustry
|
||||
done
|
||||
|
||||
install -Dm644 core/assets/icons/icon_64.png $out/share/icons/hicolor/64x64/apps/mindustry.png
|
||||
'' + optionalString enableServer ''
|
||||
install -Dm644 server/build/libs/server-release.jar $out/share/mindustry-server.jar
|
||||
|
|
Loading…
Reference in a new issue