diff --git a/pkgs/games/widelands/default.nix b/pkgs/games/widelands/default.nix index 0be50f2b8be1..11e6db9c687e 100644 --- a/pkgs/games/widelands/default.nix +++ b/pkgs/games/widelands/default.nix @@ -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 = [ ]; }; }