From e3721159a3d5244439d00da75621c26f0792a452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 3 Nov 2025 12:50:44 -0800 Subject: [PATCH 1/2] marisa: 0.3.0 -> 0.3.1 Diff: https://github.com/s-yata/marisa-trie/compare/v0.3.0...v0.3.1 Changelog: https://github.com/s-yata/marisa-trie/releases/tag/v0.3.1 --- pkgs/by-name/ma/marisa/package.nix | 14 ++++++++++++-- pkgs/development/python-modules/marisa/default.nix | 7 ++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ma/marisa/package.nix b/pkgs/by-name/ma/marisa/package.nix index c325fe577d15..175aa1646a7a 100644 --- a/pkgs/by-name/ma/marisa/package.nix +++ b/pkgs/by-name/ma/marisa/package.nix @@ -2,20 +2,30 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, }: stdenv.mkDerivation (finalAttrs: { pname = "marisa"; - version = "0.3.0"; + version = "0.3.1"; src = fetchFromGitHub { owner = "s-yata"; repo = "marisa-trie"; tag = "v${finalAttrs.version}"; - hash = "sha256-XOXX0NuU+erL/KDAZgBeX+LKO9uSEOyP1/VuMDE5pi0="; + hash = "sha256-+rOmbvlcEBBsjUdWRrW9WN0MfhnSe7Gm3DOXfhtcSDc="; }; + patches = [ + # https://github.com/s-yata/marisa-trie/pull/123 + (fetchpatch { + name = "fix-binding-build.patch"; + url = "https://github.com/s-yata/marisa-trie/commit/cf4602f08df49861d987d122bd85bfdb456fe7a0.patch"; + hash = "sha256-h6+ixT63cHSpg3fhiLwJlxU296bD5YgfEaGqAHpm6+g="; + }) + ]; + enableParallelBuilding = true; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/python-modules/marisa/default.nix b/pkgs/development/python-modules/marisa/default.nix index 79bd8cc061ea..10d7a790ad21 100644 --- a/pkgs/development/python-modules/marisa/default.nix +++ b/pkgs/development/python-modules/marisa/default.nix @@ -2,13 +2,18 @@ lib, buildPythonPackage, marisa, + setuptools, swig, }: buildPythonPackage { pname = "marisa"; - format = "setuptools"; inherit (marisa) src version; + pyproject = true; + + patches = marisa.patches or [ ]; + + build-system = [ setuptools ]; nativeBuildInputs = [ swig ]; From 5792087ba6ea61836e7c74bce2d76309b3fbb55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 21 May 2026 08:53:57 -0700 Subject: [PATCH 2/2] python3Packages.marisa-trie: fix tests with marisa 0.3.1 --- pkgs/development/python-modules/marisa-trie/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/marisa-trie/default.nix b/pkgs/development/python-modules/marisa-trie/default.nix index e47cbef20291..4cce1653ace1 100644 --- a/pkgs/development/python-modules/marisa-trie/default.nix +++ b/pkgs/development/python-modules/marisa-trie/default.nix @@ -28,6 +28,12 @@ buildPythonPackage rec { }) ]; + postPatch = '' + # https://github.com/pytries/marisa-trie/issues/132 + substituteInPlace tests/test_binary_trie.py tests/test_trie.py \ + --replace-fail MARISA_FORMAT_ERROR std::runtime_error + ''; + build-system = [ cython setuptools