From acc5f7b18a60bc9b1024e5e1882bf7362e6492e6 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Fri, 22 Jan 2021 18:25:31 +0700 Subject: pkgs/development/compilers: stdenv.lib -> lib --- pkgs/development/compilers/solc/default.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'pkgs/development/compilers/solc') 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; -- cgit 1.4.1