Merge pull request #189729 from azahi/vcmi

vcmi: init at 1.0.0

authored by Sergei Trofimovich and committed by GitHub bd1afa8a 88cebdd4

+99
+97
pkgs/games/vcmi/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , SDL2 5 + , SDL2_image 6 + , SDL2_mixer 7 + , SDL2_ttf 8 + , boost 9 + , cmake 10 + , ffmpeg 11 + , innoextract 12 + , luajit 13 + , minizip 14 + , ninja 15 + , pkg-config 16 + , python3 17 + , qtbase 18 + , tbb 19 + , wrapQtAppsHook 20 + , zlib 21 + , testers 22 + , vcmi 23 + }: 24 + 25 + stdenv.mkDerivation rec { 26 + pname = "vcmi"; 27 + version = "1.0.0"; 28 + 29 + src = fetchFromGitHub { 30 + owner = "vcmi"; 31 + repo = "vcmi"; 32 + rev = version; 33 + fetchSubmodules = true; 34 + hash = "sha256-5PuFq6wDSj5Ye2fUjqcr/VRU0ocus6h2nn+myQTOrhU="; 35 + }; 36 + 37 + postPatch = '' 38 + substituteInPlace Version.cpp.in \ 39 + --subst-var-by GIT_SHA1 "0000000"; 40 + ''; 41 + 42 + nativeBuildInputs = [ 43 + cmake 44 + ninja 45 + pkg-config 46 + python3 47 + wrapQtAppsHook 48 + ]; 49 + 50 + buildInputs = [ 51 + SDL2 52 + SDL2_image 53 + SDL2_mixer 54 + SDL2_ttf 55 + boost 56 + ffmpeg 57 + luajit 58 + minizip 59 + qtbase 60 + tbb 61 + zlib 62 + ]; 63 + 64 + cmakeFlags = [ 65 + "-DENABLE_TEST:BOOL=NO" 66 + "-DENABLE_PCH:BOOL=NO" 67 + # Make libvcmi.so discoverable in a non-standard location. 68 + "-DCMAKE_INSTALL_RPATH:STRING=${placeholder "out"}/lib/vcmi" 69 + # Upstream assumes relative value while Nixpkgs passes absolute. 70 + # Both should be allowed: https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html 71 + # Meanwhile work it around by passing a relative value. 72 + "-DCMAKE_INSTALL_LIBDIR:STRING=lib" 73 + ]; 74 + 75 + postFixup = '' 76 + wrapProgram $out/bin/vcmibuilder \ 77 + --prefix PATH : "${lib.makeBinPath [ innoextract ]}" 78 + ''; 79 + 80 + passthru.tests.version = testers.testVersion { 81 + package = vcmi; 82 + command = '' 83 + XDG_DATA_HOME=$PWD XDG_CACHE_HOME=$PWD XDG_CONFIG_HOME=$PWD \ 84 + vcmiclient --version 85 + ''; 86 + }; 87 + 88 + meta = with lib; { 89 + description = "Open-source engine for Heroes of Might and Magic III"; 90 + homepage = "https://vcmi.eu"; 91 + changelog = "https://github.com/vcmi/vcmi/blob/${src.rev}/ChangeLog"; 92 + license = with licenses; [ gpl2Only cc-by-sa-40 ]; 93 + maintainers = with maintainers; [ azahi ]; 94 + platforms = platforms.linux; 95 + mainProgram = "vcmiclient"; 96 + }; 97 + }
+2
pkgs/top-level/all-packages.nix
··· 12018 12018 12019 12019 vcftools = callPackage ../applications/science/biology/vcftools { }; 12020 12020 12021 + vcmi = libsForQt5.callPackage ../games/vcmi { }; 12022 + 12021 12023 vcsh = callPackage ../applications/version-management/vcsh { }; 12022 12024 12023 12025 vcs_query = callPackage ../tools/misc/vcs_query { };