nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 cython,
7}:
8
9buildPythonPackage rec {
10 pname = "python-crfsuite";
11 version = "0.9.12";
12 format = "setuptools";
13
14 src = fetchPypi {
15 inherit version;
16 pname = "python_crfsuite";
17 hash = "sha256-2zf8zDvY8MScKKdpfKecidZ7P9W/EZEihmFpJArExIA=";
18 };
19
20 preCheck = ''
21 # make sure import the built version, not the source one
22 rm -r pycrfsuite
23 '';
24
25 build-system = [
26 cython
27 ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pythonImportsCheck = [ "pycrfsuite" ];
32
33 meta = {
34 description = "Python binding for CRFsuite";
35 homepage = "https://github.com/scrapinghub/python-crfsuite";
36 changelog = "https://github.com/scrapinghub/python-crfsuite/blob/${version}/CHANGES.rst";
37 license = lib.licenses.mit;
38 teams = [ lib.teams.tts ];
39 };
40}