mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
vyper: init at 0.2.8 (#104758)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
f4017bff44
commit
e9b6e535a6
54
pkgs/development/compilers/vyper/default.nix
Normal file
54
pkgs/development/compilers/vyper/default.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ stdenv, lib, buildPythonPackage, fetchPypi, writeText, asttokens
|
||||
, pycryptodome, pytest_xdist, pytestcov, recommonmark, semantic-version, sphinx
|
||||
, sphinx_rtd_theme, pytestrunner }:
|
||||
|
||||
let
|
||||
sample-contract = writeText "example.vy" ''
|
||||
count: int128
|
||||
|
||||
@external
|
||||
def __init__(foo: address):
|
||||
self.count = 1
|
||||
'';
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "vyper";
|
||||
version = "0.2.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0d9fv630ayd1989qnklldh08vksa2lf0r06lm914qy5r5cvbl1v2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pytestrunner ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace 'asttokens==' 'asttokens>=' \
|
||||
--replace 'subprocess.check_output("git rev-parse HEAD".split())' "' '" \
|
||||
--replace 'commithash.decode("utf-8").strip()' "'069936fa3fee8646ff362145593128d7ef07da38'"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
asttokens
|
||||
pycryptodome
|
||||
semantic-version
|
||||
|
||||
# docs
|
||||
recommonmark
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
$out/bin/vyper "${sample-contract}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Pythonic Smart Contract Language for the EVM";
|
||||
homepage = "https://github.com/vyperlang/vyper";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ siraben ];
|
||||
};
|
||||
}
|
@ -10529,6 +10529,8 @@ in
|
||||
vala_0_48
|
||||
vala;
|
||||
|
||||
vyper = with python3Packages; toPythonApplication vyper;
|
||||
|
||||
wcc = callPackage ../development/compilers/wcc { };
|
||||
|
||||
wla-dx = callPackage ../development/compilers/wla-dx { };
|
||||
|
@ -7912,6 +7912,8 @@ in {
|
||||
|
||||
vxi11 = callPackage ../development/python-modules/vxi11 { };
|
||||
|
||||
vyper = callPackage ../development/compilers/vyper { };
|
||||
|
||||
w3lib = callPackage ../development/python-modules/w3lib { };
|
||||
|
||||
wadllib = callPackage ../development/python-modules/wadllib { };
|
||||
|
Loading…
Reference in New Issue
Block a user