diff --git a/pkgs/by-name/li/libkkc/package.nix b/pkgs/by-name/li/libkkc/package.nix index a329b39739de..5184abc5333c 100644 --- a/pkgs/by-name/li/libkkc/package.nix +++ b/pkgs/by-name/li/libkkc/package.nix @@ -58,6 +58,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { + broken = true; description = "Japanese Kana Kanji conversion input method library"; homepage = "https://github.com/ueno/libkkc"; license = licenses.gpl3Plus; diff --git a/pkgs/by-name/ma/marisa/package.nix b/pkgs/by-name/ma/marisa/package.nix index 4f754de872b5..027f3220b89d 100644 --- a/pkgs/by-name/ma/marisa/package.nix +++ b/pkgs/by-name/ma/marisa/package.nix @@ -2,26 +2,27 @@ lib, stdenv, fetchFromGitHub, - autoreconfHook, + cmake, }: stdenv.mkDerivation rec { pname = "marisa"; - version = "0.2.7"; + version = "0.3.0"; src = fetchFromGitHub { owner = "s-yata"; repo = "marisa-trie"; - rev = "v${version}"; - sha256 = "sha256-+OGtDbwl7ar3i65POkTGyC4AYkOT4YuASfdt5FGJ8yM="; + tag = "v${version}"; + hash = "sha256-XOXX0NuU+erL/KDAZgBeX+LKO9uSEOyP1/VuMDE5pi0="; }; enableParallelBuilding = true; - nativeBuildInputs = [ autoreconfHook ]; + nativeBuildInputs = [ cmake ]; meta = with lib; { homepage = "https://github.com/s-yata/marisa-trie"; + changelog = "https://github.com/s-yata/marisa-trie/releases/tag/${src.tag}"; description = "Static and space-efficient trie data structure library"; license = licenses.bsd3; maintainers = with maintainers; [ sifmelcara ]; diff --git a/pkgs/development/python-modules/marisa-trie/default.nix b/pkgs/development/python-modules/marisa-trie/default.nix index 43fdeb62c572..c7a9c123b044 100644 --- a/pkgs/development/python-modules/marisa-trie/default.nix +++ b/pkgs/development/python-modules/marisa-trie/default.nix @@ -1,13 +1,13 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + replaceVars, + marisa-cpp, cython, setuptools, pytestCheckHook, hypothesis, - readme-renderer, - pythonOlder, }: buildPythonPackage rec { @@ -15,29 +15,32 @@ buildPythonPackage rec { version = "1.2.1"; pyproject = true; - disabled = pythonOlder "3.7"; - - src = fetchPypi { - pname = "marisa_trie"; - inherit version; - hash = "sha256-OifECOKu/APg8dJbL/KvuFqsNWj2+iripTtXouh84p0="; + src = fetchFromGitHub { + owner = "pytries"; + repo = "marisa-trie"; + tag = version; + hash = "sha256-aWfm13nrASAaD+bcMpv85emXnCFyVtZTdhl79yJuOss="; }; + patches = [ + (replaceVars ./unvendor-marisa.patch { + marisa = lib.getDev marisa-cpp; + }) + ]; + build-system = [ cython setuptools ]; - nativeCheckInputs = [ - pytestCheckHook - readme-renderer - hypothesis + buildInputs = [ + marisa-cpp ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "hypothesis==" "hypothesis>=" - ''; + nativeCheckInputs = [ + pytestCheckHook + hypothesis + ]; preBuild = '' ./update_cpp.sh @@ -48,15 +51,6 @@ buildPythonPackage rec { "tests/test_packaging.py" ]; - disabledTests = [ - # Pins hypothesis==2.0.0 from 2016/01 which complains about - # hypothesis.errors.FailedHealthCheck: tests/test_trie.py::[...] uses - # the 'tmpdir' fixture, which is reset between function calls but not - # between test cases generated by `@given(...)`. - "test_saveload" - "test_mmap" - ]; - pythonImportsCheck = [ "marisa_trie" ]; meta = with lib; { @@ -66,7 +60,7 @@ buildPythonPackage rec { This package provides alternative Cython-based pip-installable Python bindings. ''; homepage = "https://github.com/kmike/marisa-trie"; - changelog = "https://github.com/pytries/marisa-trie/blob/${version}/CHANGES.rst"; + changelog = "https://github.com/pytries/marisa-trie/blob/${src.tag}/CHANGES.rst"; license = licenses.mit; }; } diff --git a/pkgs/development/python-modules/marisa-trie/unvendor-marisa.patch b/pkgs/development/python-modules/marisa-trie/unvendor-marisa.patch new file mode 100644 index 000000000000..26ac8156a06b --- /dev/null +++ b/pkgs/development/python-modules/marisa-trie/unvendor-marisa.patch @@ -0,0 +1,30 @@ +diff --git a/setup.py b/setup.py +index c0c5c03..6373a2a 100755 +--- a/setup.py ++++ b/setup.py +@@ -71,15 +71,6 @@ setup( + license=LICENSE, + url="https://github.com/pytries/marisa-trie", + classifiers=CLASSIFIERS, +- libraries=[ +- ( +- "libmarisa-trie", +- { +- "sources": MARISA_FILES, +- "include_dirs": [MARISA_SOURCE_DIR, MARISA_INCLUDE_DIR], +- }, +- ) +- ], + ext_modules=[ + Extension( + "marisa_trie", +@@ -94,7 +85,8 @@ setup( + "src/std_iostream.cpp", + "src/trie.cpp", + ], +- include_dirs=[MARISA_INCLUDE_DIR], ++ include_dirs=["@marisa@/include"], ++ libraries=["marisa"], + ) + ], + python_requires=">=3.8", diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8b0d69c547fe..29d397056b9c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8553,7 +8553,9 @@ self: super: with self; { marisa = callPackage ../development/python-modules/marisa { inherit (pkgs) marisa; }; - marisa-trie = callPackage ../development/python-modules/marisa-trie { }; + marisa-trie = callPackage ../development/python-modules/marisa-trie { + marisa-cpp = pkgs.marisa; + }; markdown = callPackage ../development/python-modules/markdown { };