Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pytestCheckHook, 5 fetchFromGitHub, 6 fetchpatch, 7 pythonOlder, 8 setuptools-scm, 9 setuptools, 10 fast-histogram, 11 matplotlib, 12 numpy, 13 wheel, 14 pytest-mpl, 15}: 16 17buildPythonPackage rec { 18 pname = "mpl-scatter-density"; 19 version = "0.7"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.6"; 23 24 src = fetchFromGitHub { 25 owner = "astrofrog"; 26 repo = pname; 27 rev = "refs/tags/v${version}"; 28 sha256 = "sha256-MMxM+iv5p9ZLcBpqa3tBBPbsMM/PTg6BXaDpGgSw+DE="; 29 }; 30 31 patches = [ 32 # https://github.com/astrofrog/mpl-scatter-density/pull/37 33 (fetchpatch { 34 name = "distutils-removal.patch"; 35 url = "https://github.com/ifurther/mpl-scatter-density/commit/6feedabe1e82da67d8eec46a80eb370d9f334251.patch"; 36 sha256 = "sha256-JqWlSm8mIwqjRPa+kMEaKipJyzGEO+gJK+Q045N1MXA="; 37 }) 38 ]; 39 40 nativeBuildInputs = [ 41 setuptools 42 setuptools-scm 43 wheel 44 ]; 45 46 propagatedBuildInputs = [ 47 matplotlib 48 numpy 49 fast-histogram 50 ]; 51 52 nativeCheckInputs = [ 53 pytestCheckHook 54 pytest-mpl 55 ]; 56 57 disabledTests = [ 58 # AssertionError: (240, 240) != (216, 216) 59 # Erroneous pinning of figure DPI, sensitive to runtime environment 60 "test_default_dpi" 61 ]; 62 63 pythonImportsCheck = [ "mpl_scatter_density" ]; 64 65 meta = with lib; { 66 homepage = "https://github.com/astrofrog/mpl-scatter-density"; 67 description = "Fast scatter density plots for Matplotlib"; 68 license = licenses.bsd2; 69 maintainers = with maintainers; [ ifurther ]; 70 }; 71}