depot/third_party/nixpkgs/pkgs/development/python-modules/skytemple-rust/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

45 lines
1.1 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, cargo
, fetchPypi
, libiconv
, Foundation
, rustPlatform
, rustc
, setuptools-rust
, range-typed-integers
}:
buildPythonPackage rec {
pname = "skytemple-rust";
version = "1.6.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-Qg2KAzjSV7yQTpRHmNMkHRwOJSbfsgcdT0RHQru2lBI=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-ZJ5eYof9RZ07iP0YowIBorHuNUntQVW9JWcSVe2emig=";
};
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Foundation ];
nativeBuildInputs = [ setuptools-rust rustPlatform.cargoSetupHook cargo rustc ];
propagatedBuildInputs = [ range-typed-integers ];
GETTEXT_SYSTEM = true;
doCheck = false; # tests for this package are in skytemple-files package
pythonImportsCheck = [ "skytemple_rust" ];
meta = with lib; {
homepage = "https://github.com/SkyTemple/skytemple-rust";
description = "Binary Rust extensions for SkyTemple";
license = licenses.mit;
maintainers = with maintainers; [ xfix marius851000 ];
};
}