1 { lib, stdenv, fetchFromGitHub, python3Packages, llvmPackages }:
4 # mbuild is a custom build system used only to build xed
5 mbuild = python3Packages.buildPythonPackage rec {
7 version = "2022.07.28";
9 src = fetchFromGitHub {
13 sha256 = "sha256-nVHHiaPbf+b+RntjUGjLLGS53e6c+seXIBx7AcTtiWU=";
17 in stdenv.mkDerivation rec {
19 version = "2024.02.22";
21 src = fetchFromGitHub {
25 sha256 = "sha256-LF4iJ1/Z3OifCiir/kU3ufZqtiRLeaJeAwuBqP2BCF4=";
28 nativeBuildInputs = [ mbuild ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.bintools ];
31 patchShebangs mfile.py
33 # this will build, test and install
34 ./mfile.py test --prefix $out
37 cp ./obj/wkit/examples/obj/xed $out/bin/
40 dontInstall = true; # already installed during buildPhase
43 broken = stdenv.hostPlatform.isAarch64;
44 description = "Intel X86 Encoder Decoder (Intel XED)";
45 homepage = "https://intelxed.github.io/";
46 license = licenses.asl20;
47 platforms = platforms.unix;
48 maintainers = with maintainers; [ arturcygan ];