diff options
author | Alexander Krupenkin <mail@akru.me> | 2018-05-02 12:27:47 +0300 |
---|---|---|
committer | Alexander Krupenkin <mail@akru.me> | 2018-05-02 12:27:47 +0300 |
commit | a40020ed5f1bd466d3463a0d0aaabd821b7d5aed (patch) | |
tree | b5fe893706cc0015410c29a923bb4891ffa75a18 /pkgs/development/compilers/solc/default.nix | |
parent | 599ecd583fae0cafe61bc6780734a86ee1f93127 (diff) |
solc: 0.4.20 -> 0.4.23
Diffstat (limited to 'pkgs/development/compilers/solc/default.nix')
-rw-r--r-- | pkgs/development/compilers/solc/default.nix | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index 4c79fb15c5cb9..d94ce75e3f551 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -1,7 +1,9 @@ -{ stdenv, fetchzip, fetchurl, boost, cmake, z3 }: +{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }: let - version = "0.4.20"; + version = "0.4.23"; + rev = "124ca40dc525a987a88176c6e5170978e82fa290"; + sha256 = "07l8rfqh95yrdmbxc4pfb77s06k5v65dk3rgdqscqmwchkndrmm0"; jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz; jsoncpp = fetchzip { url = jsoncppURL; @@ -12,33 +14,45 @@ in stdenv.mkDerivation { name = "solc-${version}"; - # Cannot use `fetchFromGitHub' because of submodules - src = fetchurl { - url = "https://github.com/ethereum/solidity/releases/download/v${version}/solidity_${version}.tar.gz"; - sha256 = "0jyqnykj537ksfsf2m6ww9vganmpa6yd5fmlfpa5qm1076kq7zd6"; + src = fetchFromGitHub { + owner = "ethereum"; + repo = "solidity"; + inherit rev sha256; }; - patchPhase = '' + patches = [ + ./patches/boost-shared-libs.patch + ./patches/shared-libs-install.patch + ]; + + postPatch = '' + touch prerelease.txt + echo >commit_hash.txt "${rev}" substituteInPlace cmake/jsoncpp.cmake \ - --replace '${jsoncppURL}' ${jsoncpp} + --replace "${jsoncppURL}" ${jsoncpp} substituteInPlace cmake/EthCompilerSettings.cmake \ - --replace 'add_compile_options(-Werror)' "" + --replace "add_compile_options(-Werror)" "" ''; cmakeFlags = [ "-DBoost_USE_STATIC_LIBS=OFF" + "-DBUILD_SHARED_LIBS=ON" + "-DINSTALL_LLLC=ON" + "-DTESTS=OFF" ]; nativeBuildInputs = [ cmake ]; buildInputs = [ boost z3 ]; - meta = { + outputs = [ "out" "dev" ]; + + meta = with stdenv.lib; { 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; - platforms = with stdenv.lib.platforms; linux ++ darwin; - maintainers = [ stdenv.lib.maintainers.dbrock ]; + license = licenses.gpl3; + platforms = with platforms; linux ++ darwin; + maintainers = with maintainers; [ dbrock akru ]; inherit version; }; } |