1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
check,
flex,
pkg-config,
which,
elfutils,
libffi,
llvm,
zlib,
zstd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nvc";
version = "1.22.1";
src = fetchFromGitHub {
owner = "nickg";
repo = "nvc";
tag = "r${finalAttrs.version}";
hash = "sha256-FA9GzfwsQRI3OOJQ54H8+JbgVtIz2F4xncVDUHRzgRA=";
};
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 = {
description = "VHDL compiler and simulator";
mainProgram = "nvc";
homepage = "https://www.nickg.me.uk/nvc/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ wegank ];
platforms = lib.platforms.unix;
};
})
|