mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
5d44c9a222
The testing scheme for vhd2vl is sensitive to subtle shifts in iverilog's parenthesization choices, meaning that the golden test outputs require constant maintenance. The patch previously applied in order to deal with this situation is no longer sufficient, so a patch which is sufficient has been added. Also, the `buildTargets` and `checkTarget` attributes have been set, so future benign failures of this sort can be dealt with through `doCheck=false` in a pinch.
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, bison
|
|
, flex
|
|
, verilog
|
|
, which
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "vhd2vl";
|
|
version = "unstable-2018-09-01";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ldoolitt";
|
|
repo = pname;
|
|
rev = "37e3143395ce4e7d2f2e301e12a538caf52b983c";
|
|
sha256 = "17va2pil4938j8c93anhy45zzgnvq3k71a7glj02synfrsv6fs8n";
|
|
};
|
|
|
|
patches = lib.optionals (!stdenv.isAarch64) [
|
|
# fix build with verilog 11.0
|
|
./test.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
bison
|
|
flex
|
|
which
|
|
];
|
|
|
|
buildInputs = [
|
|
verilog
|
|
];
|
|
|
|
# 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";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -D -m755 src/vhd2vl $out/bin/vdh2vl
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "VHDL to Verilog converter";
|
|
homepage = "https://github.com/ldoolitt/vhd2vl";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ matthuszagh ];
|
|
};
|
|
}
|