1{ lib, stdenv, buildPythonPackage, fetchPypi, six, cffi, nose }: 2 3buildPythonPackage rec { 4 pname = "cld2-cffi"; 5 version = "0.1.4"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "0rvcdx4fdh5yk4d2nlddq1q1r2r0xqp86hpmbdn447pdcj1r8a9s"; 10 }; 11 12 propagatedBuildInputs = [ six cffi ]; 13 nativeCheckInputs = [ nose ]; 14 15 # gcc doesn't approve of this code, so disable -Werror 16 env.NIX_CFLAGS_COMPILE = "-w" + lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing"; 17 18 checkPhase = "nosetests -v"; 19 20 meta = with lib; { 21 description = "CFFI bindings around Google Chromium's embedded compact language detection library (CLD2)"; 22 homepage = "https://github.com/GregBowyer/cld2-cffi"; 23 license = licenses.asl20; 24 maintainers = with maintainers; [ rvl ]; 25 }; 26}