18 buildPythonPackage rec {
22 disabled = pythonOlder "3.6";
24 src = fetchFromGitHub {
25 owner = "GenericMappingTools";
27 rev = "refs/tags/v${version}";
28 sha256 = "sha256-Z38fZvmeWDLZEIyH+UG6Nb6KNnjEuXIn3RRH4CPWz9A=";
32 substituteInPlace pygmt/clib/loading.py \
33 --replace "env.get(\"GMT_LIBRARY_PATH\", \"\")" "env.get(\"GMT_LIBRARY_PATH\", \"${gmt}/lib\")"
36 nativeBuildInputs = [ setuptools-scm ];
37 propagatedBuildInputs = [ numpy netcdf4 pandas packaging xarray ];
39 doCheck = false; # the *entire* test suite requires network access
40 checkInputs = [ pytestCheckHook pytest-mpl ghostscript ipython ];
44 pythonImportsCheck = [ "pygmt" ];
47 description = "A Python interface for the Generic Mapping Tools";
48 homepage = "https://github.com/GenericMappingTools/pygmt";
49 license = licenses.bsd3;
50 # pygmt.exceptions.GMTCLibNotFoundError: Error loading the GMT shared library '/nix/store/r3xnnqgl89vrnq0kzxx0bmjwzks45mz8-gmt-6.1.1/lib/libgmt.dylib'
51 broken = stdenv.isDarwin;
52 maintainers = with maintainers; [ sikmir ];