package.nix (1047B)
1 { 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 rio-mucho, 6 }: 7 8 python3Packages.buildPythonPackage (finalAttrs: { 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 = finalAttrs.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 dontCheckPythonMetadata = true; 39 40 doCheck = false; 41 42 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 43 44 pythonImportsCheck = [ "rio_color" ]; 45 46 meta = { 47 description = "Color correction plugin for rasterio"; 48 homepage = "https://github.com/mapbox/rio-color"; 49 license = lib.licenses.mit; 50 maintainers = [ lib.maintainers.sikmir ]; 51 }; 52 })
