nixpkgs/pkgs/tools/security/trustymail/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

49 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "trustymail";
version = "0.8.3";
format = "setuptools";
src = fetchFromGitHub {
owner = "cisagov";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-aFXz78Gviki0yIcnn2EgR3mHmt0wMoY5u6RoT6zQc1Y=";
};
postPatch = ''
substituteInPlace pytest.ini \
--replace " --cov" ""
'';
propagatedBuildInputs = with python3.pkgs; [
dnspython
docopt
publicsuffixlist
pydns
pyspf
requests
] ++ publicsuffixlist.optional-dependencies.update;
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 ];
};
}