hal-hardware-analyzer: 4.4.1 -> 4.5.0 (#445765)

dotlambda 947e2d60 f6a85591

Changed files
+21 -74
pkgs
applications
by-name
ha
hal-hardware-analyzer
ve
verilator
top-level
-28
pkgs/applications/science/electronics/hal-hardware-analyzer/4.4.1-newer-spdlog-fmt-compat.patch
···
-
compatibility with newer spdlog/fmt versions
-
-
diff --git a/plugins/module_identification/src/api/module_identification.cpp b/plugins/module_identification/src/api/module_identification.cpp
-
index 808875e8a68..3cf3cf1fb8b 100644
-
--- a/plugins/module_identification/src/api/module_identification.cpp
-
+++ b/plugins/module_identification/src/api/module_identification.cpp
-
@@ -406,7 +406,7 @@ namespace hal
-
-
const u32 num_threads = std::min(config.m_max_thread_count, std::thread::hardware_concurrency() - 1);
-
-
- log_info("module_identification", "running with {} threads and {} multithreading priority", num_threads, config.m_multithreading_priority);
-
+ log_info("module_identification", "running with {} threads and {} multithreading priority", num_threads, fmt::underlying(config.m_multithreading_priority));
-
-
auto stats = Statistics();
-
-
diff --git a/plugins/z3_utils/src/simplification.cpp b/plugins/z3_utils/src/simplification.cpp
-
index d64cab665f2..561fa7f1a23 100644
-
--- a/plugins/z3_utils/src/simplification.cpp
-
+++ b/plugins/z3_utils/src/simplification.cpp
-
@@ -617,7 +617,7 @@ namespace hal
-
return false;
-
-
default: {
-
- log_error("z3_utils", "commutative check not implemeted for type {}!", t);
-
+ log_error("z3_utils", "commutative check not implemeted for type {}!", fmt::underlying(t));
-
return false;
-
}
-
}
+12 -29
pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix pkgs/by-name/ha/hal-hardware-analyzer/package.nix
···
boost,
cmake,
fetchFromGitHub,
-
fetchpatch,
graphviz,
igraph,
llvmPackages,
···
nlohmann_json,
pkg-config,
python3Packages,
-
qtbase,
-
qtsvg,
-
quazip,
+
libsForQt5,
rapidjson,
spdlog,
verilator,
-
wrapQtAppsHook,
z3,
+
nix-update-script,
}:
stdenv.mkDerivation rec {
-
version = "4.4.1";
+
version = "4.5.0";
pname = "hal-hardware-analyzer";
src = fetchFromGitHub {
owner = "emsec";
repo = "hal";
-
rev = "v${version}";
-
sha256 = "sha256-8kmYeqsmqR7tY044rZb3KuEAVGv37IObX6k1qjXWG0A=";
+
tag = "v${version}";
+
hash = "sha256-4HLM/7JCDxWRWusGL4lUa8KXCn9pe3Vkr+lOxHOraNU=";
};
-
patches = [
-
(fetchpatch {
-
name = "de-vendor-nlohmann-json.patch";
-
# https://github.com/emsec/hal/pull/596
-
url = "https://github.com/emsec/hal/commit/f8337d554d80cfa2588512696696fd4c878dd7a3.patch";
-
hash = "sha256-QjgvcduwbFccC807JFOevlTfO3KiL9T3HSqYmh3sXAQ=";
-
})
-
(fetchpatch {
-
name = "fix-vendored-igraph-regression.patch";
-
# https://github.com/emsec/hal/pull/596
-
url = "https://github.com/emsec/hal/commit/fe1fe74719ab4fef873a22e2b28cce0c57d570e0.patch";
-
hash = "sha256-bjbW4pr04pP0TCuSdzPcV8h6LbLWMvdGSf61RL9Ju6E=";
-
})
-
./4.4.1-newer-spdlog-fmt-compat.patch
-
./resynthesis-fix-narrowing-conversion.patch
-
];
-
# make sure bundled dependencies don't get in the way - install also otherwise
# copies them in full to the output, bloating the package
postPatch = ''
···
cmake
ninja
pkg-config
-
wrapQtAppsHook
+
libsForQt5.wrapQtAppsHook
];
buildInputs = [
-
qtbase
-
qtsvg
+
libsForQt5.qtbase
+
libsForQt5.qtsvg
boost
rapidjson
igraph
···
graphviz
verilator
z3
-
quazip
+
libsForQt5.quazip
]
++ (with python3Packages; [
python
···
done
'';
+
passthru.updateScript = nix-update-script { };
+
meta = with lib; {
+
changelog = "https://github.com/emsec/hal/blob/${src.tag}/CHANGELOG.md";
description = "Comprehensive reverse engineering and manipulation framework for gate-level netlists";
mainProgram = "hal";
homepage = "https://github.com/emsec/hal";
-13
pkgs/applications/science/electronics/hal-hardware-analyzer/resynthesis-fix-narrowing-conversion.patch
···
-
diff --git a/plugins/resynthesis/src/resynthesis.cpp b/plugins/resynthesis/src/resynthesis.cpp
-
index 7a7e404114f..f2889667af8 100644
-
--- a/plugins/resynthesis/src/resynthesis.cpp
-
+++ b/plugins/resynthesis/src/resynthesis.cpp
-
@@ -1058,7 +1058,7 @@ namespace hal
-
// delete the created directory and the contained files
-
std::filesystem::remove_all(base_path);
-
-
- return OK(subgraph.size());
-
+ return OK(static_cast<unsigned int>(subgraph.size()));
-
}
-
-
Result<u32> resynthesize_subgraph_of_type(Netlist* nl, const std::vector<const GateType*>& gate_types, GateLibrary* target_gl)
+9
pkgs/by-name/ve/verilator/package.nix
···
lib,
stdenv,
fetchFromGitHub,
+
fetchpatch,
perl,
flex,
bison,
···
tag = "v${version}";
hash = "sha256-S+cDnKOTPjLw+sNmWL3+Ay6+UM8poMadkyPSGd3hgnc=";
};
+
+
patches = [
+
(fetchpatch {
+
name = "clang-V3hash-overload-fix.patch";
+
url = "https://github.com/verilator/verilator/commit/2aa260a03b67d3fe86bc64b8a59183f8dc21e117.patch";
+
hash = "sha256-waUsctWiAMG3lCpQi+VUUZ7qMw/kJGu/wNXPHZGuAoU=";
+
})
+
];
enableParallelBuilding = true;
buildInputs = [
-4
pkgs/top-level/all-packages.nix
···
haste-client = callPackage ../tools/misc/haste-client { };
-
hal-hardware-analyzer =
-
libsForQt5.callPackage ../applications/science/electronics/hal-hardware-analyzer
-
{ };
-
halide = callPackage ../development/compilers/halide {
llvmPackages = llvmPackages_19;
};