diff --git a/pkgs/development/python-modules/patiencediff/default.nix b/pkgs/development/python-modules/patiencediff/default.nix index e846d1ca75dc..405afb734533 100644 --- a/pkgs/development/python-modules/patiencediff/default.nix +++ b/pkgs/development/python-modules/patiencediff/default.nix @@ -2,23 +2,44 @@ lib, buildPythonPackage, fetchFromGitHub, + cargo, + rustPlatform, + rustc, setuptools, + setuptools-rust, pytestCheckHook, }: buildPythonPackage rec { pname = "patiencediff"; - version = "0.2.15"; + version = "0.2.18"; pyproject = true; src = fetchFromGitHub { owner = "breezy-team"; repo = "patiencediff"; tag = "v${version}"; - hash = "sha256-SFu1oN1yE9tKeBgWhgWjDpR31AptGrls0D5kKQed+HI="; + hash = "sha256-jwApncXyyc3m3XSsftaRNO/LeXIhdduaiBDm0KEDc98="; }; - nativeBuildInputs = [ setuptools ]; + cargoDeps = rustPlatform.fetchCargoVendor { + inherit pname version src; + hash = "sha256-GFVam/41RVziU7smtyI45unPe945OCLLQ0MqLqUK2JU="; + }; + + # make rust bindings non-optional + env.CIBUILDWHEEL = "1"; + + nativeBuildInputs = [ + cargo + rustPlatform.cargoSetupHook + rustc + ]; + + build-system = [ + setuptools + setuptools-rust + ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -28,7 +49,7 @@ buildPythonPackage rec { description = "C implementation of patiencediff algorithm for Python"; mainProgram = "patiencediff"; homepage = "https://github.com/breezy-team/patiencediff"; - changelog = "https://github.com/breezy-team/patiencediff/releases/tag/v${version}"; + changelog = "https://github.com/breezy-team/patiencediff/releases/tag/${src.tag}"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ wildsebastian ]; };