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
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, pillow, pyres, nose
|
|
, preggy, numpy, yanc, nose-focus, mock, opencv }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "remotecv";
|
|
version = "2.2.2";
|
|
|
|
propagatedBuildInputs = [ pillow pyres ];
|
|
|
|
checkInputs = [ nose preggy numpy yanc nose-focus mock opencv ];
|
|
|
|
# PyPI tarball doesn't contain tests so let's use GitHub
|
|
src = fetchFromGitHub {
|
|
owner = "thumbor";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "0slalp1x626ajy2cbdfifhxf0ffzckqdz6siqsqr6s03hrl877hy";
|
|
};
|
|
|
|
# Remove unnecessary argparse dependency and some seemingly unnecessary
|
|
# version upper bounds because nixpkgs contains (or could contain) newer
|
|
# versions.
|
|
# See: https://github.com/thumbor/remotecv/issues/15
|
|
patches = [
|
|
./install_requires.patch
|
|
];
|
|
|
|
checkPhase = ''
|
|
nosetests --with-yanc -s tests/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "OpenCV worker for facial and feature recognition";
|
|
homepage = "https://github.com/thumbor/remotecv/wiki";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jluttine ];
|
|
broken = true; # no longer compatible with latest pillow
|
|
};
|
|
}
|