nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, buildPythonPackage, fetchPypi, tinycss2, pytest, pytestrunner }:
2
3buildPythonPackage rec {
4 pname = "cssselect2";
5 version = "0.2.2";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h";
10 };
11
12 # We're not interested in code quality tests
13 postPatch = ''
14 substituteInPlace setup.py \
15 --replace "pytest-cov" "" \
16 --replace "pytest-flake8" "" \
17 --replace "pytest-isort" ""
18 substituteInPlace setup.cfg \
19 --replace "--cov=cssselect2" "" \
20 --replace "--flake8" "" \
21 --replace "--isort" ""
22 '';
23
24 propagatedBuildInputs = [ tinycss2 ];
25
26 checkInputs = [ pytest pytestrunner ];
27
28 meta = with lib; {
29 description = "CSS selectors for Python ElementTree";
30 homepage = https://github.com/Kozea/cssselect2;
31 license = licenses.bsd3;
32 };
33}