Merge pull request #202808 from aidalgol/starsector-out-cleanup

starsector: reduce nix profile pollution

authored by Bruno Bigras and committed by GitHub b3b7ba7d ce1f9354

+6 -6
+6 -6
pkgs/games/starsector/default.nix
··· 41 41 installPhase = '' 42 42 runHook preInstall 43 43 44 - mkdir -p $out/bin 44 + mkdir -p $out/bin $out/share/starsector 45 45 rm -r jre_linux # remove bundled jre7 46 46 rm starfarer.api.zip 47 - cp -r ./* $out 47 + cp -r ./* $out/share/starsector 48 48 49 49 mkdir -p $out/share/icons/hicolor/64x64/apps 50 50 ln -s $out/graphics/ui/s_icon64.png $out/share/icons/hicolor/64x64/apps/starsector.png 51 51 52 - wrapProgram $out/starsector.sh \ 52 + wrapProgram $out/share/starsector/starsector.sh \ 53 53 --prefix PATH : ${lib.makeBinPath [ openjdk ]} \ 54 54 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} \ 55 55 --run 'mkdir -p ''${XDG_DATA_HOME:-~/.local/share}/starsector' \ 56 - --chdir "$out" 57 - ln -s $out/starsector.sh $out/bin/starsector 56 + --chdir "$out/share/starsector" 57 + ln -s $out/share/starsector/starsector.sh $out/bin/starsector 58 58 59 59 runHook postInstall 60 60 ''; ··· 65 65 postPatch = '' 66 66 substituteInPlace starsector.sh \ 67 67 --replace "./jre_linux/bin/java" "${openjdk}/bin/java" \ 68 - --replace "./native/linux" "$out/native/linux" \ 68 + --replace "./native/linux" "$out/share/starsector/native/linux" \ 69 69 --replace "=." "=\''${XDG_DATA_HOME:-\$HOME/.local/share}/starsector" \ 70 70 --replace "-XX:+CompilerThreadHintNoPreempt" "-XX:+UnlockDiagnosticVMOptions -XX:-BytecodeVerificationRemote -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSConcurrentMTEnabled -XX:+DisableExplicitGC" 71 71 '';