2022-12-25 17:10:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-05-04 17:40:35 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, bison
|
|
|
|
, flex
|
2024-07-14 00:39:19 +00:00
|
|
|
, iverilog
|
2021-05-31 22:11:13 +00:00
|
|
|
, which
|
2020-05-04 17:40:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "vhd2vl";
|
2022-12-25 17:10:09 +00:00
|
|
|
version = "unstable-2022-12-26";
|
2020-05-04 17:40:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ldoolitt";
|
|
|
|
repo = pname;
|
2022-12-25 17:10:09 +00:00
|
|
|
rev = "869d442987dff6b9730bc90563ede89c1abfd28f";
|
|
|
|
sha256 = "sha256-Hz2XkT5m4ri5wVR2ciL9Gx73zr+RdW5snjWnUg300c8=";
|
2020-05-04 17:40:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
flex
|
2021-06-01 05:29:13 +00:00
|
|
|
which
|
2020-05-04 17:40:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-07-14 00:39:19 +00:00
|
|
|
iverilog
|
2020-05-04 17:40:35 +00:00
|
|
|
];
|
|
|
|
|
2022-05-11 03:47:14 +00:00
|
|
|
# the "translate" target both (a) builds the software and (b) runs
|
|
|
|
# the tests (without validating the results)
|
|
|
|
buildTargets = [ "translate" ];
|
|
|
|
|
|
|
|
# the "diff" target examines the test results
|
|
|
|
checkTarget = "diff";
|
|
|
|
|
2020-05-04 17:40:35 +00:00
|
|
|
installPhase = ''
|
2021-06-01 05:29:13 +00:00
|
|
|
runHook preInstall
|
2022-07-15 14:22:23 +00:00
|
|
|
install -D -m755 src/vhd2vl $out/bin/vhd2vl
|
2021-06-01 05:29:13 +00:00
|
|
|
runHook postInstall
|
2020-05-04 17:40:35 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-04 17:40:35 +00:00
|
|
|
description = "VHDL to Verilog converter";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "vhd2vl";
|
2020-05-04 17:40:35 +00:00
|
|
|
homepage = "https://github.com/ldoolitt/vhd2vl";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ matthuszagh ];
|
|
|
|
};
|
|
|
|
}
|