1{ lib 2, buildPythonPackage 3, isPy3k 4, fetchFromGitHub 5, setuptools-scm 6, toml 7, pytestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "pure_eval"; 12 version = "0.2.1"; 13 14 disabled = !isPy3k; 15 16 src = fetchFromGitHub { 17 owner = "alexmojaki"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "sha256-+Vucu16NFPtQ23AbBH/cQU+klxp6DMicSScbnKegLZI="; 21 }; 22 23 SETUPTOOLS_SCM_PRETEND_VERSION = version; 24 25 buildInputs = [ 26 setuptools-scm 27 ]; 28 29 propagatedBuildInputs = [ 30 toml 31 ]; 32 33 checkInputs = [ 34 pytestCheckHook 35 ]; 36 37 pythonImportsCheck = [ "pure_eval" ]; 38 39 meta = with lib; { 40 description = "Safely evaluate AST nodes without side effects"; 41 homepage = "https://github.com/alexmojaki/pure_eval"; 42 license = licenses.mit; 43 maintainers = with maintainers; [ gebner ]; 44 }; 45}