2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-05-04 18:40:35 +01:00
|
|
|
, fetchFromGitHub
|
2020-11-14 18:53:42 +00:00
|
|
|
, fetchpatch
|
2020-05-04 18:40:35 +01:00
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
, verilog
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "vhd2vl";
|
|
|
|
version = "unstable-2018-09-01";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ldoolitt";
|
|
|
|
repo = pname;
|
|
|
|
rev = "37e3143395ce4e7d2f2e301e12a538caf52b983c";
|
|
|
|
sha256 = "17va2pil4938j8c93anhy45zzgnvq3k71a7glj02synfrsv6fs8n";
|
|
|
|
};
|
|
|
|
|
2021-01-15 13:21:58 +00:00
|
|
|
patches = lib.optionals (!stdenv.isAarch64) [
|
2020-11-14 18:53:42 +00:00
|
|
|
# fix build with verilog 11.0 - https://github.com/ldoolitt/vhd2vl/pull/15
|
|
|
|
# for some strange reason, this is not needed for aarch64
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ldoolitt/vhd2vl/commit/ce9b8343ffd004dfe8779a309f4b5a594dbec45e.patch";
|
|
|
|
sha256 = "1qaqhm2mk66spb2dir9n91b385rarglc067js1g6pcg8mg5v3hhf";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-05-04 18:40:35 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
verilog
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp src/vhd2vl $out/bin/
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-04 18:40:35 +01:00
|
|
|
description = "VHDL to Verilog converter";
|
|
|
|
homepage = "https://github.com/ldoolitt/vhd2vl";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ matthuszagh ];
|
|
|
|
};
|
|
|
|
}
|