Skip to content

Commit

Permalink
pkgs: add pystac package
Browse files Browse the repository at this point in the history
  • Loading branch information
imincik committed Aug 26, 2024
1 parent b35e422 commit f032f1b
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@
withSerialPort = true;
};

pystac = py.pkgs.callPackage ./pkgs/pystac { };

rasterio = py.pkgs.callPackage ./pkgs/rasterio {
inherit gdal shapely;
};
Expand All @@ -171,6 +173,7 @@
pyogrio
pyproj
pyqt5
pystac
rasterio
shapely
];
Expand Down
10 changes: 10 additions & 0 deletions overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ rec {

pyqt5 = geopkgs."${pythonVersion}-pyqt5"; # nothing to override here

#####################################################################
### PYTHON3-PYSTAC
#####################################################################

pystac = (geopkgs."${pythonVersion}-pystac".overrideAttrs (old: {

# >>> CUSTOMIZE HERE

})).override { };

#####################################################################
### PYTHON3-RASTERIO
#####################################################################
Expand Down
53 changes: 53 additions & 0 deletions pkgs/pystac/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,

html5lib,
jsonschema,
pytest-cov,
pytest-mock,
pytest-recording,
python-dateutil,
requests-mock,
setuptools,
}:

buildPythonPackage rec {
pname = "pystac";
version = "1.10.1";
pyproject = true;
disabled = pythonOlder "3.9";

src = fetchFromGitHub {
owner = "stac-utils";
repo = "pystac";
rev = "v${version}";
hash = "sha256-zJGDhKRX50Muo1YDEzfwypMLISnYBYKkPvUULYkUf68=";
};

build-system = [ setuptools ];

propagatedBuildInputs = [ python-dateutil ];

nativeCheckInputs = [
html5lib
jsonschema
pytestCheckHook
pytest-cov
pytest-mock
pytest-recording
requests-mock
];

pythonImportsCheck = [ "pystac" ];

meta = {
description = "Python library for working with any SpatioTemporal Asset Catalog (STAC)";
homepage = "https://github.com/stac-utils/pystac";
license = lib.licenses.asl20;
maintainers = lib.teams.geospatial.members;
};
}
1 change: 1 addition & 0 deletions pkgs/pystac/nixpkgs/files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkgs/development/python-modules/pystac/* pkgs/pystac/

0 comments on commit f032f1b

Please sign in to comment.