1{ lib, stdenv, fetchFromGitHub, python3Packages }:
2
3let
4 # mbuild is a custom build system used only to build xed
5 mbuild = python3Packages.buildPythonPackage rec {
6 pname = "mbuild";
7 version = "2022.07.28";
8
9 src = fetchFromGitHub {
10 owner = "intelxed";
11 repo = "mbuild";
12 rev = "v${version}";
13 sha256 = "sha256-eOAqmoPotdXGcBmrD9prXph4XOL6noJU6GYT/ud/VXk=";
14 };
15 };
16
17in stdenv.mkDerivation rec {
18 pname = "xed";
19 version = "2022.08.11";
20
21 src = fetchFromGitHub {
22 owner = "intelxed";
23 repo = "xed";
24 rev = "v${version}";
25 sha256 = "sha256-Iil+dfjuWYPbzmSjgwKTKScSE/IsWuHEKQ5HsBJDqWM=";
26 };
27
28 nativeBuildInputs = [ mbuild ];
29
30 buildPhase = ''
31 patchShebangs mfile.py
32
33 # this will build, test and install
34 ./mfile.py test --prefix $out
35 '';
36
37 dontInstall = true; # already installed during buildPhase
38
39 meta = with lib; {
40 broken = (stdenv.isLinux && stdenv.isAarch64);
41 description = "Intel X86 Encoder Decoder (Intel XED)";
42 homepage = "https://intelxed.github.io/";
43 license = licenses.asl20;
44 platforms = platforms.unix;
45 maintainers = with maintainers; [ arturcygan ];
46 };
47}