1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 cargo, 6 fetchFromGitHub, 7 libiconv, 8 rustPlatform, 9 rustc, 10 setuptools-rust, 11 range-typed-integers, 12}: 13 14buildPythonPackage rec { 15 pname = "skytemple-rust"; 16 version = "1.8.5"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "SkyTemple"; 21 repo = "skytemple-rust"; 22 rev = version; 23 hash = "sha256-yJ78P00h4SITVuDnIh5IIlWkoed/VtIw3NB8ETB95bk="; 24 }; 25 26 cargoDeps = rustPlatform.fetchCargoVendor { 27 inherit src; 28 name = "${pname}-${version}"; 29 hash = "sha256-9OgUuuMuo2l4YsZMhBZJBqKqbNwj1W4yidoogjcNgm8="; 30 }; 31 32 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 33 libiconv 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}