Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 84 lines 1.3 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, numpy 6, scipy 7, matplotlib 8, pandas 9, astropy 10, parfive 11, pythonOlder 12, sqlalchemy 13, scikitimage 14, glymur 15, beautifulsoup4 16, drms 17, python-dateutil 18, zeep 19, tqdm 20, asdf 21, astropy-helpers 22, hypothesis 23, pytest-astropy 24, pytestcov 25, pytest-mock 26}: 27 28buildPythonPackage rec { 29 pname = "sunpy"; 30 version = "1.0.6"; 31 disabled = pythonOlder "3.6"; 32 33 src = fetchFromGitHub { 34 owner = "sunpy"; 35 repo = pname; 36 rev = "v${version}"; 37 sha256 = "0j2yfhfxgi95rig8cfp9lvszb7694gq90jvs0xrb472hwnzgh2sk"; 38 }; 39 40 propagatedBuildInputs = [ 41 numpy 42 scipy 43 matplotlib 44 pandas 45 astropy 46 astropy-helpers 47 parfive 48 sqlalchemy 49 scikitimage 50 glymur 51 beautifulsoup4 52 drms 53 python-dateutil 54 zeep 55 tqdm 56 asdf 57 ]; 58 59 checkInputs = [ 60 hypothesis 61 pytest-astropy 62 pytestcov 63 pytest-mock 64 ]; 65 66 preBuild = '' 67 export SETUPTOOLS_SCM_PRETEND_VERSION="${version}" 68 export HOME=$(mktemp -d) 69 ''; 70 71 # darwin has write permission issues 72 doCheck = stdenv.isLinux; 73 # ignore documentation tests 74 checkPhase = '' 75 pytest sunpy -k 'not rst' 76 ''; 77 78 meta = with lib; { 79 description = "SunPy: Python for Solar Physics"; 80 homepage = https://sunpy.org; 81 license = licenses.bsd2; 82 maintainers = [ maintainers.costrouc ]; 83 }; 84}