package.nix (991B)
1 { 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 rio-mucho, 6 }: 7 8 python3Packages.buildPythonPackage rec { 9 pname = "rio-color"; 10 version = "2.0.1"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "mapbox"; 15 repo = "rio-color"; 16 tag = version; 17 hash = "sha256-iJ+whIk3ANop8i712dLE0mJyDMHGnE0tic23H6f67Xg="; 18 }; 19 20 postPatch = '' 21 substituteInPlace pyproject.toml \ 22 --replace-fail "numpy==2.0.2" "numpy" \ 23 --replace-fail "cython==3.0.11" "cython" 24 ''; 25 26 build-system = with python3Packages; [ 27 setuptools 28 cython 29 numpy 30 ]; 31 32 dependencies = with python3Packages; [ 33 click 34 rasterio 35 rio-mucho 36 ]; 37 38 doCheck = false; 39 40 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 41 42 pythonImportsCheck = [ "rio_color" ]; 43 44 meta = { 45 description = "Color correction plugin for rasterio"; 46 homepage = "https://github.com/mapbox/rio-color"; 47 license = lib.licenses.mit; 48 maintainers = [ lib.maintainers.sikmir ]; 49 }; 50 }