git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #76960 from risicle/ris-hal-hardware-analyzer

hal-hardware-analyzer: init at 2.0.0

commitfd5c0b94b2a43856ec7b56f0a1eb2340fff729cb authorRobert Scott <code@humanleg.org.uk> dateTue 21 Jul 2020, 22:08 (6 years ago) parent0da12cbd2d921b
2 files changed+54
pkgs/applications/science/electronics/hal-hardware-analyzer/default.nix+52 pkgs/top-level/all-packages.nix+2
pkgs/applications/science/electronics/hal-hardware-analyzer/default.nixnew file+52
@@ -0,0 +1,52 @@
1+{ stdenv, fetchFromGitHub, cmake, ninja, pkgconfig, python3Packages
2+, boost, rapidjson, qtbase, qtsvg, igraph, spdlog, wrapQtAppsHook
3+, llvmPackages ? null
4+}:
5+
6+stdenv.mkDerivation rec {
7+ version = "2.0.0";
8+ pname = "hal-hardware-analyzer";
9+
10+ src = fetchFromGitHub {
11+ owner = "emsec";
12+ repo = "hal";
13+ rev = "v${version}";
14+ sha256 = "11xmqxnryksl645wmm1d69k1b5zwvxxf0admk4iblzaa3ggf7cv1";
15+ };
16+ # make sure bundled dependencies don't get in the way - install also otherwise
17+ # copies them in full to the output, bloating the package
18+ postPatch = ''
19+ rm -rf deps/*/*
20+ substituteInPlace cmake/detect_dependencies.cmake \
21+ --replace 'spdlog 1.4.2 EXACT' 'spdlog 1.4.2 REQUIRED'
22+ '';
23+
24+ nativeBuildInputs = [ cmake ninja pkgconfig ];
25+ buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog wrapQtAppsHook ]
26+ ++ (with python3Packages; [ python pybind11 ])
27+ ++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp;
28+
29+ cmakeFlags = with stdenv.lib.versions; [
30+ "-DHAL_VERSION_RETURN=${version}"
31+ "-DHAL_VERSION_MAJOR=${major version}"
32+ "-DHAL_VERSION_MINOR=${minor version}"
33+ "-DHAL_VERSION_PATCH=${patch version}"
34+ "-DHAL_VERSION_TWEAK=0"
35+ "-DHAL_VERSION_ADDITIONAL_COMMITS=0"
36+ "-DHAL_VERSION_DIRTY=false"
37+ "-DHAL_VERSION_BROKEN=false"
38+ "-DENABLE_INSTALL_LDCONFIG=off"
39+ "-DBUILD_ALL_PLUGINS=on"
40+ ];
41+ # needed for macos build - this is why we use wrapQtAppsHook instead of
42+ # the qt mkDerivation - the latter forcibly overrides this.
43+ cmakeBuildType = "MinSizeRel";
44+
45+ meta = {
46+ description = "A comprehensive reverse engineering and manipulation framework for gate-level netlists";
47+ homepage = "https://github.com/emsec/hal";
48+ license = stdenv.lib.licenses.mit;
49+ platforms = with stdenv.lib.platforms; unix;
50+ maintainers = with stdenv.lib.maintainers; [ ris ];
51+ };
52+}
pkgs/top-level/all-packages.nix+2
@@ -4150,6 +4150,8 @@ in
41504150
41514151 hal-flash = callPackage ../os-specific/linux/hal-flash { };
41524152
4153+ hal-hardware-analyzer = libsForQt5.callPackage ../applications/science/electronics/hal-hardware-analyzer { };
4154+
41534155 half = callPackage ../development/libraries/half { };
41544156
41554157 halibut = callPackage ../tools/typesetting/halibut { };