summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/logboth/default.nix
blob: 6e4ced1405efee9fe88b6e58251cee13b090bf0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  lib,
  buildPythonPackage,
  fetchFromGitLab,
  setuptools,
}:

buildPythonPackage rec {
  pname = "logboth";
  version = "0.1.0";
  pyproject = true;

  src = fetchFromGitLab {
    owner = "zehkira";
    repo = "logboth";
    tag = "v${version}";
    hash = "sha256-z62atvFYrRqjcGQbTlWadoG1TPrNl8WwDBclzhqQtPA=";
  };

  build-system = [ setuptools ];

  checkPhase = ''
    runHook preInstallCheck

    python3 source/tests/tests.py

    runHook postInstallCheck
  '';

  pythonImportsCheck = [ "logboth" ];

  meta = {
    description = "Easily write logs to standard output and a file at the same time";
    homepage = "https://gitlab.com/zehkira/logboth";
    license = lib.licenses.bsd0;
    maintainers = with lib.maintainers; [ aleksana ];
  };
}