1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build system
7 flit,
8
9 # dependencies
10 pystac,
11 rasterio,
12
13 # test
14 jsonschema,
15 pytestCheckHook,
16 versionCheckHook,
17}:
18
19buildPythonPackage rec {
20 pname = "rio-stac";
21 version = "0.12.0";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "developmentseed";
26 repo = "rio-stac";
27 tag = version;
28 hash = "sha256-ynpyRYKHHvyoVFU/BgnHPrvRzixXNNw9oOQiOKxSjiI=";
29 };
30
31 build-system = [ flit ];
32
33 dependencies = [
34 pystac
35 rasterio
36 ];
37
38 nativeCheckInputs = [
39 jsonschema
40 pytestCheckHook
41 ];
42
43 pythonImportsCheck = [ "rio_stac" ];
44
45 disabledTests = [
46 # urllib url open error
47 "test_create_item"
48 ];
49
50 # the build should should also generate a program for cli, but nothing is installed in $out/bin
51 # related comment: https://github.com/NixOS/nixpkgs/pull/392056#issuecomment-2751934248
52 meta = {
53 description = "Create STAC Items from raster datasets";
54 homepage = "https://github.com/developmentseed/rio-stac";
55 changelog = "https://github.com/developmentseed/rio-stac/releases/tag/${src.tag}";
56 license = lib.licenses.mit;
57 maintainers = with lib.maintainers; [ daspk04 ];
58 };
59}