2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2021-01-13 04:15:10 +00:00
|
|
|
, perl, flex, bison, python3
|
2020-08-23 16:34:00 +01:00
|
|
|
}:
|
2015-05-31 23:07:44 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "verilator";
|
2021-03-10 07:47:54 +00:00
|
|
|
version = "4.110";
|
2015-05-31 23:07:44 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.veripool.org/ftp/${pname}-${version}.tgz";
|
2021-03-10 07:47:54 +00:00
|
|
|
sha256 = "sha256-Rxb+AFhmGinWtZyvjnRxsu3b3tbtRO3njcHGUJTs/sw=";
|
2015-05-31 23:07:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-08-23 16:34:00 +01:00
|
|
|
buildInputs = [ perl ];
|
2021-01-13 04:15:10 +00:00
|
|
|
nativeBuildInputs = [ flex bison python3 ];
|
2015-05-31 23:07:44 +01:00
|
|
|
|
2020-08-23 16:34:00 +01:00
|
|
|
# these tests need some interpreter paths patched early on...
|
2021-01-13 04:15:10 +00:00
|
|
|
# see https://github.com/NixOS/nix/issues/1205
|
2020-08-23 16:34:00 +01:00
|
|
|
doCheck = false;
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2021-01-13 04:15:10 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs \
|
|
|
|
src/flexfix \
|
|
|
|
src/vlcovgen
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-05-31 23:07:44 +01:00
|
|
|
description = "Fast and robust (System)Verilog simulator/compiler";
|
2018-01-05 19:42:46 +00:00
|
|
|
homepage = "https://www.veripool.org/wiki/verilator";
|
2020-08-23 16:34:00 +01:00
|
|
|
license = licenses.lgpl3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
2015-05-31 23:07:44 +01:00
|
|
|
};
|
|
|
|
}
|