summary refs log tree commit diff
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2022-05-03 20:03:11 +0200
committerGitHub <noreply@github.com>2022-05-03 20:03:11 +0200
commitf02b987754585aa2162972f91734a52c222ea279 (patch)
treec77e3aed1c5254e1843aff7327aa344a732fa084
parentfd2c8f930f0535cdb96886cc27f052d8fdb2c68e (diff)
parent26e02c1972fb05799289ff25801bcbaa535f72bf (diff)
downloadnixpkgs-f02b987754585aa2162972f91734a52c222ea279.tar
nixpkgs-f02b987754585aa2162972f91734a52c222ea279.tar.gz
nixpkgs-f02b987754585aa2162972f91734a52c222ea279.tar.bz2
nixpkgs-f02b987754585aa2162972f91734a52c222ea279.tar.lz
nixpkgs-f02b987754585aa2162972f91734a52c222ea279.tar.xz
nixpkgs-f02b987754585aa2162972f91734a52c222ea279.tar.zst
nixpkgs-f02b987754585aa2162972f91734a52c222ea279.zip
Merge pull request #171027 from trofi/fix-mindustry-runtime-depends
mindustry: propagate more runtime depends
-rw-r--r--pkgs/games/mindustry/default.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/games/mindustry/default.nix b/pkgs/games/mindustry/default.nix
index 2572cd60c4a..ff77f08651a 100644
--- a/pkgs/games/mindustry/default.nix
+++ b/pkgs/games/mindustry/default.nix
@@ -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