Merge pull request #202915 from dotlambda/libkkc-python3
This commit is contained in:
commit
0890509525
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, fetchurl, python2, libkkc }:
|
{ lib, stdenv, fetchurl, fetchpatch, python3, libkkc }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libkkc-data";
|
pname = "libkkc-data";
|
||||||
@ -9,7 +9,16 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "16avb50jasq2f1n9xyziky39dhlnlad0991pisk3s11hl1aqfrwy";
|
sha256 = "16avb50jasq2f1n9xyziky39dhlnlad0991pisk3s11hl1aqfrwy";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ python2.pkgs.marisa ];
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "build-python3.patch";
|
||||||
|
url = "https://github.com/ueno/libkkc/commit/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch";
|
||||||
|
relative = "data/templates/libkkc-data";
|
||||||
|
hash = "sha256-q4zUclJtDQ1E5v2PW00zRZz6GXllLUcp2h3tugufrRU=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ python3.pkgs.marisa ];
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
|
32
pkgs/development/python-modules/marisa/default.nix
Normal file
32
pkgs/development/python-modules/marisa/default.nix
Normal file
@ -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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
{ lib, stdenv, fetchurl
|
{ lib, stdenv, fetchurl, fetchpatch
|
||||||
, vala, gobject-introspection, intltool, python2Packages, glib
|
, vala, gobject-introspection, intltool, python3, glib
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, libgee, json-glib, marisa, libkkc-data
|
, libgee, json-glib, marisa, libkkc-data
|
||||||
}:
|
}:
|
||||||
@ -13,9 +13,17 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "89b07b042dae5726d306aaa1296d1695cb75c4516f4b4879bc3781fe52f62aef";
|
sha256 = "89b07b042dae5726d306aaa1296d1695cb75c4516f4b4879bc3781fe52f62aef";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "build-python3.patch";
|
||||||
|
url = "https://github.com/ueno/libkkc/commit/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch";
|
||||||
|
hash = "sha256-4IVpcJJFrxmxJGNiRHteleAa6trOwbvMHRTE/qyjOPY=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
vala gobject-introspection
|
vala gobject-introspection
|
||||||
python2Packages.python python2Packages.marisa
|
python3 python3.pkgs.marisa
|
||||||
intltool glib pkg-config
|
intltool glib pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -5535,6 +5535,10 @@ self: super: with self; {
|
|||||||
|
|
||||||
mariadb = callPackage ../development/python-modules/mariadb { };
|
mariadb = callPackage ../development/python-modules/mariadb { };
|
||||||
|
|
||||||
|
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 { };
|
||||||
|
|
||||||
markdown2 = callPackage ../development/python-modules/markdown2 { };
|
markdown2 = callPackage ../development/python-modules/markdown2 { };
|
||||||
|
Loading…
Reference in New Issue
Block a user