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-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 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 ];