From 9c50ec61895eee4fe3f9cbcfd566fe95e82c8f2a Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Fri, 2 Aug 2019 10:34:39 +0200 Subject: [PATCH] verilog: Add optional dependencies Increases the closure size by just 4MB. --- .../science/electronics/verilog/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/electronics/verilog/default.nix b/pkgs/applications/science/electronics/verilog/default.nix index 1f8f966b33c7..f850a1bf94df 100644 --- a/pkgs/applications/science/electronics/verilog/default.nix +++ b/pkgs/applications/science/electronics/verilog/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchFromGitHub, autoconf, gperf, flex, bison }: +{ stdenv, fetchFromGitHub, autoconf, gperf, flex, bison, readline, ncurses +, bzip2, zlib +}: stdenv.mkDerivation rec { pname = "iverilog"; @@ -13,12 +15,19 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + prePatch = '' + substituteInPlace configure.in \ + --replace "AC_CHECK_LIB(termcap, tputs)" "AC_CHECK_LIB(termcap, tputs)" + ''; + preConfigure = '' chmod +x $PWD/autoconf.sh $PWD/autoconf.sh ''; - buildInputs = [ autoconf gperf flex bison ]; + nativeBuildInputs = [ autoconf gperf flex bison ]; + + buildInputs = [ readline ncurses bzip2 zlib ]; meta = with stdenv.lib; { description = "Icarus Verilog compiler";