at master 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 setuptools, 7 setuptools-scm, 8 autoPatchelfHook, 9 udev, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "libuuu"; 15 version = "1.5.233"; 16 pyproject = true; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-SbnQs+khNT1DwrctwHi0rsuO1WR/KgA7TUFARw9AHAU="; 21 }; 22 23 build-system = [ 24 setuptools 25 setuptools-scm 26 ]; 27 28 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ 29 autoPatchelfHook 30 ]; 31 32 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ 33 udev 34 ]; 35 36 pythonRelaxDeps = [ 37 "setuptools-scm" 38 ]; 39 40 dependencies = [ 41 setuptools-scm 42 ]; 43 44 pythonImportsCheck = [ 45 "libuuu" 46 ]; 47 48 # Prevent tests to load the plugin from the source files instead of the installed ones 49 preCheck = '' 50 rm -rf libuuu 51 ''; 52 53 nativeCheckInputs = [ 54 pytestCheckHook 55 ]; 56 57 meta = { 58 description = "Python wrapper for libuuu"; 59 homepage = "https://github.com/nxp-imx/mfgtools/tree/master/wrapper"; 60 license = lib.licenses.bsd3; 61 maintainers = with lib.maintainers; [ GaetanLepage ]; 62 badPlatforms = [ 63 # The pypi archive does not contain the pre-built library for these platforms 64 "aarch64-linux" 65 "x86_64-darwin" 66 ]; 67 }; 68}