2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, check
|
|
|
|
, flex
|
|
|
|
, pkg-config
|
|
|
|
, which
|
|
|
|
, elfutils
|
|
|
|
, libelf
|
|
|
|
, llvm
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nvc";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "1.7.2";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nickg";
|
|
|
|
repo = pname;
|
|
|
|
rev = "r${version}";
|
2022-10-21 18:38:19 +00:00
|
|
|
sha256 = "sha256-7N11S7OiAogyuNqrf7R5NZyVbiXgXxJ5t6lwBzL0YAU=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
check
|
|
|
|
flex
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
llvm
|
|
|
|
zlib
|
|
|
|
] ++ [
|
|
|
|
(if stdenv.isLinux then elfutils else libelf)
|
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
# TODO: recheck me on next release
|
|
|
|
postPatch = lib.optionalString stdenv.isLinux ''
|
|
|
|
sed -i "/vhpi4/d" test/regress/testlist.txt
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureScript = "../configure";
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-vhpi"
|
|
|
|
"--disable-lto"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "VHDL compiler and simulator";
|
|
|
|
homepage = "https://www.nickg.me.uk/nvc/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ wegank ];
|
|
|
|
};
|
|
|
|
}
|