depot/third_party/nixpkgs/pkgs/applications/science/electronics/nvc/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

68 lines
1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, check
, flex
, pkg-config
, which
, elfutils
, libelf
, libffi
, llvm
, zlib
, zstd
}:
stdenv.mkDerivation rec {
pname = "nvc";
version = "1.11.1";
src = fetchFromGitHub {
owner = "nickg";
repo = "nvc";
rev = "r${version}";
hash = "sha256-aBH3TtPFuJXtVvGTJcGJev5DYVwqjUAM9cf5PatJq9Y=";
};
nativeBuildInputs = [
autoreconfHook
check
flex
pkg-config
which
];
buildInputs = [
libffi
llvm
zlib
zstd
] ++ 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;
};
}