2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
libiconv,
|
2022-08-12 12:06:08 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-flirt";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.8.6";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "williballenthin";
|
|
|
|
repo = "lancelot";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-J48tRgJw6JjUrcAQdRELFE50pyDptbmbgYbr+rAK/PA=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cp ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
maturinBuildHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildAndTestSubdir = "pyflirt";
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2023-03-04 12:14:45 +00:00
|
|
|
"zydis-3.1.3" = "sha256-X+aURjNfXGXO4eh6RJ3bi8Eb2kvF09I34ZHffvYjt9I=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "flirt" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for parsing, compiling, and matching Fast Library Identification and Recognition Technology (FLIRT) signatures";
|
|
|
|
homepage = "https://github.com/williballenthin/lancelot/tree/master/pyflirt";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ sbruder ];
|
|
|
|
};
|
|
|
|
}
|