1{ lib, fetchPypi, buildPythonPackage 2, fetchpatch, configobj, six, traitsui 3, pytestCheckHook, tables, pandas 4, pythonOlder, importlib-resources 5}: 6 7buildPythonPackage rec { 8 pname = "apptools"; 9 version = "5.1.0"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "12x5lcs1cllpybz7f0i1lcwvmqsaa5n818wb2165lj049wqxx4yh"; 14 }; 15 16 patches = [ 17 # python39: importlib_resources -> importlib.resources. This patch will be included 18 # in the next release after 5.1.0. 19 (fetchpatch { 20 url = "https://github.com/enthought/apptools/commit/0ae4f52f19a8c0ca9d7926e17c7de949097f24b4.patch"; 21 sha256 = "165aiwjisr5c3lasg7xblcha7y1y5bq23vi3g9gc80c24bzwcbsw"; 22 }) 23 ]; 24 25 propagatedBuildInputs = [ 26 configobj 27 six 28 traitsui 29 ] ++ lib.optionals (pythonOlder "3.9") [ 30 importlib-resources 31 ]; 32 33 checkInputs = [ 34 tables 35 pandas 36 pytestCheckHook 37 ]; 38 39 preCheck = '' 40 export HOME=$TMP 41 ''; 42 43 meta = with lib; { 44 description = "Set of packages that Enthought has found useful in creating a number of applications."; 45 homepage = "https://github.com/enthought/apptools"; 46 maintainers = with maintainers; [ knedlsepp ]; 47 license = licenses.bsdOriginal; 48 }; 49}