xed: 2024.02.22 -> 2025.03.02 (#414637)

This commit is contained in:
Pol Dellaiera 2025-06-07 08:04:41 +02:00 committed by GitHub
commit e6f9181ee9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,56 +4,92 @@
fetchFromGitHub, fetchFromGitHub,
python3Packages, python3Packages,
llvmPackages, llvmPackages,
installShellFiles,
nix-update-script,
}: }:
let let
# mbuild is a custom build system used only to build xed # mbuild is a custom build system used only to build xed
mbuild = python3Packages.buildPythonPackage rec { mbuild = python3Packages.buildPythonPackage rec {
pname = "mbuild"; pname = "mbuild";
version = "2022.07.28"; version = "2024.11.04";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "intelxed"; owner = "intelxed";
repo = "mbuild"; repo = "mbuild";
rev = "v${version}"; tag = "v${version}";
sha256 = "sha256-nVHHiaPbf+b+RntjUGjLLGS53e6c+seXIBx7AcTtiWU="; hash = "sha256-iQVykBG3tEPxI1HmqBkvO1q+K8vi64qBfVC63/rcTOk=";
};
meta = {
description = "Python-based build system used for building XED";
homepage = "https://github.com/intelxed/mbuild";
license = lib.licenses.asl20;
}; };
}; };
in in
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "xed"; pname = "xed";
version = "2024.02.22"; version = "2025.03.02";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "intelxed"; owner = "intelxed";
repo = "xed"; repo = "xed";
rev = "v${version}"; tag = "v${finalAttrs.version}";
sha256 = "sha256-LF4iJ1/Z3OifCiir/kU3ufZqtiRLeaJeAwuBqP2BCF4="; hash = "sha256-shQYgbUC06+x+3TNdOJA6y6Wea/8lqexkgBWk3AOOMA=";
}; };
postPatch = ''
patchShebangs mfile.py
'';
nativeBuildInputs = [ nativeBuildInputs = [
mbuild mbuild
installShellFiles
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.bintools ]; ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.bintools ];
buildPhase = '' buildPhase = ''
patchShebangs mfile.py runHook preBuild
# this will build, test and install # this will build, test and install
./mfile.py test --prefix $out ./mfile.py test --prefix $out
./mfile.py examples
mkdir -p $out/bin runHook postBuild
cp ./obj/wkit/examples/obj/xed $out/bin/
''; '';
dontInstall = true; # already installed during buildPhase checkPhase = ''
runHook preCheck
meta = with lib; { ./mfile.py examples
runHook postCheck
'';
installPhase = ''
runHook preInstall
installBin obj/wkit/examples/obj/xed
runHook postInstall
'';
passthru = {
inherit mbuild;
updateScript = nix-update-script {
extraArgs = [
"--subpackage"
"mbuild"
];
};
};
meta = {
broken = stdenv.hostPlatform.isAarch64; broken = stdenv.hostPlatform.isAarch64;
description = "Intel X86 Encoder Decoder (Intel XED)"; description = "Intel X86 Encoder Decoder (Intel XED)";
homepage = "https://intelxed.github.io/"; homepage = "https://intelxed.github.io/";
license = licenses.asl20; license = lib.licenses.asl20;
platforms = platforms.unix; platforms = lib.platforms.unix;
maintainers = with maintainers; [ arturcygan ]; maintainers = with lib.maintainers; [ arturcygan ];
}; };
} })