From 26c20d2fda6bcae4a34af234104670661e548e51 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 12 Aug 2024 06:41:39 +0000 Subject: [PATCH 1/2] trustymail: 0.8.3 -> 1.0.0 --- pkgs/tools/security/trustymail/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/trustymail/default.nix b/pkgs/tools/security/trustymail/default.nix index 11133548bbd3..4df51400dd8b 100644 --- a/pkgs/tools/security/trustymail/default.nix +++ b/pkgs/tools/security/trustymail/default.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "trustymail"; - version = "0.8.3"; + version = "1.0.0"; format = "setuptools"; src = fetchFromGitHub { owner = "cisagov"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-aFXz78Gviki0yIcnn2EgR3mHmt0wMoY5u6RoT6zQc1Y="; + hash = "sha256-Zkw+NfeVtIArrBxR1qR9bAQe5yd7mAtNiT0x5Mqr3Ic="; }; postPatch = '' From 730e3a8bbeb957f475cb498256417e23650ede46 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 12 Aug 2024 21:37:20 +0200 Subject: [PATCH 2/2] trustymail: refactor --- pkgs/tools/security/trustymail/default.nix | 44 +++++++++++----------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/pkgs/tools/security/trustymail/default.nix b/pkgs/tools/security/trustymail/default.nix index 4df51400dd8b..9935cbdb842f 100644 --- a/pkgs/tools/security/trustymail/default.nix +++ b/pkgs/tools/security/trustymail/default.nix @@ -1,48 +1,50 @@ -{ lib -, fetchFromGitHub -, python3 +{ + lib, + fetchFromGitHub, + python3, }: python3.pkgs.buildPythonApplication rec { pname = "trustymail"; version = "1.0.0"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "cisagov"; - repo = pname; + repo = "trustymail"; rev = "refs/tags/v${version}"; hash = "sha256-Zkw+NfeVtIArrBxR1qR9bAQe5yd7mAtNiT0x5Mqr3Ic="; }; postPatch = '' substituteInPlace pytest.ini \ - --replace " --cov" "" + --replace-fail " --cov" "" ''; - propagatedBuildInputs = with python3.pkgs; [ - dnspython - docopt - publicsuffixlist - pydns - pyspf - requests - ] ++ publicsuffixlist.optional-dependencies.update; + build-system = with python3.pkgs; [ setuptools ]; - nativeCheckInputs = with python3.pkgs; [ - pytestCheckHook - ]; + dependencies = + with python3.pkgs; + [ + dnspython + docopt + publicsuffixlist + pydns + pyspf + requests + ] + ++ publicsuffixlist.optional-dependencies.update; - pythonImportsCheck = [ - "trustymail" - ]; + nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ]; + + pythonImportsCheck = [ "trustymail" ]; meta = with lib; { description = "Tool to scan domains and return data based on trustworthy email best practices"; - mainProgram = "trustymail"; homepage = "https://github.com/cisagov/trustymail"; changelog = "https://github.com/cisagov/trustymail/releases/tag/v${version}"; license = with licenses; [ cc0 ]; maintainers = with maintainers; [ fab ]; + mainProgram = "trustymail"; }; }