python3Packages.skytemple-rust: cleanup, fix for python>=3.14 (#485880)
This commit is contained in:
@@ -5,23 +5,33 @@
|
||||
cmake,
|
||||
}:
|
||||
|
||||
clangStdenv.mkDerivation rec {
|
||||
clangStdenv.mkDerivation (finalAttrs: {
|
||||
pname = "armips";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Kingcom";
|
||||
repo = "armips";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-L+Uxww/WtvDJn1xZqoqA6Pkzq/98sy1qTxZbv6eEjbA=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-L+Uxww/WtvDJn1xZqoqA6Pkzq/98sy1qTxZbv6eEjbA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail c++11 c++17 \
|
||||
--replace-fail "cmake_minimum_required(VERSION 2.8)" "cmake_minimum_required(VERSION 3.13)" # done by https://github.com/Kingcom/armips/commit/e1ed5bf0f4565250b98b0ddfb9112f15dc8e8e3b upstream, patch not directly compatible
|
||||
--replace-fail c++11 c++17
|
||||
''
|
||||
# done by https://github.com/Kingcom/armips/commit/e1ed5bf0f4565250b98b0ddfb9112f15dc8e8e3b upstream, patch not directly compatible
|
||||
+ ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
"cmake_minimum_required(VERSION 2.8)" \
|
||||
"cmake_minimum_required(VERSION 3.13)"
|
||||
'';
|
||||
|
||||
# Fix GCC 15 compatibility
|
||||
# error: unknown type name 'uint32_t'
|
||||
env.CXXFLAGS = "-include cstdint";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
installPhase = ''
|
||||
@@ -48,4 +58,4 @@ clangStdenv.mkDerivation rec {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ marius851000 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
cargo,
|
||||
fetchFromGitHub,
|
||||
libiconv,
|
||||
|
||||
# build-system
|
||||
setuptools-rust,
|
||||
|
||||
# nativeBuildInputs
|
||||
cargo,
|
||||
rustPlatform,
|
||||
rustc,
|
||||
setuptools-rust,
|
||||
|
||||
# dependencies
|
||||
range-typed-integers,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "skytemple-rust";
|
||||
version = "1.8.5";
|
||||
pyproject = true;
|
||||
@@ -19,35 +23,45 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "SkyTemple";
|
||||
repo = "skytemple-rust";
|
||||
rev = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-yJ78P00h4SITVuDnIh5IIlWkoed/VtIw3NB8ETB95bk=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit pname version src;
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-9OgUuuMuo2l4YsZMhBZJBqKqbNwj1W4yidoogjcNgm8=";
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libiconv
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
env = {
|
||||
GETTEXT_SYSTEM = true;
|
||||
|
||||
# Python 3.14 compatibility
|
||||
# error: the configured Python interpreter version (3.14) is newer than PyO3's maximum supported
|
||||
# version (3.13)
|
||||
PYO3_USE_ABI3_FORWARD_COMPATIBILITY = 1;
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools-rust
|
||||
rustPlatform.cargoSetupHook
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cargo
|
||||
rustPlatform.cargoSetupHook
|
||||
rustc
|
||||
];
|
||||
propagatedBuildInputs = [ range-typed-integers ];
|
||||
|
||||
GETTEXT_SYSTEM = true;
|
||||
dependencies = [
|
||||
range-typed-integers
|
||||
];
|
||||
|
||||
doCheck = false; # tests for this package are in skytemple-files package
|
||||
pythonImportsCheck = [ "skytemple_rust" ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/SkyTemple/skytemple-rust";
|
||||
description = "Binary Rust extensions for SkyTemple";
|
||||
homepage = "https://github.com/SkyTemple/skytemple-rust";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ marius851000 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
# dependencies
|
||||
range-typed-integers,
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "skytemple-ssb-emulator";
|
||||
version = "1.8.2";
|
||||
pyproject = true;
|
||||
@@ -35,15 +35,22 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "SkyTemple";
|
||||
repo = "skytemple-ssb-emulator";
|
||||
tag = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-zmLEvE96gkElTggcRG9fZDrJPLOXeNuSk49zXQAB69Y=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src pname;
|
||||
inherit (finalAttrs) src pname version;
|
||||
hash = "sha256-MSPqQmC70pq+sEM8zJrrFiz32dorOJxr2G/y2H4EUQI=";
|
||||
};
|
||||
|
||||
env = {
|
||||
# Python 3.14 compatibility
|
||||
# error: the configured Python interpreter version (3.14) is newer than PyO3's maximum supported
|
||||
# version (3.13)
|
||||
PYO3_USE_ABI3_FORWARD_COMPATIBILITY = 1;
|
||||
};
|
||||
|
||||
build-system = [
|
||||
meson
|
||||
setuptools
|
||||
@@ -81,4 +88,4 @@ buildPythonPackage rec {
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ marius851000 ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user