2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libiconv
|
|
|
|
, Foundation
|
|
|
|
, rustPlatform
|
2023-04-29 16:46:19 +00:00
|
|
|
, setuptools-rust
|
|
|
|
, range-typed-integers
|
|
|
|
}:
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "skytemple-rust";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "1.4.0.post0";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SkyTemple";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = version;
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-aw57B15sDbMcdNPD8MW+O7AdqSSqjlOcuXNSm10GdPM=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-SvHrMr5k4afVdU5nvg+bcoHVmzHYyoOYqv7nOSVxRCE=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ];
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]);
|
2023-04-29 16:46:19 +00:00
|
|
|
propagatedBuildInputs = [ range-typed-integers ];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
GETTEXT_SYSTEM = true;
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
doCheck = false; # there are no tests
|
|
|
|
pythonImportsCheck = [ "skytemple_rust" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/SkyTemple/skytemple-rust";
|
|
|
|
description = "Binary Rust extensions for SkyTemple";
|
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ xfix marius851000 ];
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
}
|