3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/logic/surelog/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
1.6 KiB
Nix
Raw Normal View History

2022-05-15 23:05:27 +01:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, python3
, pkg-config
, libuuid
, openjdk
2022-08-22 00:27:18 +01:00
, gperftools
, flatbuffers
, fetchpatch
2022-05-15 23:05:27 +01:00
}:
stdenv.mkDerivation rec {
2022-09-03 14:34:46 +01:00
pname = "surelog";
version = "1.45";
2022-05-15 23:05:27 +01:00
src = fetchFromGitHub {
owner = "chipsalliance";
repo = pname;
2022-09-21 13:00:38 +01:00
rev = "v${version}";
hash = "sha256-/SSKcEIhmWDOKN4v3djWTwZ5/nQvR8ibflzSVFDt/rM=";
2022-05-15 23:05:27 +01:00
fetchSubmodules = true;
};
# This prevents race conditions in unit tests that surface since we run
# ctest in parallel.
# This patch can be removed with the next version of surelog
patches = [
(fetchpatch {
url = "https://github.com/chipsalliance/Surelog/commit/9a54efbd156becf65311a4272104810f36041fa6.patch";
sha256 = "sha256-rU1Z/0wlVTgnPLqTN/87n+gI1iJ+6k/+sunVVd0ulhQ=";
name = "parallel-test-running.patch";
})
];
2022-05-15 23:05:27 +01:00
nativeBuildInputs = [
cmake
pkg-config
openjdk
2022-05-15 23:05:27 +01:00
(python3.withPackages (p: with p; [
psutil
orderedmultidict
]))
];
buildInputs = [
libuuid
2022-08-22 00:27:18 +01:00
gperftools
flatbuffers
];
cmakeFlags = [
"-DSURELOG_USE_HOST_FLATBUFFERS=On"
2022-05-15 23:05:27 +01:00
];
2022-08-22 00:25:32 +01:00
doCheck = true;
checkPhase = ''
runHook preCheck
make -j $NIX_BUILD_CORES UnitTests
ctest --output-on-failure
runHook postCheck
'';
2022-05-15 23:05:27 +01:00
postInstall = ''
mv $out/lib/surelog/* $out/lib/
2022-09-03 14:47:55 +01:00
mv $out/lib/pkg $out/lib/surelog/
2022-05-15 23:05:27 +01:00
'';
meta = {
description = "SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler";
homepage = "https://github.com/chipsalliance/Surelog";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ matthuszagh ];
2022-09-03 14:38:50 +01:00
platforms = lib.platforms.linux;
2022-05-15 23:05:27 +01:00
};
}