From d181aa11d9af9815c389055928dd88813956cb25 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Apr 2024 10:34:15 +0200 Subject: [PATCH 1/3] flare-floss: refactor --- pkgs/tools/security/flare-floss/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/flare-floss/default.nix b/pkgs/tools/security/flare-floss/default.nix index c9a9c8cd1380..5070534db0ef 100644 --- a/pkgs/tools/security/flare-floss/default.nix +++ b/pkgs/tools/security/flare-floss/default.nix @@ -24,11 +24,11 @@ python3.pkgs.buildPythonPackage rec { --replace 'sigs_path = os.path.join(get_default_root(), "sigs")' 'sigs_path = "'"$out"'/share/flare-floss/sigs"' ''; - nativeBuildInputs = with python3.pkgs; [ + build-system = with python3.pkgs; [ setuptools ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ binary2strings halo networkx From 9ed6644297f34f8405f910f40c2212a69dc2d6cf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Apr 2024 10:34:43 +0200 Subject: [PATCH 2/3] flare-floss: format with nixfmt --- pkgs/tools/security/flare-floss/default.nix | 38 +++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/pkgs/tools/security/flare-floss/default.nix b/pkgs/tools/security/flare-floss/default.nix index 5070534db0ef..33d930442935 100644 --- a/pkgs/tools/security/flare-floss/default.nix +++ b/pkgs/tools/security/flare-floss/default.nix @@ -1,6 +1,7 @@ -{ lib -, python3 -, fetchFromGitHub +{ + lib, + python3, + fetchFromGitHub, }: python3.pkgs.buildPythonPackage rec { @@ -24,22 +25,23 @@ python3.pkgs.buildPythonPackage rec { --replace 'sigs_path = os.path.join(get_default_root(), "sigs")' 'sigs_path = "'"$out"'/share/flare-floss/sigs"' ''; - build-system = with python3.pkgs; [ - setuptools - ]; + build-system = with python3.pkgs; [ setuptools ]; - dependencies = with python3.pkgs; [ - binary2strings - halo - networkx - pefile - pydantic_1 - rich - tabulate - tqdm - viv-utils - vivisect - ] ++ viv-utils.optional-dependencies.flirt; + dependencies = + with python3.pkgs; + [ + binary2strings + halo + networkx + pefile + pydantic_1 + rich + tabulate + tqdm + viv-utils + vivisect + ] + ++ viv-utils.optional-dependencies.flirt; nativeCheckInputs = with python3.pkgs; [ pytest-sugar From 29e43304e0c607bf2cb94217fc61ec0f6a908ed5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Apr 2024 10:40:43 +0200 Subject: [PATCH 3/3] flare-floss: 3.0.1 -> 3.1.0 Diff: https://github.com/mandiant/flare-floss/compare/refs/tags/v3.0.1...v3.1.0 Changelog: https://github.com/mandiant/flare-floss/releases/tag/v3.1.0 --- pkgs/tools/security/flare-floss/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/security/flare-floss/default.nix b/pkgs/tools/security/flare-floss/default.nix index 33d930442935..08ca48bc097a 100644 --- a/pkgs/tools/security/flare-floss/default.nix +++ b/pkgs/tools/security/flare-floss/default.nix @@ -6,7 +6,7 @@ python3.pkgs.buildPythonPackage rec { pname = "flare-floss"; - version = "3.0.1"; + version = "3.1.0"; pyproject = true; src = fetchFromGitHub { @@ -14,18 +14,21 @@ python3.pkgs.buildPythonPackage rec { repo = "flare-floss"; rev = "refs/tags/v${version}"; fetchSubmodules = true; # for tests - hash = "sha256-bmOWOFqyvOvSrNTbwLqo0WMq4IAZxZ0YYaWCdCrpziU="; + hash = "sha256-a20q7kavWwCsfnAW02+IY0jKERMxkJ+2nid/CwQxC9E="; }; postPatch = '' - substituteInPlace setup.py \ + substituteInPlace pyproject.toml \ --replace "==" ">=" substituteInPlace floss/main.py \ --replace 'sigs_path = os.path.join(get_default_root(), "sigs")' 'sigs_path = "'"$out"'/share/flare-floss/sigs"' ''; - build-system = with python3.pkgs; [ setuptools ]; + build-system = with python3.pkgs; [ + setuptools + setuptools-scm + ]; dependencies = with python3.pkgs; @@ -34,7 +37,7 @@ python3.pkgs.buildPythonPackage rec { halo networkx pefile - pydantic_1 + pydantic rich tabulate tqdm