2021-08-22 07:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, fetchFromGitHub
|
|
|
|
, bison
|
|
|
|
, cmake
|
|
|
|
, doxygen
|
|
|
|
, flex
|
|
|
|
, git
|
|
|
|
, python3
|
|
|
|
, swig4
|
2022-08-12 12:06:08 +00:00
|
|
|
, boost17x
|
2023-04-12 12:48:02 +00:00
|
|
|
, cbc # for clp
|
2021-08-22 07:53:02 +00:00
|
|
|
, cimg
|
2023-04-12 12:48:02 +00:00
|
|
|
, clp # for or-tools
|
2021-08-22 07:53:02 +00:00
|
|
|
, eigen
|
2023-04-12 12:48:02 +00:00
|
|
|
, glpk
|
|
|
|
, gtest
|
2021-08-22 07:53:02 +00:00
|
|
|
, lcov
|
|
|
|
, lemon-graph
|
|
|
|
, libjpeg
|
2023-04-12 12:48:02 +00:00
|
|
|
, or-tools
|
2021-08-22 07:53:02 +00:00
|
|
|
, pcre
|
2023-04-12 12:48:02 +00:00
|
|
|
, pkg-config
|
2021-08-22 07:53:02 +00:00
|
|
|
, qtbase
|
2023-04-12 12:48:02 +00:00
|
|
|
, re2 # for or-tools
|
2021-08-22 07:53:02 +00:00
|
|
|
, readline
|
|
|
|
, spdlog
|
|
|
|
, tcl
|
|
|
|
, tcllib
|
|
|
|
, xorg
|
|
|
|
, yosys
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "openroad";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "unstable-2023-03-31";
|
2021-08-22 07:53:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "The-OpenROAD-Project";
|
|
|
|
repo = "OpenROAD";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "cd03c5cf8a8eb78c0e07fe33a56b8e9d64672efe";
|
2021-08-22 07:53:02 +00:00
|
|
|
fetchSubmodules = true;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-BWUvFCuWKWQpifErpak03J+A7ni0jZWIrCMhMdKIbD0=";
|
2021-08-22 07:53:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
bison
|
|
|
|
cmake
|
|
|
|
doxygen
|
|
|
|
flex
|
|
|
|
git
|
2023-04-12 12:48:02 +00:00
|
|
|
pkg-config
|
2021-08-22 07:53:02 +00:00
|
|
|
swig4
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
boost17x
|
2023-04-12 12:48:02 +00:00
|
|
|
cbc
|
2021-08-22 07:53:02 +00:00
|
|
|
cimg
|
2023-04-12 12:48:02 +00:00
|
|
|
clp
|
2021-08-22 07:53:02 +00:00
|
|
|
eigen
|
2023-04-12 12:48:02 +00:00
|
|
|
glpk
|
2021-08-22 07:53:02 +00:00
|
|
|
lcov
|
|
|
|
lemon-graph
|
|
|
|
libjpeg
|
2023-04-12 12:48:02 +00:00
|
|
|
or-tools
|
2021-08-22 07:53:02 +00:00
|
|
|
pcre
|
|
|
|
python3
|
|
|
|
qtbase
|
2023-04-12 12:48:02 +00:00
|
|
|
re2
|
2021-08-22 07:53:02 +00:00
|
|
|
readline
|
|
|
|
spdlog
|
|
|
|
tcl
|
|
|
|
tcllib
|
|
|
|
yosys
|
|
|
|
xorg.libX11
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
patches = [
|
|
|
|
./0001-Fix-string-formatting-in-tests.patch
|
|
|
|
./0002-Ignore-warning-on-stderr.patch
|
|
|
|
];
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs --build etc/find_messages.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Enable output images from the placer.
|
2022-08-12 12:06:08 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_BOOST=ON"
|
|
|
|
"-DUSE_CIMG_LIB=ON"
|
|
|
|
"-DOPENROAD_VERSION=${src.rev}"
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
# 2023-03-31: see discussion on fmt workaround in
|
|
|
|
# https://github.com/The-OpenROAD-Project/OpenROAD/pull/2696
|
|
|
|
"-DCMAKE_CXX_FLAGS=-DFMT_DEPRECATED_OSTREAM"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
2021-08-22 07:53:02 +00:00
|
|
|
|
|
|
|
# Resynthesis needs access to the Yosys binaries.
|
|
|
|
qtWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ yosys ]}" ];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
checkInputs = [ gtest ];
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
# Upstream uses vendored package versions for some dependencies, so regression testing is prudent
|
|
|
|
# to see if there are any breaking changes in unstable that should be vendored as well.
|
2023-04-12 12:48:02 +00:00
|
|
|
doCheck = true;
|
2021-08-22 07:53:02 +00:00
|
|
|
checkPhase = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
../test/regression
|
2021-08-22 07:53:02 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/openroad -version
|
|
|
|
$out/bin/sta -version
|
|
|
|
'';
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "OpenROAD's unified application implementing an RTL-to-GDS flow";
|
|
|
|
homepage = "https://theopenroadproject.org";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ trepetti ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|