nixpkgs/pkgs/development/python-modules/mwdblib/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

54 lines
1.0 KiB
Nix

{ lib
, beautifultable
, buildPythonPackage
, click
, click-default-group
, fetchFromGitHub
, humanize
, keyring
, unittestCheckHook
, python-dateutil
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "mwdblib";
version = "4.5.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "CERT-Polska";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-+hh7SJFITpLumIuzNgBbXtFh+26tUG66UFv6DLDk5ag=";
};
propagatedBuildInputs = [
beautifultable
click
click-default-group
humanize
keyring
python-dateutil
requests
];
nativeCheckInputs = [ unittestCheckHook ];
pythonImportsCheck = [
"mwdblib"
];
meta = with lib; {
description = "Python client library for the mwdb service";
mainProgram = "mwdb";
homepage = "https://github.com/CERT-Polska/mwdblib";
changelog = "https://github.com/CERT-Polska/mwdblib/releases/tag/v${version}";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}