at 25.11-pre 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 buildPythonPackage, 6 setuptools, 7 mutf8, 8 webassets, 9 pytestCheckHook, 10 mock, 11}: 12 13buildPythonPackage rec { 14 pname = "dukpy"; 15 version = "0.5.0"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "amol-"; 20 repo = "dukpy"; 21 tag = version; 22 hash = "sha256-5+SdGHYBron6EwpCf5ByaK8KuqQXhvN73wQUptvgPzc="; 23 }; 24 25 postPatch = '' 26 substituteInPlace tests/test_webassets_filter.py \ 27 --replace-fail "class PyTestTemp" "class _Temp" \ 28 --replace-fail "PyTestTemp" "Temp" 29 ''; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ mutf8 ]; 34 35 optional-dependencies = { 36 webassets = [ webassets ]; 37 }; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 mock 42 ] ++ optional-dependencies.webassets; 43 44 disabledTests = [ "test_installer" ]; 45 46 preCheck = '' 47 rm -r dukpy 48 ''; 49 50 pythonImportsCheck = [ "dukpy" ]; 51 52 meta = { 53 description = "Simple JavaScript interpreter for Python"; 54 homepage = "https://github.com/amol-/dukpy"; 55 changelog = "https://github.com/amol-/dukpy/releases/tag/${src.tag}"; 56 license = lib.licenses.mit; 57 maintainers = with lib.maintainers; [ ruby0b ]; 58 mainProgram = "dukpy"; 59 # error: 'TARGET_OS_BRIDGE' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] 60 # https://github.com/amol-/dukpy/issues/82 61 broken = stdenv.cc.isClang; 62 }; 63}