diff --git a/pkgs/development/python-modules/marisa/default.nix b/pkgs/development/python-modules/marisa/default.nix new file mode 100644 index 000000000000..21a457b5b34e --- /dev/null +++ b/pkgs/development/python-modules/marisa/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, marisa +, swig +}: + +buildPythonPackage rec { + pname = "marisa"; + inherit (marisa) src version; + + nativeBuildInputs = [ swig ]; + + buildInputs = [ marisa ]; + + preBuild = '' + make -C bindings swig-python + + cd bindings/python + ''; + + # upstream has no tests + doCheck = false; + + pythonImportsCheck = [ "marisa" ]; + + meta = { + description = "Python bindings for marisa"; + homepage = "https://github.com/s-yata/marisa-trie"; + license = with lib.licenses; [ bsd2 lgpl21Plus ]; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5dcbcdf5abb3..98dd267fa44f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5535,6 +5535,10 @@ self: super: with self; { mariadb = callPackage ../development/python-modules/mariadb { }; + marisa = callPackage ../development/python-modules/marisa { + inherit (pkgs) marisa; + }; + marisa-trie = callPackage ../development/python-modules/marisa-trie { }; markdown2 = callPackage ../development/python-modules/markdown2 { };