2018-02-20 05:14:14 +01:00
|
|
|
{ stdenv, fetchzip, fetchurl, boost, cmake, z3 }:
|
2017-03-04 10:38:42 +01:00
|
|
|
|
2017-07-05 16:31:42 +02:00
|
|
|
let
|
2018-02-20 05:14:14 +01:00
|
|
|
version = "0.4.20";
|
2017-07-05 16:31:42 +02:00
|
|
|
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
|
|
|
|
jsoncpp = fetchzip {
|
|
|
|
url = jsoncppURL;
|
|
|
|
sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
|
|
|
|
};
|
|
|
|
in
|
2017-05-19 16:34:10 +02:00
|
|
|
|
2017-07-05 16:31:42 +02:00
|
|
|
stdenv.mkDerivation {
|
2016-08-11 14:51:44 +02:00
|
|
|
name = "solc-${version}";
|
|
|
|
|
2016-12-06 13:54:52 +01:00
|
|
|
# Cannot use `fetchFromGitHub' because of submodules
|
2018-02-20 05:14:14 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ethereum/solidity/releases/download/v${version}/solidity_${version}.tar.gz";
|
|
|
|
sha256 = "0jyqnykj537ksfsf2m6ww9vganmpa6yd5fmlfpa5qm1076kq7zd6";
|
2016-08-11 14:51:44 +02:00
|
|
|
};
|
|
|
|
|
2016-09-10 16:03:42 +02:00
|
|
|
patchPhase = ''
|
2017-09-22 22:18:21 +02:00
|
|
|
substituteInPlace cmake/jsoncpp.cmake \
|
2017-07-05 16:31:42 +02:00
|
|
|
--replace '${jsoncppURL}' ${jsoncpp}
|
2017-03-04 10:38:42 +01:00
|
|
|
substituteInPlace cmake/EthCompilerSettings.cmake \
|
|
|
|
--replace 'add_compile_options(-Werror)' ""
|
2016-09-10 16:03:42 +02:00
|
|
|
'';
|
|
|
|
|
2017-08-30 18:21:17 +02:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBoost_USE_STATIC_LIBS=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ boost z3 ];
|
2016-08-11 14:51:44 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Compiler for Ethereum smart contract language Solidity";
|
|
|
|
longDescription = "This package also includes `lllc', the LLL compiler.";
|
|
|
|
homepage = https://github.com/ethereum/solidity;
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2017-07-12 15:43:29 +02:00
|
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
2016-08-17 23:30:27 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.dbrock ];
|
2016-08-11 14:51:44 +02:00
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}
|