2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, check
|
|
|
|
, flex
|
|
|
|
, pkg-config
|
|
|
|
, which
|
|
|
|
, elfutils
|
2023-02-02 18:25:31 +00:00
|
|
|
, libffi
|
2022-07-14 12:49:19 +00:00
|
|
|
, llvm
|
|
|
|
, zlib
|
2023-07-15 17:15:38 +00:00
|
|
|
, zstd
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nvc";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.12.2";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nickg";
|
2023-07-15 17:15:38 +00:00
|
|
|
repo = "nvc";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "r${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-9nqho+iDqy8oQLSxBppXoafzEuS6AkcUuqEY3xxfFs4=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
check
|
|
|
|
flex
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
libffi
|
2022-07-14 12:49:19 +00:00
|
|
|
llvm
|
|
|
|
zlib
|
2023-07-15 17:15:38 +00:00
|
|
|
zstd
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
|
2023-04-12 12:48:02 +00:00
|
|
|
elfutils
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nvc";
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://www.nickg.me.uk/nvc/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ wegank ];
|
2023-04-12 12:48:02 +00:00
|
|
|
platforms = platforms.unix;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
}
|