From 54bca949c02977b9e2e39cdc41bbe69a6e6b7dc5 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 1 Feb 2026 09:35:52 +0000 Subject: [PATCH] python3Packages.skytemple-rust: cleanup --- .../python-modules/skytemple-rust/default.nix | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/skytemple-rust/default.nix b/pkgs/development/python-modules/skytemple-rust/default.nix index 5bbb8c5eb498..aee9d1b0aaca 100644 --- a/pkgs/development/python-modules/skytemple-rust/default.nix +++ b/pkgs/development/python-modules/skytemple-rust/default.nix @@ -1,17 +1,21 @@ { lib, - stdenv, buildPythonPackage, - cargo, fetchFromGitHub, - libiconv, + + # build-system + setuptools-rust, + + # nativeBuildInputs + cargo, rustPlatform, rustc, - setuptools-rust, + + # dependencies range-typed-integers, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "skytemple-rust"; version = "1.8.5"; pyproject = true; @@ -19,35 +23,38 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "SkyTemple"; repo = "skytemple-rust"; - rev = version; + tag = finalAttrs.version; hash = "sha256-yJ78P00h4SITVuDnIh5IIlWkoed/VtIw3NB8ETB95bk="; }; cargoDeps = rustPlatform.fetchCargoVendor { - inherit pname version src; + inherit (finalAttrs) pname version src; hash = "sha256-9OgUuuMuo2l4YsZMhBZJBqKqbNwj1W4yidoogjcNgm8="; }; - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - libiconv - ]; - nativeBuildInputs = [ + env.GETTEXT_SYSTEM = true; + + build-system = [ setuptools-rust - rustPlatform.cargoSetupHook + ]; + + nativeBuildInputs = [ cargo + rustPlatform.cargoSetupHook rustc ]; - propagatedBuildInputs = [ range-typed-integers ]; - GETTEXT_SYSTEM = true; + dependencies = [ + range-typed-integers + ]; doCheck = false; # tests for this package are in skytemple-files package pythonImportsCheck = [ "skytemple_rust" ]; meta = { - homepage = "https://github.com/SkyTemple/skytemple-rust"; description = "Binary Rust extensions for SkyTemple"; + homepage = "https://github.com/SkyTemple/skytemple-rust"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ marius851000 ]; }; -} +})