init: experimental yosys-{bluespec, ghdl} plugins
These plugins can be included in a closure, along with the `yosys`
derivation, and they will be automatically picked up for use. For
example, this allows you to include 'yosys-bluespec' in your
`buildInputs`, and then immediately run:
$ nix-shell -p yosys yosys-bluespec yosys-ghdl
$ yosys -m bluespec -p 'help read_bluespec'
$ yosys -m ghdl -p 'help ghdl'
These two plugins are a bit experimental, admittedly, but they are good,
clean examples of how to write and use the yosys plugin infrastructure,
and make it easy to test updates, etc.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2021-01-15 05:52:24 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pkg-config
|
|
|
|
, yosys, readline, zlib, ghdl
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "yosys-ghdl";
|
2021-02-10 09:06:10 +00:00
|
|
|
version = "2021.01.25";
|
init: experimental yosys-{bluespec, ghdl} plugins
These plugins can be included in a closure, along with the `yosys`
derivation, and they will be automatically picked up for use. For
example, this allows you to include 'yosys-bluespec' in your
`buildInputs`, and then immediately run:
$ nix-shell -p yosys yosys-bluespec yosys-ghdl
$ yosys -m bluespec -p 'help read_bluespec'
$ yosys -m ghdl -p 'help ghdl'
These two plugins are a bit experimental, admittedly, but they are good,
clean examples of how to write and use the yosys plugin infrastructure,
and make it easy to test updates, etc.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2021-01-15 05:52:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ghdl";
|
|
|
|
repo = "ghdl-yosys-plugin";
|
2021-02-10 09:06:10 +00:00
|
|
|
rev = "cba859cacf8c6631146dbdaa0f297c060b5a68cd";
|
|
|
|
sha256 = "01d9wb7sqkmkf2y9bnn3pmhy08khzs5m1d06whxsiwgwnjzfk9mx";
|
init: experimental yosys-{bluespec, ghdl} plugins
These plugins can be included in a closure, along with the `yosys`
derivation, and they will be automatically picked up for use. For
example, this allows you to include 'yosys-bluespec' in your
`buildInputs`, and then immediately run:
$ nix-shell -p yosys yosys-bluespec yosys-ghdl
$ yosys -m bluespec -p 'help read_bluespec'
$ yosys -m ghdl -p 'help ghdl'
These two plugins are a bit experimental, admittedly, but they are good,
clean examples of how to write and use the yosys plugin infrastructure,
and make it easy to test updates, etc.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2021-01-15 05:52:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|