Skip to content

Commit 9cbdecd

Browse files
authored
supermariowar: Fix GUI applications wrapping (#346941)
2 parents 4477eb2 + 8a9cd87 commit 9cbdecd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkgs/by-name/su/supermariowar/package.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
SDL2_mixer,
1212
zlib,
1313
unstableGitUpdater,
14+
makeWrapper,
1415
}:
1516

1617
stdenv.mkDerivation (finalAttrs: {
@@ -28,6 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
2829
nativeBuildInputs = [
2930
cmake
3031
pkg-config
32+
makeWrapper
3133
];
3234

3335
buildInputs = [
@@ -45,17 +47,15 @@ stdenv.mkDerivation (finalAttrs: {
4547
mkdir -p $out/bin
4648
4749
for app in smw smw-leveledit smw-worldedit; do
48-
chmod +x $out/games/$app
49-
50-
cat << EOF > $out/bin/$app
51-
$out/games/$app --datadir $out/share/games/smw
52-
EOF
53-
chmod +x $out/bin/$app
50+
makeWrapper $out/games/$app $out/bin/$app \
51+
--add-flags "--datadir $out/share/games/smw"
5452
done
5553
5654
ln -s $out/games/smw-server $out/bin/smw-server
5755
'';
56+
5857
passthru.updateScript = unstableGitUpdater { };
58+
5959
meta = {
6060
description = "A fan-made multiplayer Super Mario Bros. style deathmatch game";
6161
homepage = "https://github.com/mmatyas/supermariowar";

0 commit comments

Comments
 (0)