2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libiconv
|
|
|
|
, Foundation
|
|
|
|
, rustPlatform
|
|
|
|
, setuptools-rust }:
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "skytemple-rust";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.3.7";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SkyTemple";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-rC7KA79va8gZpMKJQ7s3xYdbopNqmWdRYDCbaWaxsR0=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-lXPCxRbaqUC5EfyeBPtJDuGADYOA+DWMaOZRwXppP8E=";
|
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 ]);
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|