From 8b3274178fa7b4a1d63a25cd64ec6a4a7b4599f4 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Fri, 2 Aug 2019 10:31:30 +0200 Subject: [PATCH 1/2] verilog: 2019.03.27 -> 2019.08.1 Fixes the build, see: https://github.com/steveicarus/iverilog/issues/247 --- .../science/electronics/verilog/default.nix | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/science/electronics/verilog/default.nix b/pkgs/applications/science/electronics/verilog/default.nix index 83352df18e6..1f8f966b33c 100644 --- a/pkgs/applications/science/electronics/verilog/default.nix +++ b/pkgs/applications/science/electronics/verilog/default.nix @@ -1,31 +1,31 @@ { stdenv, fetchFromGitHub, autoconf, gperf, flex, bison }: stdenv.mkDerivation rec { - name = "iverilog-${version}"; - version = "2019.03.27"; + pname = "iverilog"; + version = "unstable-2019-08-01"; src = fetchFromGitHub { owner = "steveicarus"; - repo = "iverilog"; - rev = "a9388a895eb85a9d7f2924b89f839f94e1b6d7c4"; - sha256 = "01d48sy3pzg9x1xpczqrsii2ckrvgnrfj720wiz22jdn90nirhhr"; + repo = pname; + rev = "c383d2048c0bd15f5db083f14736400546fb6215"; + sha256 = "1zs0gyhws0qa315magz3w5m45v97knczdgbf2zn4d7bdb7cv417c"; }; enableParallelBuilding = true; - patchPhase = '' + preConfigure = '' chmod +x $PWD/autoconf.sh $PWD/autoconf.sh ''; buildInputs = [ autoconf gperf flex bison ]; - meta = { + meta = with stdenv.lib; { description = "Icarus Verilog compiler"; repositories.git = https://github.com/steveicarus/iverilog.git; - homepage = http://www.icarus.com; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = with stdenv.lib.maintainers; [winden]; - platforms = with stdenv.lib.platforms; linux; + homepage = "http://iverilog.icarus.com/"; + license = licenses.lgpl21; + maintainers = with maintainers; [ winden ]; + platforms = platforms.linux; }; } From 9c50ec61895eee4fe3f9cbcfd566fe95e82c8f2a Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Fri, 2 Aug 2019 10:34:39 +0200 Subject: [PATCH 2/2] 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 1f8f966b33c..f850a1bf94d 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";