1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 cargo, 6 fetchPypi, 7 libiconv, 8 Foundation, 9 rustPlatform, 10 rustc, 11 setuptools-rust, 12 range-typed-integers, 13}: 14 15buildPythonPackage rec { 16 pname = "skytemple-rust"; 17 version = "1.6.5"; 18 pyproject = true; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-bf+umrb5EIoCD2kheVpf9IwsW4Sf2hR7XOEzscYtLA8="; 23 }; 24 25 cargoDeps = rustPlatform.fetchCargoTarball { 26 inherit src; 27 name = "${pname}-${version}"; 28 hash = "sha256-0a57RmZPztcIeRs7GNYe18JO+LlWoeNWG3nD9cG0XIU="; 29 }; 30 31 buildInputs = lib.optionals stdenv.isDarwin [ 32 libiconv 33 Foundation 34 ]; 35 nativeBuildInputs = [ 36 setuptools-rust 37 rustPlatform.cargoSetupHook 38 cargo 39 rustc 40 ]; 41 propagatedBuildInputs = [ range-typed-integers ]; 42 43 GETTEXT_SYSTEM = true; 44 45 doCheck = false; # tests for this package are in skytemple-files package 46 pythonImportsCheck = [ "skytemple_rust" ]; 47 48 meta = with lib; { 49 homepage = "https://github.com/SkyTemple/skytemple-rust"; 50 description = "Binary Rust extensions for SkyTemple"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ marius851000 ]; 53 }; 54}