2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, buildPythonPackage, fetchPypi, six, cffi, nose }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cld2-cffi";
|
|
|
|
version = "0.1.4";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0rvcdx4fdh5yk4d2nlddq1q1r2r0xqp86hpmbdn447pdcj1r8a9s";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ six cffi ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nose ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# gcc doesn't approve of this code, so disable -Werror
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-w" + lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = "nosetests -v";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|