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