ec1830e696
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>
33 lines
823 B
Nix
33 lines
823 B
Nix
{ stdenv, lib, fetchFromGitHub, pkg-config
|
|
, yosys, readline, zlib, bluespec
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "yosys-bluespec";
|
|
version = "2021.01.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "thoughtpolice";
|
|
repo = "yosys-bluespec";
|
|
rev = "7a0c609e9b601560067c34b8ce41e89ea4a397d4";
|
|
sha256 = "0xj9j5dwvq0dwqzfjd4ikmxkd28amj6d9m6ava7pwcrpjhyjnd0c";
|
|
};
|
|
|
|
buildInputs = [ yosys readline zlib bluespec ];
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
doCheck = true;
|
|
makeFlags = [
|
|
"PREFIX=$(out)/share/yosys/plugins"
|
|
"STATIC_BSC_PATH=${bluespec}/bin/bsc"
|
|
"STATIC_BSC_LIBDIR=${bluespec}/lib"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Bluespec plugin for Yosys";
|
|
license = licenses.isc;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
};
|
|
}
|