···11---- a/CMakeLists.txt
22-+++ b/CMakeLists.txt
33-@@ -25,6 +25,8 @@
44- # Packagers (or people using make install) have to set this variable to an absolute path.
55- wl_set_if_unset(WL_INSTALL_DATADIR "./data")
66-77-+wl_set_if_unset(WL_INSTALL_BINARY "./bin")
88-+
99- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
1010- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
1111- message(FATAL_ERROR "Widelands needs GCC >= 4.7 to compile.")
1212-1313---- a/cmake/WlFunctions.cmake
1414-+++ b/cmake/WlFunctions.cmake
1515-@@ -276,5 +276,5 @@
1616-1717- #Quoting the CMake documentation on DESTINATION:
1818- #"If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX"
1919-- install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
2020-+ install(TARGETS ${NAME} DESTINATION ${WL_INSTALL_BINARY} COMPONENT ExecutableFiles)
2121- endfunction()
+21-17
pkgs/games/widelands/default.nix
···22, stdenv
33, fetchFromGitHub
44, fetchpatch
55+, pkg-config # needed to find minizip
56, SDL2
67, SDL2_image
78, SDL2_mixer
89, SDL2_net
910, SDL2_ttf
1010-, boost
1111, cmake
1212, curl
1313, doxygen
···2020, lua
2121, python3
2222, zlib
2323+, minizip
2424+, asio
2525+, libSM
2626+, libICE
2727+, libXext
2328}:
24292530stdenv.mkDerivation rec {
2631 pname = "widelands";
2727- version = "1.0";
3232+ version = "1.1";
28332934 src = fetchFromGitHub {
3035 owner = "widelands";
3136 repo = "widelands";
3237 rev = "v${version}";
3333- sha256 = "sha256-gNumYoeKePaxiAzrqEPKibMxFwv9vyBrCSoua+MKhcM=";
3838+ sha256 = "sha256-fe1fey34b6T1+kqMa22STROu7dagQJtg24nW2jhVix8=";
3439 };
35403636- patches = [
3737- ./bincmake.patch
3838- # fix for building with Boost 1.77, https://github.com/widelands/widelands/pull/5025
3939- (fetchpatch {
4040- url = "https://github.com/widelands/widelands/commit/33981fda8c319c9feafc958f5f0b1670c48666ef.patch";
4141- sha256 = "sha256-FjxxCTPpg/Zp01XpNfgRXMMLJBfxAptkLpsLmnFXm2Q=";
4242- })
4343- ];
4444-4541 postPatch = ''
4642 substituteInPlace xdg/org.widelands.Widelands.desktop \
4743 --replace 'Exec=widelands' "Exec=$out/bin/widelands"
···49455046 cmakeFlags = [
5147 "-Wno-dev" # dev warnings are only needed for upstream development
5252- "-DWL_INSTALL_BASEDIR=${placeholder "out"}"
5353- "-DWL_INSTALL_DATADIR=${placeholder "out"}/share/widelands"
5454- "-DWL_INSTALL_BINARY=${placeholder "out"}/bin"
4848+ "-DWL_INSTALL_BASEDIR=${placeholder "out"}/share/widelands" # for COPYING, Changelog, etc.
4949+ "-DWL_INSTALL_DATADIR=${placeholder "out"}/share/widelands" # for game data
5050+ "-DWL_INSTALL_BINDIR=${placeholder "out"}/bin"
5551 ];
56525757- nativeBuildInputs = [ cmake doxygen gettext graphviz installShellFiles ];
5353+ nativeBuildInputs = [ cmake doxygen gettext graphviz installShellFiles pkg-config ];
5454+5555+ enableParallelBuilding = true;
58565957 buildInputs = [
6058 SDL2
···6260 SDL2_mixer
6361 SDL2_net
6462 SDL2_ttf
6565- boost
6663 curl
6764 glew
6865 icu
···7067 lua
7168 python3
7269 zlib
7070+ minizip
7171+ asio
7272+ libSM # XXX: these should be propagated by SDL2?
7373+ libICE
7474+ libXext
7375 ];
74767577 postInstall = ''
···9092 Settlers II". It has a single player campaign mode, as well as a networked
9193 multiplayer mode.
9294 '';
9595+ changelog = "https://github.com/widelands/widelands/releases/tag/v1.1";
9696+ mainProgram = "widelands";
9397 license = licenses.gpl2Plus;
9498 maintainers = with maintainers; [ raskin jcumming ];
9599 platforms = platforms.linux;