ja2-stracciatella: 0.17.0 -> 0.21.0

This commit is contained in:
TomaSajt
2025-01-31 15:56:05 +01:00
committed by Alyssa Ross
parent 6f5506cd28
commit dfdc09bbe3
2 changed files with 26 additions and 13 deletions
@@ -9,9 +9,9 @@ index e4e5547af..a3017d197 100644
-if(APPLE)
- file(GLOB APPLE_DIST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/assets/distr-files-mac/*.txt")
- install(FILES ${APPLE_DIST_FILES} DESTINATION .)
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-SDL2-2.0.8-macos/SDL2.framework DESTINATION .)
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-SDL2-2.0.20-macos/SDL2.framework DESTINATION .)
-endif()
-
## Uninstall
## Build AppImage
add_custom_templated_target("uninstall")
add_custom_target(package-appimage
+23 -10
View File
@@ -10,25 +10,33 @@
rustc,
SDL2,
fltk,
lua5_3,
miniaudio,
rapidjson,
sol2,
gtest,
}:
let
stringTheory = fetchurl {
url = "https://github.com/zrax/string_theory/archive/3.1.tar.gz";
hash = "sha256-gexVFxGpkmCMQrpCJQ/g2BsCpsCsUTSaD1X0PacRmLo=";
url = "https://github.com/zrax/string_theory/archive/3.8.tar.gz";
hash = "sha256-mq7pW3qRZs03/SijzbTl1txJHCSW/TO+gvRLWZh/11M=";
};
magicEnum = fetchurl {
url = "https://github.com/Neargye/magic_enum/archive/v0.8.2.zip";
hash = "sha256-oQ+mUDB8YJULcSploz+0bprJbqclhc+p/Pmsn1AsAes=";
};
in
stdenv.mkDerivation rec {
pname = "ja2-stracciatella";
version = "0.17.0";
version = "0.21.0";
src = fetchFromGitHub {
owner = "ja2-stracciatella";
repo = "ja2-stracciatella";
tag = "v${version}";
hash = "sha256-0li4o8KutJjpJdviqqqhMvNqhNVBw4L98DIJtebb2VQ=";
hash = "sha256-zMCFDMSKcsYz5LjW8UJbBlSmuJX6ibr9zIS3BgZMgAg=";
};
patches = [
@@ -40,6 +48,8 @@ stdenv.mkDerivation rec {
# Patch dependencies that are usually loaded by url
substituteInPlace dependencies/lib-string_theory/builder/CMakeLists.txt.in \
--replace-fail ${stringTheory.url} file://${stringTheory}
substituteInPlace dependencies/lib-magic_enum/getter/CMakeLists.txt.in \
--replace-fail ${magicEnum.url} file://${magicEnum}
'';
strictDeps = true;
@@ -55,32 +65,35 @@ stdenv.mkDerivation rec {
buildInputs = [
SDL2
fltk
lua5_3
rapidjson
sol2
gtest
];
cargoRoot = "rust";
cargoDeps = rustPlatform.fetchCargoTarball {
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
pname
version
src
cargoRoot
;
hash = "sha256-zkctR16QIjCTiDmrhFqPPOThbPwsm0T0nlnCekkXNN8=";
hash = "sha256-5KZa5ocn6Q4qUeRmm7Tymgg09dr6aZoAuJvtF32CXNg=";
};
cmakeFlags = [
(lib.cmakeBool "FLTK_SKIP_FLUID" true) # otherwise `find_package(FLTK)` fails
(lib.cmakeBool "LOCAL_LUA_LIB" false)
(lib.cmakeBool "LOCAL_MINIAUDIO_LIB" false)
(lib.cmakeFeature "MINIAUDIO_INCLUDE_DIR" "${miniaudio}")
(lib.cmakeBool "LOCAL_RAPIDJSON_LIB" false)
(lib.cmakeBool "LOCAL_SOL_LIB" false)
(lib.cmakeBool "LOCAL_GTEST_LIB" false)
(lib.cmakeFeature "EXTRA_DATA_DIR" "${placeholder "out"}/share/ja2")
];
# error: 'uint64_t' does not name a type
# gcc13 and above don't automatically include cstdint
env.CXXFLAGS = "-include cstdint";
doInstallCheck = true;
installCheckPhase = ''