nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 click,
11
12 # tests
13 hypothesis,
14 pytestCheckHook,
15 versionCheckHook,
16}:
17
18buildPythonPackage rec {
19 pname = "mercantile";
20 version = "1.2.1";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "mapbox";
25 repo = "mercantile";
26 tag = version;
27 hash = "sha256-DiDXO2XnD3We6NhP81z7aIHzHrHDi/nkqy98OT9986w=";
28 };
29
30 build-system = [
31 setuptools
32 ];
33
34 dependencies = [
35 click
36 ];
37
38 nativeCheckInputs = [
39 hypothesis
40 pytestCheckHook
41 versionCheckHook
42 ];
43
44 disabledTests = [
45 # AssertionError CLI exists with non-zero error code
46 # This is a regression introduced by https://github.com/NixOS/nixpkgs/pull/448189
47 "test_cli_bounding_tile"
48 "test_cli_bounding_tile2"
49 "test_cli_bounding_tile_bbox"
50 "test_cli_bounding_tile_geosjon"
51 "test_cli_children"
52 "test_cli_multi_bounding_tile"
53 "test_cli_multi_bounding_tile_seq"
54 "test_cli_neighbors"
55 "test_cli_parent"
56 "test_cli_parent_depth"
57 "test_cli_parent_failure"
58 "test_cli_parent_multidepth"
59 "test_cli_quadkey_from_mixed"
60 "test_cli_quadkey_from_quadkeys"
61 "test_cli_quadkey_from_tiles"
62 "test_cli_shapes"
63 "test_cli_shapes_collect"
64 "test_cli_shapes_compact"
65 "test_cli_shapes_failure"
66 "test_cli_shapes_indentation"
67 "test_cli_strict_overlap_contain"
68 "test_cli_tiles_bad_bounds"
69 "test_cli_tiles_bounding_tiles_seq"
70 "test_cli_tiles_bounding_tiles_z0"
71 "test_cli_tiles_geosjon"
72 "test_cli_tiles_implicit_stdin"
73 "test_cli_tiles_multi_bounds"
74 "test_cli_tiles_multi_bounds_seq"
75 "test_cli_tiles_no_bounds"
76 "test_cli_tiles_point_geojson"
77 "test_cli_tiles_points"
78 "test_cli_tiles_seq"
79 ];
80
81 meta = {
82 description = "Spherical mercator tile and coordinate utilities";
83 mainProgram = "mercantile";
84 homepage = "https://github.com/mapbox/mercantile";
85 changelog = "https://github.com/mapbox/mercantile/blob/${version}/CHANGES.txt";
86 license = lib.licenses.bsd3;
87 maintainers = with lib.maintainers; [ sikmir ];
88 };
89}