about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix')
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix b/nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix
new file mode 100644
index 000000000000..ccf8efc7c805
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/plugins/ghdl.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub, pkg-config
+, yosys, readline, zlib, ghdl
+}:
+
+stdenv.mkDerivation {
+  pname = "yosys-ghdl";
+  version = "2021.01.01";
+
+  src = fetchFromGitHub {
+    owner  = "ghdl";
+    repo   = "ghdl-yosys-plugin";
+    rev    = "8b3e740fef9a653a20a838f1ade475960e1d379b";
+    sha256 = "13kpcp37r11xgqd8aksddi40a5vpzqi7p8qgyjbs99lyscyli75x";
+  };
+
+  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";
+    license     = licenses.isc;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}