4 , pkg-config # needed to find minizip
30 stdenv.mkDerivation rec {
34 src = fetchFromGitHub {
38 sha256 = "sha256-V7eappIMEQMNbf9EGQhv71Fwz0wH679ifi/qAHWwMNU=";
42 substituteInPlace xdg/org.widelands.Widelands.desktop \
43 --replace 'Exec=widelands' "Exec=$out/bin/widelands"
47 "-Wno-dev" # dev warnings are only needed for upstream development
48 "-DWL_INSTALL_BASEDIR=${placeholder "out"}/share/widelands" # for COPYING, Changelog, etc.
49 "-DWL_INSTALL_DATADIR=${placeholder "out"}/share/widelands" # for game data
50 "-DWL_INSTALL_BINDIR=${placeholder "out"}/bin"
53 nativeBuildInputs = [ cmake doxygen gettext graphviz installShellFiles pkg-config ];
55 enableParallelBuilding = true;
72 libSM # XXX: these should be propagated by SDL2?
75 ++ lib.optional stdenv.hostPlatform.isLinux libXext
76 ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
80 postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
81 install -Dm444 -t $out/share/applications ../xdg/org.widelands.Widelands.desktop
83 for s in 16 32 48 64 128; do
84 install -Dm444 ../data/images/logos/wl-ico-''${s}.png $out/share/icons/hicolor/''${s}x''${s}/org.widelands.Widelands.png
87 installManPage ../xdg/widelands.6
91 description = "RTS with multiple-goods economy";
92 homepage = "https://widelands.org/";
94 Widelands is a real time strategy game based on "The Settlers" and "The
95 Settlers II". It has a single player campaign mode, as well as a networked
98 changelog = "https://github.com/widelands/widelands/releases/tag/v${version}";
99 mainProgram = "widelands";
100 license = licenses.gpl2Plus;
101 maintainers = with maintainers; [ raskin jcumming ];
102 platforms = platforms.linux ++ platforms.darwin;
103 hydraPlatforms = [ ];