summary refs log tree commit diff
path: root/pkgs/development/python-modules/cld2-cffi/default.nix
blob: a38d4c0866e05eca2d0b27d6dde082a8e7c85195 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ stdenv, buildPythonPackage, fetchPypi, six, cffi, nose }:

buildPythonPackage rec {
  pname = "cld2-cffi";
  version = "0.1.4";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0rvcdx4fdh5yk4d2nlddq1q1r2r0xqp86hpmbdn447pdcj1r8a9s";
  };

  propagatedBuildInputs = [ six cffi ];
  checkInputs = [ nose ];

  # gcc doesn't approve of this code, so disable -Werror
  NIX_CFLAGS_COMPILE = [ "-w" ] ++ stdenv.lib.optional stdenv.cc.isClang "-Wno-error=c++11-narrowing";

  checkPhase = "nosetests -v";

  meta = with stdenv.lib; {
    description = "CFFI bindings around Google Chromium's embedded compact language detection library (CLD2)";
    homepage = "https://github.com/GregBowyer/cld2-cffi";
    license = licenses.asl20;
    maintainers = with maintainers; [ rvl ];
  };
}