ja2-stracciatella: 0.17.0 -> 0.21.0

authored by TomaSajt and committed by Alyssa Ross dfdc09bb 6f5506cd

+26 -13
+3 -3
pkgs/by-name/ja/ja2-stracciatella/dont-use-vendored-sdl2.patch
··· 9 -if(APPLE) 10 - file(GLOB APPLE_DIST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/assets/distr-files-mac/*.txt") 11 - install(FILES ${APPLE_DIST_FILES} DESTINATION .) 12 - - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-SDL2-2.0.8-macos/SDL2.framework DESTINATION .) 13 -endif() 14 - 15 - ## Uninstall 16 17 - add_custom_templated_target("uninstall")
··· 9 -if(APPLE) 10 - file(GLOB APPLE_DIST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/assets/distr-files-mac/*.txt") 11 - install(FILES ${APPLE_DIST_FILES} DESTINATION .) 12 + - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-SDL2-2.0.20-macos/SDL2.framework DESTINATION .) 13 -endif() 14 - 15 + ## Build AppImage 16 17 + add_custom_target(package-appimage
+23 -10
pkgs/by-name/ja/ja2-stracciatella/package.nix
··· 10 rustc, 11 SDL2, 12 fltk, 13 rapidjson, 14 gtest, 15 }: 16 17 let 18 stringTheory = fetchurl { 19 - url = "https://github.com/zrax/string_theory/archive/3.1.tar.gz"; 20 - hash = "sha256-gexVFxGpkmCMQrpCJQ/g2BsCpsCsUTSaD1X0PacRmLo="; 21 }; 22 in 23 stdenv.mkDerivation rec { 24 pname = "ja2-stracciatella"; 25 - version = "0.17.0"; 26 27 src = fetchFromGitHub { 28 owner = "ja2-stracciatella"; 29 repo = "ja2-stracciatella"; 30 tag = "v${version}"; 31 - hash = "sha256-0li4o8KutJjpJdviqqqhMvNqhNVBw4L98DIJtebb2VQ="; 32 }; 33 34 patches = [ ··· 40 # Patch dependencies that are usually loaded by url 41 substituteInPlace dependencies/lib-string_theory/builder/CMakeLists.txt.in \ 42 --replace-fail ${stringTheory.url} file://${stringTheory} 43 ''; 44 45 strictDeps = true; ··· 55 buildInputs = [ 56 SDL2 57 fltk 58 rapidjson 59 gtest 60 ]; 61 62 cargoRoot = "rust"; 63 64 - cargoDeps = rustPlatform.fetchCargoTarball { 65 inherit 66 pname 67 version 68 src 69 cargoRoot 70 ; 71 - hash = "sha256-zkctR16QIjCTiDmrhFqPPOThbPwsm0T0nlnCekkXNN8="; 72 }; 73 74 cmakeFlags = [ 75 (lib.cmakeBool "LOCAL_RAPIDJSON_LIB" false) 76 (lib.cmakeBool "LOCAL_GTEST_LIB" false) 77 (lib.cmakeFeature "EXTRA_DATA_DIR" "${placeholder "out"}/share/ja2") 78 ]; 79 - 80 - # error: 'uint64_t' does not name a type 81 - # gcc13 and above don't automatically include cstdint 82 - env.CXXFLAGS = "-include cstdint"; 83 84 doInstallCheck = true; 85
··· 10 rustc, 11 SDL2, 12 fltk, 13 + lua5_3, 14 + miniaudio, 15 rapidjson, 16 + sol2, 17 gtest, 18 }: 19 20 let 21 stringTheory = fetchurl { 22 + url = "https://github.com/zrax/string_theory/archive/3.8.tar.gz"; 23 + hash = "sha256-mq7pW3qRZs03/SijzbTl1txJHCSW/TO+gvRLWZh/11M="; 24 + }; 25 + 26 + magicEnum = fetchurl { 27 + url = "https://github.com/Neargye/magic_enum/archive/v0.8.2.zip"; 28 + hash = "sha256-oQ+mUDB8YJULcSploz+0bprJbqclhc+p/Pmsn1AsAes="; 29 }; 30 in 31 stdenv.mkDerivation rec { 32 pname = "ja2-stracciatella"; 33 + version = "0.21.0"; 34 35 src = fetchFromGitHub { 36 owner = "ja2-stracciatella"; 37 repo = "ja2-stracciatella"; 38 tag = "v${version}"; 39 + hash = "sha256-zMCFDMSKcsYz5LjW8UJbBlSmuJX6ibr9zIS3BgZMgAg="; 40 }; 41 42 patches = [ ··· 48 # Patch dependencies that are usually loaded by url 49 substituteInPlace dependencies/lib-string_theory/builder/CMakeLists.txt.in \ 50 --replace-fail ${stringTheory.url} file://${stringTheory} 51 + substituteInPlace dependencies/lib-magic_enum/getter/CMakeLists.txt.in \ 52 + --replace-fail ${magicEnum.url} file://${magicEnum} 53 ''; 54 55 strictDeps = true; ··· 65 buildInputs = [ 66 SDL2 67 fltk 68 + lua5_3 69 rapidjson 70 + sol2 71 gtest 72 ]; 73 74 cargoRoot = "rust"; 75 76 + cargoDeps = rustPlatform.fetchCargoVendor { 77 inherit 78 pname 79 version 80 src 81 cargoRoot 82 ; 83 + hash = "sha256-5KZa5ocn6Q4qUeRmm7Tymgg09dr6aZoAuJvtF32CXNg="; 84 }; 85 86 cmakeFlags = [ 87 + (lib.cmakeBool "FLTK_SKIP_FLUID" true) # otherwise `find_package(FLTK)` fails 88 + (lib.cmakeBool "LOCAL_LUA_LIB" false) 89 + (lib.cmakeBool "LOCAL_MINIAUDIO_LIB" false) 90 + (lib.cmakeFeature "MINIAUDIO_INCLUDE_DIR" "${miniaudio}") 91 (lib.cmakeBool "LOCAL_RAPIDJSON_LIB" false) 92 + (lib.cmakeBool "LOCAL_SOL_LIB" false) 93 (lib.cmakeBool "LOCAL_GTEST_LIB" false) 94 (lib.cmakeFeature "EXTRA_DATA_DIR" "${placeholder "out"}/share/ja2") 95 ]; 96 97 doInstallCheck = true; 98