nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 click,
5 cython,
6 fetchFromGitHub,
7 jieba,
8 joblib,
9 lmdb,
10 marisa-trie,
11 mwparserfromhell,
12 numpy,
13 scipy,
14 setuptools,
15 tqdm,
16}:
17
18buildPythonPackage rec {
19 pname = "wikipedia2vec";
20 version = "2.0.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "wikipedia2vec";
25 repo = "wikipedia2vec";
26 tag = "v${version}";
27 hash = "sha256-vrBLlNm0bVIStSBWDHRCtuRpazu8JMCtBl4qJPtHGvU=";
28 };
29
30 nativeBuildInputs = [
31 cython
32 setuptools
33 ];
34
35 propagatedBuildInputs = [
36 click
37 cython
38 jieba
39 joblib
40 lmdb
41 marisa-trie
42 mwparserfromhell
43 numpy
44 scipy
45 tqdm
46 ];
47
48 preBuild = ''
49 bash cythonize.sh
50 '';
51
52 pythonImportsCheck = [ "wikipedia2vec" ];
53
54 meta = {
55 description = "Tool for learning vector representations of words and entities from Wikipedia";
56 mainProgram = "wikipedia2vec";
57 homepage = "https://wikipedia2vec.github.io/wikipedia2vec/";
58 changelog = "https://github.com/wikipedia2vec/wikipedia2vec/releases/tag/v${version}";
59 license = lib.licenses.asl20;
60 maintainers = with lib.maintainers; [ derdennisop ];
61 };
62}