about summary refs log tree commit diff
path: root/pkgs/development/compilers/solc
diff options
context:
space:
mode:
authorBen Siraphob <bensiraphob@gmail.com>2021-01-22 18:25:31 +0700
committerBen Siraphob <bensiraphob@gmail.com>2021-01-23 08:57:37 +0700
commitacc5f7b18a60bc9b1024e5e1882bf7362e6492e6 (patch)
tree597dab74ebab3915ddff291ec6aa4913f4010c68 /pkgs/development/compilers/solc
parentbbaff89ceb389e9c21a90eefac60ebc9853144be (diff)
pkgs/development/compilers: stdenv.lib -> lib
Diffstat (limited to 'pkgs/development/compilers/solc')
-rw-r--r--pkgs/development/compilers/solc/default.nix19
1 files changed, 9 insertions, 10 deletions
diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix
index 0f0af33e7001e..546697d8efec4 100644
--- a/pkgs/development/compilers/solc/default.nix
+++ b/pkgs/development/compilers/solc/default.nix
@@ -1,13 +1,12 @@
-{ gccStdenv, fetchzip, boost, cmake, ncurses, python3, coreutils
+{ lib, gccStdenv, fetchzip, boost, cmake, ncurses, python3, coreutils
 , z3Support ? true, z3 ? null, cvc4Support ? true, cvc4 ? null
 , cln ? null, gmp ? null
 }:
 
 # compiling source/libsmtutil/CVC4Interface.cpp breaks on clang on Darwin,
 # general commandline tests fail at abiencoderv2_no_warning/ on clang on NixOS
-let stdenv = gccStdenv; in
 
-assert z3Support -> z3 != null && stdenv.lib.versionAtLeast z3.version "4.6.0";
+assert z3Support -> z3 != null && lib.versionAtLeast z3.version "4.6.0";
 assert cvc4Support -> cvc4 != null && cln != null && gmp != null;
 
 let
@@ -18,7 +17,7 @@ let
     sha256 = "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv";
   };
 in
-stdenv.mkDerivation rec {
+gccStdenv.mkDerivation rec {
 
   pname = "solc";
   version = "0.7.4";
@@ -36,20 +35,20 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [
     "-DBoost_USE_STATIC_LIBS=OFF"
-  ] ++ stdenv.lib.optionals (!z3Support) [
+  ] ++ lib.optionals (!z3Support) [
     "-DUSE_Z3=OFF"
-  ] ++ stdenv.lib.optionals (!cvc4Support) [
+  ] ++ lib.optionals (!cvc4Support) [
     "-DUSE_CVC4=OFF"
   ];
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ boost ]
-    ++ stdenv.lib.optionals z3Support [ z3 ]
-    ++ stdenv.lib.optionals cvc4Support [ cvc4 cln gmp ];
+    ++ lib.optionals z3Support [ z3 ]
+    ++ lib.optionals cvc4Support [ cvc4 cln gmp ];
   checkInputs = [ ncurses python3 ];
 
   # Test fails on darwin for unclear reason
-  doCheck = stdenv.hostPlatform.isLinux;
+  doCheck = gccStdenv.hostPlatform.isLinux;
 
   checkPhase = ''
     while IFS= read -r -d ''' dir
@@ -68,7 +67,7 @@ stdenv.mkDerivation rec {
     popd
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Compiler for Ethereum smart contract language Solidity";
     homepage = "https://github.com/ethereum/solidity";
     license = licenses.gpl3;