nixpkgs/pkgs/development/compilers/solc/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchzip, fetchgit, boost, cmake }:
2017-07-05 07:31:42 -07:00
let
version = "0.4.12";
rev = "194ff033ae44944ac59aa7bd3da89ba94ec5893c";
sha256 = "0gkg3nay0625qmhxxxax1d1c4dl554ri3pkwd12qfg6g1w6j04w7";
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
jsoncpp = fetchzip {
url = jsoncppURL;
sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
};
in
2017-05-19 07:34:10 -07:00
2017-07-05 07:31:42 -07:00
stdenv.mkDerivation {
2016-08-11 05:51:44 -07:00
name = "solc-${version}";
# Cannot use `fetchFromGitHub' because of submodules
2016-11-25 10:10:02 -08:00
src = fetchgit {
url = "https://github.com/ethereum/solidity";
2017-07-05 07:31:42 -07:00
inherit rev sha256;
2016-08-11 05:51:44 -07:00
};
2016-09-10 07:03:42 -07:00
patchPhase = ''
2017-07-05 07:31:42 -07:00
echo >commit_hash.txt '${rev}'
2017-05-19 07:34:10 -07:00
echo >prerelease.txt
substituteInPlace deps/jsoncpp.cmake \
2017-07-05 07:31:42 -07:00
--replace '${jsoncppURL}' ${jsoncpp}
substituteInPlace cmake/EthCompilerSettings.cmake \
--replace 'add_compile_options(-Werror)' ""
2016-09-10 07:03:42 -07:00
'';
buildInputs = [ boost cmake ];
2016-08-11 05:51:44 -07: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;
2016-08-17 14:30:27 -07:00
maintainers = [ stdenv.lib.maintainers.dbrock ];
2016-08-11 05:51:44 -07:00
inherit version;
};
}