at master 2.0 kB view raw
1{ 2 lib, 3 fetchurl, 4 buildPythonPackage, 5 pythonAtLeast, 6 7 pkg-config, 8 9 enlightenment, 10 11 packaging, 12 setuptools, 13 14 dbus-python, 15 16 pytestCheckHook, 17 18 directoryListingUpdater, 19}: 20 21# Should be bumped along with EFL! 22 23buildPythonPackage rec { 24 pname = "python-efl"; 25 version = "1.26.1"; 26 pyproject = true; 27 28 # As of 1.26.1, native extensions fail to build with python 3.13+ 29 disabled = pythonAtLeast "3.13"; 30 31 src = fetchurl { 32 url = "http://download.enlightenment.org/rel/bindings/python/python-efl-${version}.tar.xz"; 33 hash = "sha256-3Ns5fhIHihnpDYDnxvPP00WIZL/o1UWLzgNott4GKNc="; 34 }; 35 36 nativeBuildInputs = [ pkg-config ]; 37 38 buildInputs = [ enlightenment.efl ]; 39 40 build-system = [ 41 packaging 42 setuptools 43 ]; 44 45 dependencies = [ 46 dbus-python 47 ]; 48 49 preConfigure = '' 50 NIX_CFLAGS_COMPILE="$(pkg-config --cflags efl evas) $NIX_CFLAGS_COMPILE" 51 ''; 52 53 nativeCheckInputs = [ 54 pytestCheckHook 55 ]; 56 57 preCheck = '' 58 # make sure we load the library from $out instead of the cwd 59 # because cwd doesn't contain the built extensions 60 rm -r efl/ 61 62 patchShebangs tests/ecore/exe_helper.sh 63 64 # use the new name instead of the removed alias 65 substituteInPlace tests/evas/test_01_rect.py \ 66 --replace-fail ".assert_(" ".assertTrue(" 67 ''; 68 69 enabledTestPaths = [ "tests/" ]; 70 71 disabledTestPaths = [ 72 "tests/dbus/test_01_basics.py" # needs dbus daemon 73 "tests/ecore/test_09_file_download.py" # uses network 74 "tests/ecore/test_11_con.py" # uses network 75 "tests/elementary/test_02_image_icon.py" # RuntimeWarning: Setting standard icon failed 76 ]; 77 78 passthru.updateScript = directoryListingUpdater { }; 79 80 meta = with lib; { 81 description = "Python bindings for Enlightenment Foundation Libraries"; 82 homepage = "https://github.com/DaveMDS/python-efl"; 83 platforms = platforms.linux; 84 license = with licenses; [ 85 gpl3 86 lgpl3 87 ]; 88 maintainers = with maintainers; [ 89 matejc 90 ftrvxmtrx 91 ]; 92 teams = [ teams.enlightenment ]; 93 }; 94}