2022-10-08 09:17:54 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, yosys
|
|
|
|
, readline
|
|
|
|
, zlib
|
|
|
|
, ghdl
|
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.mkDerivation {
|
|
|
|
pname = "yosys-ghdl";
|
2022-10-08 09:18:57 +01:00
|
|
|
# This is not the latest commit, but it's the latest that builds with current stable ghdl 2.0.0
|
|
|
|
version = "2022.01.11";
|
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";
|
2022-10-08 09:18:57 +01:00
|
|
|
rev = "c9b05e481423c55ffcbb856fd5296701f670808c";
|
|
|
|
sha256 = "sha256-tT2+DXUtbJIBzBUBcyG2sz+3G+dTkciLVIczcRPr0Jw=";
|
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
|
|
|
};
|
|
|
|
|
2022-10-08 09:17:54 +01:00
|
|
|
buildInputs = [
|
|
|
|
yosys
|
|
|
|
readline
|
|
|
|
zlib
|
|
|
|
ghdl
|
|
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
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
|
|
|
|
|
|
|
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";
|
2022-10-08 09:17:54 +01:00
|
|
|
homepage = "https://github.com/ghdl/ghdl-yosys-plugin";
|
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
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|