Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 53 lines 928 B view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, dufte 5, matplotlib 6, numpy 7, pipdate 8, tqdm 9, rich 10, pytest 11, isPy27 12}: 13 14buildPythonPackage rec { 15 pname = "perfplot"; 16 version = "0.8.10"; 17 disabled = isPy27; 18 19 src = fetchFromGitHub { 20 owner = "nschloe"; 21 repo = "perfplot"; 22 rev = "v${version}"; 23 sha256 = "17xx33fk95fpkd8h2whblpwfls9vyqbv7anq34kpigjy8zxfi2qk"; 24 }; 25 format = "pyproject"; 26 27 propagatedBuildInputs = [ 28 dufte 29 matplotlib 30 numpy 31 pipdate 32 rich 33 tqdm 34 ]; 35 36 checkInputs = [ 37 pytest 38 ]; 39 40 checkPhase = '' 41 export HOME=$TMPDIR 42 mkdir -p $HOME/.matplotlib 43 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 44 pytest test/perfplot_test.py 45 ''; 46 47 meta = with lib; { 48 description = "Performance plots for Python code snippets"; 49 homepage = "https://github.com/nschloe/perfplot"; 50 license = licenses.mit; 51 maintainers = [ maintainers.costrouc ]; 52 }; 53}