Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 17.09 48 lines 1.4 kB view raw
1{ stdenv, fetchzip, fetchgit, boost, cmake, z3 }: 2 3let 4 version = "0.4.16"; 5 rev = "d7661dd97460250b4e1127b9e7ea91e116143780"; 6 sha256 = "1fd69pdhkkkvbkrxipkck1icpqkpdskjzar48a1yzdsx3l8s4lil"; 7 jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz; 8 jsoncpp = fetchzip { 9 url = jsoncppURL; 10 sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0"; 11 }; 12in 13 14stdenv.mkDerivation { 15 name = "solc-${version}"; 16 17 # Cannot use `fetchFromGitHub' because of submodules 18 src = fetchgit { 19 url = "https://github.com/ethereum/solidity"; 20 inherit rev sha256; 21 }; 22 23 patchPhase = '' 24 echo >commit_hash.txt '${rev}' 25 echo >prerelease.txt 26 substituteInPlace deps/jsoncpp.cmake \ 27 --replace '${jsoncppURL}' ${jsoncpp} 28 substituteInPlace cmake/EthCompilerSettings.cmake \ 29 --replace 'add_compile_options(-Werror)' "" 30 ''; 31 32 cmakeFlags = [ 33 "-DBoost_USE_STATIC_LIBS=OFF" 34 ]; 35 36 nativeBuildInputs = [ cmake ]; 37 buildInputs = [ boost z3 ]; 38 39 meta = { 40 description = "Compiler for Ethereum smart contract language Solidity"; 41 longDescription = "This package also includes `lllc', the LLL compiler."; 42 homepage = https://github.com/ethereum/solidity; 43 license = stdenv.lib.licenses.gpl3; 44 platforms = with stdenv.lib.platforms; linux ++ darwin; 45 maintainers = [ stdenv.lib.maintainers.dbrock ]; 46 inherit version; 47 }; 48}