python311Packages.nampa: refactor

This commit is contained in:
Fabian Affolter 2024-03-28 23:40:32 +01:00
parent c2706010ac
commit e74a30a737

View File

@ -2,41 +2,49 @@
, buildPythonPackage
, fetchFromGitHub
, future
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "nampa";
version = "1.0";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "thebabush";
repo = pname;
rev = version;
sha256 = "14b6xjm497wrfw4kv24zhsvz2l6zknvx36w8i754hfwz3s3fsl6a";
repo = "nampa";
rev = "refs/tags/${version}";
hash = "sha256-ylDthh6fO0jKiYib0bed31Dxt4afiD0Jd5mfRKrsZpE=";
};
propagatedBuildInputs = [
future
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
# https://github.com/thebabush/nampa/pull/13
substituteInPlace setup.py \
--replace "0.1.1" "${version}"
'';
pythonImportsCheck = [ "nampa" ];
build-system = [
setuptools
];
dependencies = [
future
];
# Not used for binaryninja as plugin
doCheck = false;
pythonImportsCheck = [
"nampa"
];
meta = with lib; {
description = "Python implementation of the FLIRT technology";
mainProgram = "dumpsig.py";
homepage = "https://github.com/thebabush/nampa";
changelog = "https://github.com/thebabush/nampa/releases/tag/${version}";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ fab ];
};