Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 59 lines 1.2 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 setuptools, 6 mutf8, 7 webassets, 8 pytestCheckHook, 9 mock, 10}: 11 12buildPythonPackage rec { 13 pname = "dukpy"; 14 version = "0.4.0"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "amol-"; 19 repo = "dukpy"; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-8RDMz9SfBoUe7LQ9/atsZlJ/2uwLUb0hZxeYdsUOGpU="; 22 }; 23 24 postPatch = '' 25 substituteInPlace tests/test_webassets_filter.py \ 26 --replace-fail "class PyTestTemp" "class _Temp" \ 27 --replace-fail "PyTestTemp" "Temp" 28 ''; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ mutf8 ]; 33 34 optional-dependencies = { 35 webassets = [ webassets ]; 36 }; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 mock 41 ] ++ optional-dependencies.webassets; 42 43 disabledTests = [ "test_installer" ]; 44 45 preCheck = '' 46 rm -r dukpy 47 ''; 48 49 pythonImportsCheck = [ "dukpy" ]; 50 51 meta = { 52 description = "Simple JavaScript interpreter for Python"; 53 homepage = "https://github.com/amol-/dukpy"; 54 changelog = "https://github.com/amol-/dukpy/releases/tag/${version}"; 55 license = lib.licenses.mit; 56 maintainers = with lib.maintainers; [ ruby0b ]; 57 mainProgram = "dukpy"; 58 }; 59}