nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPyPy
5, pytestCheckHook
6, toolz
7, python
8, isPy27
9}:
10
11buildPythonPackage rec {
12 pname = "cytoolz";
13 version = "0.11.2";
14 disabled = isPy27 || isPyPy;
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "ea23663153806edddce7e4153d1d407d62357c05120a4e8485bddf1bd5ab22b4";
19 };
20
21 propagatedBuildInputs = [ toolz ];
22
23 # tests are located in cytoolz/tests, however we can't import cytoolz
24 # from $PWD, as it will break relative imports
25 preCheck = ''
26 cd cytoolz
27 export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
28 '';
29
30 checkInputs = [ pytestCheckHook ];
31
32 meta = {
33 homepage = "https://github.com/pytoolz/cytoolz/";
34 description = "Cython implementation of Toolz: High performance functional utilities";
35 license = "licenses.bsd3";
36 maintainers = with lib.maintainers; [ fridh ];
37 };
38}