2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2024-01-02 11:29:13 +00:00
|
|
|
, fetchPypi
|
2022-05-18 14:49:53 +00:00
|
|
|
, libiconv
|
|
|
|
, Foundation
|
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.6.1";
|
|
|
|
pyproject = true;
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-Qg2KAzjSV7yQTpRHmNMkHRwOJSbfsgcdT0RHQru2lBI=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-ZJ5eYof9RZ07iP0YowIBorHuNUntQVW9JWcSVe2emig=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ];
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo 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;
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
doCheck = false; # tests for this package are in skytemple-files package
|
2021-06-04 09:07:49 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|