nixpkgs/pkgs/applications/science/electronics/verilog/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
1.7 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-11-05 17:27:58 +01:00
, fetchFromGitHub
, autoconf
, bison
, bzip2
, flex
, gperf
, ncurses
, perl
2020-11-05 17:27:58 +01:00
, readline
, zlib
}:
let
iverilog-test = fetchFromGitHub {
owner = "steveicarus";
repo = "ivtest";
2020-11-05 17:27:58 +01:00
rev = "253609b89576355b3bef2f91e90db62223ecf2be";
sha256 = "18i7jlr2csp7mplcrwjhllwvb6w3v7x7mnx7vdw48nd3g5scrydx";
};
in
stdenv.mkDerivation rec {
pname = "iverilog";
2020-11-05 17:27:58 +01:00
version = "11.0";
2016-05-21 22:16:10 +02:00
src = fetchFromGitHub {
owner = "steveicarus";
repo = pname;
2021-01-15 14:21:58 +01:00
rev = "v${lib.replaceStrings ["."] ["_"] version}";
2020-11-05 17:27:58 +01:00
sha256 = "0nzcyi6l2zv9wxzsv9i963p3igyjds0n55x0ph561mc3pfbc7aqp";
};
2020-11-05 17:27:58 +01:00
nativeBuildInputs = [ autoconf bison flex gperf ];
2020-11-05 17:27:58 +01:00
buildInputs = [ bzip2 ncurses readline zlib ];
preConfigure = "sh autoconf.sh";
enableParallelBuilding = true;
2020-11-05 17:27:58 +01:00
2021-02-12 21:33:52 +01:00
# tests try to access /proc/ which does not exist on darwin
# Cannot locate IVL modules : couldn't get command path from OS.
doCheck = !stdenv.isDarwin;
installCheckInputs = [ perl ];
2020-11-05 17:27:58 +01:00
installCheckPhase = ''
# copy tests to allow writing results
export TESTDIR=$(mktemp -d)
cp -r ${iverilog-test}/* $TESTDIR
pushd $TESTDIR
# Run & check tests
PATH=$out/bin:$PATH perl vvp_reg.pl
# Check the tests, will error if unexpected tests fail. Some failures MIGHT be normal.
diff regression_report-devel.txt regression_report.txt
PATH=$out/bin:$PATH perl vpi_reg.pl
popd
'';
meta = with lib; {
description = "Icarus Verilog compiler";
2020-11-05 17:27:58 +01:00
homepage = "http://iverilog.icarus.com/"; # https does not work
license = with licenses; [ gpl2Plus lgpl21Plus ];
maintainers = with maintainers; [ winden thoughtpolice ];
platforms = platforms.all;
};
}