Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

89 lines
1.8 KiB
Nix

{
lib,
archinfo,
buildPythonPackage,
cart,
cffi,
fetchFromGitHub,
pefile,
pyelftools,
pytestCheckHook,
pythonOlder,
pyvex,
setuptools,
sortedcontainers,
nix-update-script,
}:
let
# The binaries are following the argr projects release cycle
version = "9.2.154";
# Binary files from https://github.com/angr/binaries (only used for testing and only here)
binaries = fetchFromGitHub {
owner = "angr";
repo = "binaries";
rev = "refs/tags/v${version}";
hash = "sha256-XXJBySIT3ylK1nd3suP2bq4bVSVah/1XhOmkEONbCoY=";
};
in
buildPythonPackage rec {
pname = "cle";
inherit version;
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "angr";
repo = "cle";
rev = "refs/tags/v${version}";
hash = "sha256-rWbZzm5hWi/C+te8zeQChxqYHO0S795tJ6Znocq9TTs=";
};
build-system = [ setuptools ];
dependencies = [
archinfo
cart
cffi
pefile
pyelftools
pyvex
sortedcontainers
];
nativeCheckInputs = [ pytestCheckHook ];
# Place test binaries in the right location (location is hard-coded in the tests)
preCheck = ''
export HOME=$TMPDIR
cp -r ${binaries} $HOME/binaries
'';
disabledTests = [
# PPC tests seems to fails
"test_ppc_rel24_relocation"
"test_ppc_addr16_ha_relocation"
"test_ppc_addr16_lo_relocation"
"test_plt_full_relro"
# Test fails
"test_tls_pe_incorrect_tls_data_start"
"test_x86"
"test_x86_64"
# The required parts is not present on Nix
"test_remote_file_map"
];
pythonImportsCheck = [ "cle" ];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Python loader for many binary formats";
homepage = "https://github.com/angr/cle";
license = licenses.bsd2;
maintainers = with maintainers; [ fab ];
};
}