Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 71 lines 1.4 kB view raw
1{ 2 lib, 3 pythonOlder, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools-scm, 7 gmt, 8 numpy, 9 netcdf4, 10 pandas, 11 packaging, 12 xarray, 13 pytest-mpl, 14 ipython, 15 ghostscript, 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "pygmt"; 21 version = "0.13.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.9"; 25 26 src = fetchFromGitHub { 27 owner = "GenericMappingTools"; 28 repo = "pygmt"; 29 rev = "refs/tags/v${version}"; 30 hash = "sha256-DO9KUlmt5EV+ioOSQ/BOcx4pP409f94dzmFwqK2MwMY="; 31 }; 32 33 postPatch = '' 34 substituteInPlace pygmt/clib/loading.py \ 35 --replace-fail "env.get(\"GMT_LIBRARY_PATH\")" "env.get(\"GMT_LIBRARY_PATH\", \"${gmt}/lib\")" 36 ''; 37 38 nativeBuildInputs = [ setuptools-scm ]; 39 40 propagatedBuildInputs = [ 41 numpy 42 netcdf4 43 pandas 44 packaging 45 xarray 46 ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 pytest-mpl 51 ghostscript 52 ipython 53 ]; 54 55 # The *entire* test suite requires network access 56 doCheck = false; 57 58 postBuild = '' 59 export HOME=$TMP 60 ''; 61 62 pythonImportsCheck = [ "pygmt" ]; 63 64 meta = with lib; { 65 description = "Python interface for the Generic Mapping Tools"; 66 homepage = "https://github.com/GenericMappingTools/pygmt"; 67 license = licenses.bsd3; 68 changelog = "https://github.com/GenericMappingTools/pygmt/releases/tag/v${version}"; 69 maintainers = with maintainers; teams.geospatial.members; 70 }; 71}