nixpkgs/pkgs/by-name/xe/xed/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, python3Packages, llvmPackages }:
2020-12-20 18:06:18 +00:00
let
# mbuild is a custom build system used only to build xed
mbuild = python3Packages.buildPythonPackage rec {
pname = "mbuild";
2022-09-13 09:39:14 +00:00
version = "2022.07.28";
2020-12-20 18:06:18 +00:00
src = fetchFromGitHub {
owner = "intelxed";
repo = "mbuild";
2022-09-13 09:39:14 +00:00
rev = "v${version}";
sha256 = "sha256-nVHHiaPbf+b+RntjUGjLLGS53e6c+seXIBx7AcTtiWU=";
2020-12-20 18:06:18 +00:00
};
};
in stdenv.mkDerivation rec {
pname = "xed";
version = "2024.02.22";
2020-12-20 18:06:18 +00:00
src = fetchFromGitHub {
owner = "intelxed";
repo = "xed";
2022-09-13 09:39:14 +00:00
rev = "v${version}";
sha256 = "sha256-LF4iJ1/Z3OifCiir/kU3ufZqtiRLeaJeAwuBqP2BCF4=";
2020-12-20 18:06:18 +00:00
};
nativeBuildInputs = [ mbuild ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.bintools ];
2020-12-20 18:06:18 +00:00
buildPhase = ''
patchShebangs mfile.py
# this will build, test and install
./mfile.py test --prefix $out
./mfile.py examples
mkdir -p $out/bin
cp ./obj/wkit/examples/obj/xed $out/bin/
2020-12-20 18:06:18 +00:00
'';
dontInstall = true; # already installed during buildPhase
meta = with lib; {
broken = stdenv.hostPlatform.isAarch64;
2020-12-20 18:06:18 +00:00
description = "Intel X86 Encoder Decoder (Intel XED)";
homepage = "https://intelxed.github.io/";
license = licenses.asl20;
2020-12-20 18:06:18 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ arturcygan ];
};
}