depot/third_party/nixpkgs/pkgs/applications/science/electronics/nvc/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

67 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, check
, flex
, pkg-config
, which
, elfutils
, libelf
, libffi
, llvm
, zlib
}:
stdenv.mkDerivation rec {
pname = "nvc";
version = "1.9.2";
src = fetchFromGitHub {
owner = "nickg";
repo = pname;
rev = "r${version}";
hash = "sha256-xB2COtYgbg00rrOWTbcBocRnqF5682jUG2eS7I71Ln4=";
};
nativeBuildInputs = [
autoreconfHook
check
flex
pkg-config
which
];
buildInputs = [
libffi
llvm
zlib
] ++ lib.optionals stdenv.isLinux [
elfutils
] ++ lib.optionals (!stdenv.isLinux) [
libelf
];
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;
maintainers = with maintainers; [ wegank ];
platforms = platforms.unix;
};
}