Files
nixpkgs/pkgs/by-name/fl/flare-floss/package.nix
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

73 lines
1.5 KiB
Nix

{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonPackage rec {
pname = "flare-floss";
version = "3.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "mandiant";
repo = "flare-floss";
tag = "v${version}";
fetchSubmodules = true; # for tests
hash = "sha256-ciyF1Pt5KdUsmpTgvfgE81hhTHBM5zMBcZpom99R5GY=";
};
postPatch = ''
substituteInPlace floss/main.py \
--replace 'sigs_path = os.path.join(get_default_root(), "sigs")' 'sigs_path = "'"$out"'/share/flare-floss/sigs"'
'';
pythonRelaxDeps = [ "networkx" ];
build-system = with python3.pkgs; [
setuptools
setuptools-scm
];
dependencies =
with python3.pkgs;
[
binary2strings
dncil
halo
networkx
pefile
pydantic
rich
tabulate
tqdm
viv-utils
vivisect
]
++ viv-utils.optional-dependencies.flirt;
nativeCheckInputs = with python3.pkgs; [
pytest-sugar
pytestCheckHook
pyyaml
];
postInstall = ''
mkdir -p $out/share/flare-floss/
cp -r floss/sigs $out/share/flare-floss/
'';
preCheck = ''
export HOME=$(mktemp -d)
'';
meta = {
description = "Automatically extract obfuscated strings from malware";
homepage = "https://github.com/mandiant/flare-floss";
changelog = "https://github.com/mandiant/flare-floss/releases/tag/v${version}";
license = lib.licenses.asl20;
mainProgram = "floss";
maintainers = with lib.maintainers; [ fab ];
};
}