-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
/
ghdl.nix
47 lines (42 loc) · 979 Bytes
/
ghdl.nix
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
{ stdenv
, lib
, fetchFromGitHub
, pkg-config
, yosys
, readline
, zlib
, ghdl
}:
stdenv.mkDerivation {
pname = "yosys-ghdl";
# This is not the latest commit, but it's the latest that builds with current stable ghdl 2.0.0
version = "2022.01.11";
plugin = "ghdl";
src = fetchFromGitHub {
owner = "ghdl";
repo = "ghdl-yosys-plugin";
rev = "c9b05e481423c55ffcbb856fd5296701f670808c";
sha256 = "sha256-tT2+DXUtbJIBzBUBcyG2sz+3G+dTkciLVIczcRPr0Jw=";
};
buildInputs = [
yosys
readline
zlib
ghdl
];
nativeBuildInputs = [
pkg-config
];
doCheck = true;
installPhase = ''
mkdir -p $out/share/yosys/plugins
cp ghdl.so $out/share/yosys/plugins/ghdl.so
'';
meta = with lib; {
description = "GHDL plugin for Yosys";
homepage = "https://github.com/ghdl/ghdl-yosys-plugin";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [ thoughtpolice ];
};
}