5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
66 lines
1 KiB
Nix
66 lines
1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, autoreconfHook
|
|
, check
|
|
, flex
|
|
, pkg-config
|
|
, which
|
|
, elfutils
|
|
, libffi
|
|
, llvm
|
|
, zlib
|
|
, zstd
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nvc";
|
|
version = "1.12.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nickg";
|
|
repo = "nvc";
|
|
rev = "r${version}";
|
|
hash = "sha256-9ZbX2G4IR/SYSA4DOsTBIRrJeYublyrDUXT+V+KgaC0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
check
|
|
flex
|
|
pkg-config
|
|
which
|
|
];
|
|
|
|
buildInputs = [
|
|
libffi
|
|
llvm
|
|
zlib
|
|
zstd
|
|
] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
|
|
elfutils
|
|
];
|
|
|
|
preConfigure = ''
|
|
mkdir build
|
|
cd build
|
|
'';
|
|
|
|
configureScript = "../configure";
|
|
|
|
configureFlags = [
|
|
"--enable-vhpi"
|
|
"--disable-lto"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "VHDL compiler and simulator";
|
|
mainProgram = "nvc";
|
|
homepage = "https://www.nickg.me.uk/nvc/";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ wegank ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|