2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, makeWrapper, requireFile, gcc, unzip }:
|
|
|
|
with lib;
|
2018-04-10 17:24:46 +01:00
|
|
|
|
|
|
|
# v2.1: last version with NHM/WSM arch support
|
2021-11-09 19:42:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "iaca";
|
|
|
|
version = "2.1";
|
2018-04-10 17:24:46 +01:00
|
|
|
src = requireFile {
|
2021-11-09 19:42:54 +00:00
|
|
|
name = "iaca-version-${version}-lin64.zip";
|
2018-04-10 17:24:46 +01:00
|
|
|
sha256 = "11s1134ijf66wrc77ksky9mnb0lq6ml6fzmr86a6p6r5xclzay2m";
|
|
|
|
url = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer-download";
|
|
|
|
};
|
|
|
|
unpackCmd = ''${unzip}/bin/unzip "$src" -x __MACOSX/ __MACOSX/iaca-lin64/ __MACOSX/iaca-lin64/._.DS_Store'';
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib
|
|
|
|
cp bin/iaca $out/bin/
|
|
|
|
cp lib/* $out/lib
|
|
|
|
'';
|
|
|
|
preFixup = let libPath = makeLibraryPath [ stdenv.cc.cc.lib gcc ]; in ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
|
|
|
|
--set-rpath $out/lib:"${libPath}" \
|
|
|
|
$out/bin/iaca
|
|
|
|
'';
|
2021-01-24 09:19:10 +00:00
|
|
|
postFixup = "wrapProgram $out/bin/iaca --set LD_LIBRARY_PATH $out/lib";
|
2018-04-10 17:24:46 +01:00
|
|
|
meta = {
|
|
|
|
description = "Intel Architecture Code Analyzer";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/";
|
2018-04-10 17:24:46 +01:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ kazcw ];
|
|
|
|
};
|
|
|
|
}
|