widelands: darwin support

This commit is contained in:
Matteo Pacini 2024-08-19 17:59:24 +01:00
parent 54df89b8ad
commit e9690f6295

View File

@ -24,6 +24,7 @@
, libSM
, libICE
, libXext
, darwin
}:
stdenv.mkDerivation rec {
@ -71,16 +72,19 @@ stdenv.mkDerivation rec {
asio
libSM # XXX: these should be propagated by SDL2?
libICE
libXext
];
]
++ lib.optional stdenv.isLinux libXext
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
Cocoa
]);
postInstall = ''
postInstall = lib.optionalString stdenv.isLinux ''
install -Dm444 -t $out/share/applications ../xdg/org.widelands.Widelands.desktop
for s in 16 32 48 64 128; do
install -Dm444 ../data/images/logos/wl-ico-''${s}.png $out/share/icons/hicolor/''${s}x''${s}/org.widelands.Widelands.png
done
'' + ''
installManPage ../xdg/widelands.6
'';
@ -96,7 +100,7 @@ stdenv.mkDerivation rec {
mainProgram = "widelands";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ raskin jcumming ];
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
hydraPlatforms = [ ];
};
}