at 23.05-pre 73 lines 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, pythonRelaxDepsHook 6, writeText 7, asttokens 8, pycryptodome 9, recommonmark 10, semantic-version 11, sphinx 12, sphinx-rtd-theme 13, pytest-runner 14, setuptools-scm 15, git 16}: 17 18let 19 sample-contract = writeText "example.vy" '' 20 count: int128 21 22 @external 23 def __init__(foo: address): 24 self.count = 1 25 ''; 26 27in 28buildPythonPackage rec { 29 pname = "vyper"; 30 version = "0.3.6"; 31 format = "setuptools"; 32 33 disabled = pythonOlder "3.7"; 34 35 src = fetchPypi { 36 inherit pname version; 37 sha256 = "sha256-8jw92ttKhXubzDr0tt9/OoCsPEyB9yPRsueK+j4PO6Y="; 38 }; 39 40 nativeBuildInputs = [ 41 # Git is used in setup.py to compute version information during building 42 # ever since https://github.com/vyperlang/vyper/pull/2816 43 git 44 45 pythonRelaxDepsHook 46 pytest-runner 47 setuptools-scm 48 ]; 49 50 pythonRelaxDeps = [ "asttokens" "semantic-version" ]; 51 52 propagatedBuildInputs = [ 53 asttokens 54 pycryptodome 55 semantic-version 56 57 # docs 58 recommonmark 59 sphinx 60 sphinx-rtd-theme 61 ]; 62 63 checkPhase = '' 64 $out/bin/vyper "${sample-contract}" 65 ''; 66 67 meta = with lib; { 68 description = "Pythonic Smart Contract Language for the EVM"; 69 homepage = "https://github.com/vyperlang/vyper"; 70 license = licenses.asl20; 71 maintainers = with maintainers; [ siraben ]; 72 }; 73}