summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenner Zeller <h.zeller@acm.org>2024-07-13 11:31:14 -0700
committerAustin Seipp <aseipp@pobox.com>2024-07-18 11:52:23 -0500
commit3c2052bd2006e5a718df0a8e6193b72dc654012d (patch)
treec62fc313e320687c908c979f2d691c1a45204337
parentverilator: format with nixfmt (diff)
downloadnixpkgs-3c2052bd2006e5a718df0a8e6193b72dc654012d.tar.gz
verilator: 5.022 -> 5.026
* Properly output version with verilator --version (set VERILATOR_SRC_VERSION at compile time) * No need to wrap the binaries anymore. * Fix verilator --gdbbt
-rw-r--r--pkgs/applications/science/electronics/verilator/default.nix28
1 files changed, 10 insertions, 18 deletions
diff --git a/pkgs/applications/science/electronics/verilator/default.nix b/pkgs/applications/science/electronics/verilator/default.nix
index 3e7ee0be98e0..c467bdfc547b 100644
--- a/pkgs/applications/science/electronics/verilator/default.nix
+++ b/pkgs/applications/science/electronics/verilator/default.nix
@@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
- fetchpatch,
perl,
flex,
bison,
@@ -17,28 +16,24 @@
systemc,
git,
numactl,
+ coreutils,
}:
stdenv.mkDerivation rec {
pname = "verilator";
- version = "5.022";
+ version = "5.026";
+
+ # Verilator gets the version from this environment variable
+ # if it can't do git describe while building.
+ VERILATOR_SRC_VERSION = "v${version}";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
- hash = "sha256-Ya3lqK8BfvMVLZUrD2Et6OmptteWXp5VmZb2x2G/V/E=";
+ hash = "sha256-Ds6w95tqlKjIFnkq2kKyslprKCwMOtBOoy7LuTon3KM=";
};
- patches = [
- (fetchpatch {
- # Fix try-lock spuriously fail in V3ThreadPool destructor
- # https://github.com/verilator/verilator/pull/4938
- url = "https://github.com/verilator/verilator/commit/4b9cce4369c78423779238e585ed693c456d464e.patch";
- hash = "sha256-sGrk/pxqZqUcmJdzQoPlzXMmYqHCOmd9Y2n6ieVNg1U=";
- })
- ];
-
enableParallelBuilding = true;
buildInputs = [
perl
@@ -57,6 +52,7 @@ stdenv.mkDerivation rec {
nativeCheckInputs = [
which
numactl
+ coreutils
# cmake
];
@@ -69,16 +65,12 @@ stdenv.mkDerivation rec {
patchShebangs bin/* src/* nodist/* docs/bin/* examples/xml_py/* \
test_regress/{driver.pl,t/*.{pl,pf}} \
ci/* ci/docker/run/* ci/docker/run/hooks/* ci/docker/buildenv/build.sh
+ # verilator --gdbbt uses /bin/echo to test if gdb works.
+ sed -i 's|/bin/echo|${coreutils}\/bin\/echo|' bin/verilator
'';
# grep '^#!/' -R . | grep -v /nix/store | less
# (in nix-shell after patchPhase)
- postInstall = lib.optionalString stdenv.isLinux ''
- for x in $(ls $out/bin/verilator*); do
- wrapProgram "$x" --set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive"
- done
- '';
-
env = {
SYSTEMC_INCLUDE = "${lib.getDev systemc}/include";
SYSTEMC_LIBDIR = "${lib.getLib systemc}/lib";