1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 pkg-config,
6 yosys,
7 readline,
8 zlib,
9 ghdl,
10}:
11
12stdenv.mkDerivation {
13 pname = "yosys-ghdl";
14 version = "0-unstable-2025-05-23";
15 plugin = "ghdl";
16
17 src = fetchFromGitHub {
18 owner = "ghdl";
19 repo = "ghdl-yosys-plugin";
20 rev = "1b97dc71377cea7e861be6625be4353c377a5fb5";
21 hash = "sha256-TFMUqIXJzgpnZ8cDlVb47btPqsCNJil0MN4Tdt83140=";
22 };
23
24 buildInputs = [
25 yosys
26 readline
27 zlib
28 ghdl
29 ];
30 nativeBuildInputs = [
31 pkg-config
32 ];
33
34 doCheck = true;
35 installPhase = ''
36 mkdir -p $out/share/yosys/plugins
37 cp ghdl.so $out/share/yosys/plugins/ghdl.so
38 '';
39
40 meta = with lib; {
41 description = "GHDL plugin for Yosys";
42 homepage = "https://github.com/ghdl/ghdl-yosys-plugin";
43 license = licenses.isc;
44 platforms = platforms.all;
45 maintainers = with maintainers; [ thoughtpolice ];
46 };
47}