4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
27 lines
792 B
Nix
27 lines
792 B
Nix
{ lib, 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.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing";
|
|
|
|
checkPhase = "nosetests -v";
|
|
|
|
meta = with 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 ];
|
|
};
|
|
}
|