2017-08-30 17:21:17 +01:00
|
|
|
{ stdenv, fetchzip, fetchgit, boost, cmake, z3 }:
|
2017-03-04 09:38:42 +00:00
|
|
|
|
2017-07-05 15:31:42 +01:00
|
|
|
let
|
2017-09-22 21:18:21 +01:00
|
|
|
version = "0.4.17";
|
|
|
|
rev = "bdeb9e52a2211510644fb53df93fb98258b40a65";
|
|
|
|
sha256 = "1x6q2rlq6gxggidgsy6li7m4phwr1hcfi65pq9yimz64ddqfiira";
|
2017-07-05 15:31:42 +01: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 15:34:10 +01:00
|
|
|
|
2017-07-05 15:31:42 +01:00
|
|
|
stdenv.mkDerivation {
|
2016-08-11 13:51:44 +01:00
|
|
|
name = "solc-${version}";
|
|
|
|
|
2016-12-06 12:54:52 +00:00
|
|
|
# Cannot use `fetchFromGitHub' because of submodules
|
2016-11-25 18:10:02 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/ethereum/solidity";
|
2017-07-05 15:31:42 +01:00
|
|
|
inherit rev sha256;
|
2016-08-11 13:51:44 +01:00
|
|
|
};
|
|
|
|
|
2016-09-10 15:03:42 +01:00
|
|
|
patchPhase = ''
|
2017-07-05 15:31:42 +01:00
|
|
|
echo >commit_hash.txt '${rev}'
|
2017-05-19 15:34:10 +01:00
|
|
|
echo >prerelease.txt
|
2017-09-22 21:18:21 +01:00
|
|
|
substituteInPlace cmake/jsoncpp.cmake \
|
2017-07-05 15:31:42 +01:00
|
|
|
--replace '${jsoncppURL}' ${jsoncpp}
|
2017-03-04 09:38:42 +00:00
|
|
|
substituteInPlace cmake/EthCompilerSettings.cmake \
|
|
|
|
--replace 'add_compile_options(-Werror)' ""
|
2016-09-10 15:03:42 +01:00
|
|
|
'';
|
|
|
|
|
2017-08-30 17:21:17 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBoost_USE_STATIC_LIBS=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ boost z3 ];
|
2016-08-11 13:51:44 +01: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 14:43:29 +01:00
|
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
2016-08-17 22:30:27 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.dbrock ];
|
2016-08-11 13:51:44 +01:00
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
}
|