2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-09-25 04:45:31 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, bison
|
|
|
|
, flex
|
2024-07-27 06:49:29 +00:00
|
|
|
, iverilog
|
2021-08-08 23:34:03 +00:00
|
|
|
, which
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "vhd2vl";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "unstable-2022-12-26";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ldoolitt";
|
|
|
|
repo = pname;
|
2022-12-28 21:21:41 +00:00
|
|
|
rev = "869d442987dff6b9730bc90563ede89c1abfd28f";
|
|
|
|
sha256 = "sha256-Hz2XkT5m4ri5wVR2ciL9Gx73zr+RdW5snjWnUg300c8=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
flex
|
2021-08-08 23:34:03 +00:00
|
|
|
which
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-07-27 06:49:29 +00:00
|
|
|
iverilog
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2022-05-18 14:49:53 +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-09-25 04:45:31 +00:00
|
|
|
installPhase = ''
|
2021-08-08 23:34:03 +00:00
|
|
|
runHook preInstall
|
2022-07-18 16:21:45 +00:00
|
|
|
install -D -m755 src/vhd2vl $out/bin/vhd2vl
|
2021-08-08 23:34:03 +00:00
|
|
|
runHook postInstall
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "VHDL to Verilog converter";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "vhd2vl";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/ldoolitt/vhd2vl";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ matthuszagh ];
|
|
|
|
};
|
|
|
|
}
|