about summary refs log tree commit diff
path: root/pkgs/development/compilers/solc/default.nix
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-03-04 10:38:42 +0100
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-03-04 11:01:35 +0100
commitfe0ef5538428b4c30cd7151431ac2903a489b68f (patch)
tree647abbf1f347c77d2e12c98316d04fbadc04eef8 /pkgs/development/compilers/solc/default.nix
parent843e5daebe636087c4c865810e05828677e73a22 (diff)
solc: fix build
Prevent the download of jsoncpp to happen at build time.
Don’t treat warnings as errors, since there is a warning about the major() macros in GNU libc.
Diffstat (limited to 'pkgs/development/compilers/solc/default.nix')
-rw-r--r--pkgs/development/compilers/solc/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix
index 354c8f4e5f57e..ecf975bf76f16 100644
--- a/pkgs/development/compilers/solc/default.nix
+++ b/pkgs/development/compilers/solc/default.nix
@@ -1,4 +1,9 @@
-{ stdenv, fetchgit, boost, cmake, jsoncpp }:
+{ stdenv, fetchzip, fetchgit, boost, cmake }:
+
+let jsoncpp = fetchzip {
+  url = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
+  sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
+}; in
 
 stdenv.mkDerivation rec {
   version = "0.4.8";
@@ -13,9 +18,13 @@ stdenv.mkDerivation rec {
 
   patchPhase = ''
     echo >commit_hash.txt 2dabbdf06f414750ef0425c664f861aeb3e470b8
+    substituteInPlace deps/jsoncpp.cmake \
+      --replace https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz ${jsoncpp}
+    substituteInPlace cmake/EthCompilerSettings.cmake \
+      --replace 'add_compile_options(-Werror)' ""
   '';
 
-  buildInputs = [ boost cmake jsoncpp ];
+  buildInputs = [ boost cmake ];
 
   meta = {
     description = "Compiler for Ethereum smart contract language Solidity";