diff --git a/pkgs/development/python-modules/rio-stac/default.nix b/pkgs/development/python-modules/rio-stac/default.nix new file mode 100644 index 000000000000..7d5590a3eb33 --- /dev/null +++ b/pkgs/development/python-modules/rio-stac/default.nix @@ -0,0 +1,59 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build system + flit, + + # dependencies + pystac, + rasterio, + + # test + jsonschema, + pytestCheckHook, + versionCheckHook, +}: + +buildPythonPackage rec { + pname = "rio-stac"; + version = "0.10.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "developmentseed"; + repo = "rio-stac"; + tag = version; + hash = "sha256-sK03AWDwsUanxl756z/MrroF3cm7hV3dpPhVQ/1cs3E="; + }; + + build-system = [ flit ]; + + dependencies = [ + pystac + rasterio + ]; + + nativeCheckInputs = [ + jsonschema + pytestCheckHook + ]; + + pythonImportsCheck = [ "rio_stac" ]; + + disabledTests = [ + # urllib url open error + "test_create_item" + ]; + + # the build should should also generate a program for cli, but nothing is installed in $out/bin + # related comment: https://github.com/NixOS/nixpkgs/pull/392056#issuecomment-2751934248 + meta = { + description = "Create STAC Items from raster datasets"; + homepage = "https://github.com/developmentseed/rio-stac"; + changelog = "https://github.com/developmentseed/rio-stac/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ daspk04 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7543f3ec1f8c..614f17bd477d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15633,6 +15633,8 @@ self: super: with self; { ring-doorbell = callPackage ../development/python-modules/ring-doorbell { }; + rio-stac = callPackage ../development/python-modules/rio-stac { }; + rio-tiler = callPackage ../development/python-modules/rio-tiler { }; rioxarray = callPackage ../development/python-modules/rioxarray { };