1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 7 # build-system 8 cython, 9 oldest-supported-numpy, 10 setuptools, 11 12 # dependencies 13 numpy, 14 15 # checks 16 colormath, 17 pytestCheckHook, 18}: 19 20buildPythonPackage rec { 21 pname = "color-operations"; 22 version = "0.2.0"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.9"; 26 27 src = fetchFromGitHub { 28 owner = "vincentsarago"; 29 repo = "color-operations"; 30 tag = version; 31 hash = "sha256-LUO9PxrXCkFqyguvX4GT6vmlALMyfkDqXeGZAQG76vw="; 32 }; 33 34 build-system = [ 35 cython 36 oldest-supported-numpy 37 setuptools 38 ]; 39 40 dependencies = [ numpy ]; 41 42 nativeCheckInputs = [ 43 colormath 44 pytestCheckHook 45 ]; 46 47 preCheck = '' 48 python setup.py build_ext --inplace 49 ''; 50 51 pythonImportsCheck = [ "color_operations" ]; 52 53 meta = { 54 description = "Apply basic color-oriented image operations. Fork of rio-color"; 55 homepage = "https://github.com/vincentsarago/color-operations"; 56 changelog = "https://github.com/vincentsarago/color-operations/releases/tag/${src.tag}"; 57 license = lib.licenses.mit; 58 teams = [ lib.teams.geospatial ]; 59 }; 60}