depot/third_party/nixpkgs/pkgs/applications/science/electronics/nvc/default.nix
Default email 5557ff764c Project import generated by Copybara.
GitOrigin-RevId: 988cc958c57ce4350ec248d2d53087777f9e1949
2023-02-22 11:55:15 +01:00

69 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, check
, flex
, pkg-config
, which
, elfutils
, libelf
, libffi
, llvm
, zlib
}:
stdenv.mkDerivation rec {
pname = "nvc";
version = "1.8.2";
src = fetchFromGitHub {
owner = "nickg";
repo = pname;
rev = "r${version}";
hash = "sha256-s7QgufD3sQ6sZh2H78E8x0dMidHRKHUm8tASXoKK3xk=";
};
nativeBuildInputs = [
autoreconfHook
check
flex
pkg-config
which
];
buildInputs = [
libffi
llvm
zlib
] ++ [
(if stdenv.isLinux then elfutils else libelf)
];
# TODO: recheck me on next release
postPatch = lib.optionalString stdenv.isLinux ''
sed -i "/vhpi4/d" test/regress/testlist.txt
'';
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 ];
};
}